My blog has been moved to http://www.javacraft.org/, on Blogger. I was waiting for the domain to become active to announce it.
This is the last post for my blog on WordPress.com. See you at Blogger’s. 🙂
My blog has been moved to http://www.javacraft.org/, on Blogger. I was waiting for the domain to become active to announce it.
This is the last post for my blog on WordPress.com. See you at Blogger’s. 🙂
I’ve been banging my head on a few configuration problems lately setting up a proper development environment. During which I encountered and worked around some annoying bugs. Some of which in Maven.
I’m giving JRebel a spin. Man… this thing copes with any change you can image ! Before JRebel, I could occasionally hot-swap code in debug mode. But more often than not I had to stop, redeploy and restart. Now I’m restarting Tomcat no more. At all.
What’s original also is that this is the first software I see encouraging its user. 🙂
This year I went to Devoxx with the firm intention to learn about the programming model of Android and JavaFX. And above all check what the HTML5 hype is all about. Especially since it becomes clear Java developers can’t just hide anymore from JavaScript and CSS. Denying your involvement into JS & CSS today would amount to telling you’re not interested in the ways your Java services are used. And you’ll simply be unable to solve bugs which flow brings you into the front-end code. Which today is heavily relying on JS. You can’t just refuse to use it because you don’t like it.
Besides this, I’m checking for the feasibility for these technologies for my employer’s products.
Personally, I don’t like JS. It’s just too chaotic – in my opinion – for reliably building complex application. And the fact it runs in the front-end means anybody can interfere in its execution. Hence messing with the data sent to the server. Which you therefore need to check again in the back-end code. Not to mention JS code is dynamic by its very own nature: Functions can be added anytime to objects. And its execution browser-dependent. Sometimes even the OS and hardware interfere there too. So really… 🙂 But there’s no denying it: it’s here to stay.
Anyway, I was not disappointed by Devoxx for my expectations. Also note that I’m expressing my personal opinions only.
Just like Android, JavaFX is one of the main subjects of Devoxx this year. Being familiar with the previous releases I was wondering what they had done to make it more potable for Java. As this was the main objective of JavaFX 2.0: Port it from JavaFX script to Java. And maybe they have solved a number of deployment restrictions in the process. They didn’t…
The JavaFX guru’s would probably refute, but for me personally I think it’s too little too late. By removing the JavaFX script language, this is now just the new Swing. (Although a very improved one !) No doubt this is a quantum leap forward for the looks of Java desktop applications. But …
It’s a pity. Because I was very fond of the original JavaFX. But the current one has nothing to differentiate itself from the rest. It has impressive graphical capabilities. But who’s going to need them ? And to what extend are they different from HTML5’s WebGL ? It’s also hardware accelerated. I personally don’t get all the media attention Oracle puts into JavaFX. But I hope I’m wrong about it’s future. Still got a soft spot for it. 😉
No doubt HTML5 was thé star of Devoxx 2011. Many talks were scheduled for the various aspects it covers. I was particularly attentive to them because it’s very probable I’ll be confronted with it very soon for my job.
Again, I’m not happy with JS becoming so incredibly present in web development. But denying it would be plain stupid. If that’s the way it goes, that’s the way it is. Accomplished Java web developers have to know about JS/CSS/HTML5 very soon now.
I’ve heard about this one before and this was the occasion to learn about it. The basic idea is to write Spring Repositories (aka DAO) using only Java interfaces. No concrete class is being written !
My notes can be downloaded here.
These were the sessions I attended. Apart from the last, they were disappointing. The first was an overview of generational garbage collection. And even that is not possible in a one hour time-span. The second appeared to be a – abbreviated – overview of Project Coin. Which no doubt everybody can find tenths of more complete sources in seconds. The last one, however, was worth it.
The file system API is located in java.nio.file. And basically the class Path replaces the good ‘ol File. Many operations you need Commons IO for are now native. File and stream copy- and move, to name a few.
What’s really new is the fact that finally the file attributes are also available. Permissions, owner, … And they’re updatable ! For performance reasons these can also be collected in bulk. And indeed, I often noticed File.isDir() on top of stack traces when profiling applications. I hope this is finished now.
What’s really cool is the notification of changes for directories and files. No need to poll any more.
And my favorite: Zip and jar files can now be used as file systems ! 🙂
An interesting blog entry about what’s store for the JDK.
I’ve got notes here, here and here. My hand writing is getting better, isn’t it ? 😛
The Glassfish presentation was short, but informative, introduction into the versioning of applications. Basically it comes down to give a version number at deployment time. The previous version is disabled and makes places for the new version. Should the new version be broken is some way, you can revert back to the old one. There are various options to switch back and forth without losing a single session or request.
Doing this for a cluster is still manual though. Cluster-wide deployment would really be helpful though. 🙂
Currently just one version can be active at one time. There are plans though to have more than one. For instance to have the regular users run the old version and the final testers the new version. After which the old version is disabled and all traffic rerouted to the new version. But the active versions won’t be isolated from each other. They really act as concurrent applications to the same backend.
The JMS presentation was one of my biggest expectations. Finally one of the flagship JEE modules gets a workover. I have no doubt a lot of progress was made, but the presentation turned out to be a big disappointment. Lots and lots of explanations about what’s wrong with JMS 1.1, the challenges to define a new api, etc… I think the lesson is that the API will be much simpler (which was about time) when sending messages. And will rely on CDI for injecting the various related objects. It will be released with JEE 7, Q3 of 2012. I’ll check on it then – IF I need JMS that is !
That’s what you get for letting managers present technical subjects. Even if they are the spec leads. Pity…
It tuned out that the Infinispan presentation was one of the best I saw this year. I’ve heard about Infinispan before, but never had the occasion to check on it. Until now.
Infinispan is both a caching- and datagrid solution. Depends on what you use it for. You can use it as a 2nd-level cache for Hibernate. For which is seems to be able to do everything besides cooking your meal. 🙂 It can be embedded or distributed. In both cases it can be transactional. Monitored by JMX if needed. Provides cache statistics. Overflow to a persistent store. Event listeners supported. Preloading of caches. Encryption. Authentication. Etc…
In case of distributed caching, it relies on JGroups for communication. So basically, if there’s a wire between the machines, it will work.
What’s neat is that the cache synchronization in a distributed case can happen according to various strategies:
I definitely give Infinispan a try. Usually I work with EHCache; which is simple and quick. But doesn’t support transactions.
I’ve got notes here, here and here.
Being a Scala enthusiast myself, I couldn’t miss the meeting of Europe’s Scala amateurs. It seems we all have the same problem: We would like to introduce it at work, but we can’t convince anybody to start with it. 🙂 England’s the best country for Scala jobs though.
More precisely stacking a whole lot of successive products: Play, Coffeescript, PhoneGap, Jade, HTML5, JS2Coffee, Less and Anorm. Just to name a few. Because he’s not only entertaining; he’s also bloody fast ! Usually there was a fast-paced introduction to a product which ended with “… and I blogged about it”.
It’s so fast, that I’m still trying to cope with the implications with what I saw:
Earlier this year Jetbrains announced the imminent release of their own JVM language named Kotlin. And now, there it is ! I attended because of the reputation of Jetbrains to make software that matters. Their language has many things good. But really, it’s too late. However good it is, are we going to learn just another language ? If they had released two years earlier, I think I might have ditched Scala for it. It’s concise and has implicit robust design support. Maybe it will get more coverage later. But I’ll be very surprised they ever reach Scala’s current support level.
Sorry Jetbrains… I am not going to learn a second just-for-fun language.
Cracking Clojure is one I attended out of curiosity. I’ve read two or three things about it. Knowing it’s LISP’s spiritual offspring only made me more curious about it.
I held firm courageously for the first 15 minutes. When the examples became longer and longer I drowned in the flood of parentheses. I have no doubt Clojure has a niche application market. But I’m still searching for it. It’s certainly not business. It might be maths or technology. But even there, I’m not quite sure. What’s intriguing is the fact it considers code as data. And inverse. Functions are lists of statements. And statements are lists of arguments with a name. Etc… A Clojure application seems to be a tree-structure which nodes are sequences of … things. Although I won’t stake my reputation on it. 😛
Clojure is a curious beast which usefulness still eludes me. And especially because it does, I’m decided to find it out ! 🙂
I’ve got notes here, here and here. The slides on Slideshare.
This one was attended because the title appealed to me. Not for the first time did I which for a tool a can do application-wide source code refactoring. Without doing it manually file by file.
Jackpot is an old Sun project revived in Netbeans 7.1 in the form of source code hints. The IDE will advise of a certain (potential) problem. That’s one. And the cure(s) to solve it. That’s two. What modern IDE do today.
The difference is that Jackpot is custom-configurable. It has an extensive search & replace DSL to select parts of Java source code satisfying certain criteria (the problem). And when found, the possible code it can be replaced with (the cure). And what’s really making this a live-saver is that the IDE can be instructed to apply this in bulk; using the new Inspect and Transform functionality of Netbeans 7.1.
Yeap. Netbeans got even better !
I’ve got notes here.
Joe Nuxoll presented his UI design wisdom in a more than crammed full room. Being involved in visual prototyping myself and a BIG fan of the JavaPosse, I just could miss the occasion.
It appears design is nothing rational. It’s all about taste; and therefore directly about the mood of the people who decide what’s looking good. Often communicating with them is the key.
The remainder of the talk was about “golden eggs” – concrete advise of do’s and dont’s. Even if instinctively you know them make sense, it’s good to see them confirmed. I’ve written them down into the notes.
I’ve got notes here. The writing’s terrible – I forgot my stylus in the car. 🙂
Two book recommendations:
A talk presented by one of Terracotta‘s guy’s. Judging by his accent I would guess he traveled quite a distance to be here. From down below ? 🙂
JSR-107 is not the first attempt to standardize caching. But it’s probably the first one which will actually deliver. There’s a specification that’s currently up to its 0.4 version. The key concepts are almost identical to those of EHCache – one of Terracotta’s products:
CacheManager -> Cache -> Entries -> Keys & Values.
Unfortunately this talk was a bit too EHCache-minded in my opinion. Anyway, I’ve heard nothing new.
Except for one gem: The annotations allow – finally – for memoizable methods. Meaning by simply annotating a method in some way you can tell the method should be executed just once. The next times the returned result will come out of the cache. I’m usually pulling this off with a custom annotation, AOP and EHCache.
I’ve got notes here.
PS. Does anybody in here knows a nice, old-looking, WordPress theme ? I’ve tried loads…
An application with compilation errors can run in Netbeans. As long as the faulty classes are not used I presume.
In that effect Netbeans asks you to run anyway.
Maybe this dialog gets annoying when this happens frequently. You might get tempted to check “Always run without asking”. Be very careful with that because there’s nowhere else to uncheck it. I might be wrong, but I have the impression this sometimes also messes up other classes too. I frequently had to clean the Maven project before running a test all over again.
If by any change you happen to have checked the checkbox of the dialog, you’ll have to delete a file first. And for good measure quit Netbeans before that. If you remove the file
.netbeans/7.0/config/Preferences/org/netbeans/modules/java/source/BuildArtifactMapperImpl.properties
Why didn’t I thought about that earlier ? SILLY ME ! 🙂
Looks like Intellij on JDK7 is faster ? My Maven build surely does !.
http://teamsys.intellij.net/issue/IDEA-56674?query=%23issues