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.

Two current ‘VHS vs Betamax’ tech battles – Bluray vs HD-DVD, and LCD vs Plasma

There are currently two very real consumer electronics battles going on right now that may be on the scale of ‘VHS vs Betamax’. For the next-gen hidef DVD formats we may have to wait some time before we find out who is the the VHS and who is the Betamax, but both formats offer capacity for HD content and both are becoming available this year. Bluray has the added benefit of being included in a ‘trojan horse’ that is coming into your family room later this year, as part of the $600 PS3 (remember that a freestanding Bluray player is currently going to set you back $1000).

The other battle is LCD verses Plasma. LCD screens until recently have not been available in the large sizes that Plasma has been available in. Plasma screens may have a shorter lifetime than LCD though, and may suffer from fading and ‘burn-in’ over time, which LCD does not. Read more in this article 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.