Five Habits of Highly Profitable Software Developers – java.net

Robert Miller has an interesting and useful article on java.net today that lists and describes 5 habits/guidelines for developing effective Java code.

The list is not earth shattering, and I’ve worked with variations of these guidelines both as a developer and as an architect defining guidelines/code standards for a project, but if you haven’t come across these ideas before then they certainly can help towards creating simpler, easier to maintain and understand code.

Closures coming to Java 1.7?

Gilad Bracha, Neal Gafter, James Gosling and Peter von der Ah√© have written a proposal to include ‘closures’, a feature common in dynamic languages, in the Java 1.7 release.

Closures allow you to refer to blocks of code as a variable and pass references to them between methods.

Read more in Dejan Bosanac’s blog here.

Should Sun’s Java open source effort merge with Apache Harmony?

TheServerSide.com has some interesting comments this morning on an article published on uk.builder.com about whether Sun should merge it’s open sourcing of Java with the Apache Harmony project.

The issue Sun has to resolve right now is that parts of the Java platform it is about to open source were contributed by other third parties and it does not have the legal right to change the existing license and open source the code. Presumably between now and when it open sources the code, Sun must rewrite these parts of the code so that it is legal able to change the license.

Since the Apache Harmony project to develop an open source Java compiler and runtime is already well under way and the fact that they have written their version from scratch to be ‘bug-compatible’ with Sun’s version, would this be an attractive codebase that Sun could leverage instead of having to rewrite the pieces that they do not own?

Learning JSF from scratch – best articles and resources

I’ve been looking around for JSF Tutorial resources and books to get up to speed with JSF. There are a number of articles on sites, but the majority are tied to wizard-based approaches in various IDEs – the problem with these is once you’ve clicked through the wizards and generated the code you realy are stilll none the wiser – what does the generated code do? (One of the most impressive wizards has to be the Netbeans 5.5 wizard – JSF Pages from Entities, which generates JSP pages and Controllers from EJB3.0 Entity beans, which can also be generated from a database schema – very impressive).

I know the point of JSF is that it is intended to be used in conjunction with an IDE to paint the components on your pages etc, but I like to have a deeper understanding of what is going on under the covers.

The best tutorial resource I’ve found so far is this tutorial on the Exadel site. Exadel have a fullfeatured Java IDE, but this tutorial can be followed without the need for using their (or any) IDE to generate any code. The article is in two parts – firstly it covers a brief into to JSF, then walks you through a simple 2 page JSF app, using Managed Beans. The second part of the app introduces validation in JSF. It’s a shame the tutorial does not go any further than this as it is very well written and easy to follow (without a lot of the fluff in some other tutorials).

I’ll be adding some additional resources here in the next couple of weeks.