All entries for July 2005
July 21, 2005
There's been a "what advantages does JSF have over Struts" thread on the MyFaces list in the last couple of days so I thought I'd put together a summary.
- Fewer and less verbose config files
- Automatic type conversion of bean elements (not forced to use String)
- Bi-directional conversion between browser info and bean info, not just decoding
- Validation and conversion are more robust, re-usable and extensible
- Large and rapidly growing set of UI components – richer and more reliable UI
- UI components are more reusable
- Using standard (JEE) components maximises ability to hire developers who will understand them and is thus a safer choice (in the long run, presumably)
- Better tools are available
- Allows RAD (by building view first)
- Lifecycle events are standardised and extensible
- Eliminates all logic in JSPs
- Dependency injection is considered best practice these days
- JSF's bean injection virtually eliminates the need to directly access the Session and Request objects, reducing coupling and increasing reliability
- Rendering is decoupled from the view, so can use JSF for rendering to mobile devices
- Cleaner MVC model – is an ActionForm part of the controller (action) or view (form)?
- More flexible navigation because navigation rules are decoupled from actions
- Less coupling to the framework in general
The last point was only touched on briefly somewhere, but for me it's one of the key points. My view (since JSF 1.0 came out) is that the JSF framework is cleaner and does more of the dirty work for you, but the lack of coupling means more of your application to be written as POJOs – the same advantage as technologies like JDO and Spring.
July 01, 2005
James Gosling's keynote
More a collection of demos than a keynote. Included some Netbeans stuff, the Boeing drone piloted by real-time Java and the Bay Area sea sensor net. John Gage also demoed a GUI that moved apps (threads, stack and all) from a PC to a mac, and miniature ARM devices with wireless and motion sensors that let him "pour" an app from one to the other.
Built somewhat on the demos and Sun's motto since inception that "the network is the computer". Computing devices are getting everywhere, and the limitations on Moore's law will see a trend to multicore devices. The future is in collaborative applications that can move among devices, the huge computing power probably being employed for VR and biocomputing.
Writing secure web apps
Added very little to yesterday's session other than plenty of examples.
Beyond blogging: feed syndication with Java
A good overview of the protocols and Java tools from the architects of Roller, ROME and FeedParser. Why Atom is so much better than RSS and the atom protocol so much better than the blog-publishing XMLRPC protocols.
Extreme reuse in JSF
A good comparison of the advantages and disadvantages of JSP2 .tag files, tiles, webwork and Oracle ADF for re-using visual components with JSF.
The next impedance mismatch: POJOs to XML
ORM is now pretty well understood but OXM is younger. Some problems are shared but XML mapping has some problems of its own, especially around many-many mappings and where objects must be populated from a pre-existing schema. Need an OXM persistence manager to cope with situations like when the namespace is changed – don't want to redo the OXM from scratch.
End-to-end UI objects
Third talk I've been to this week suggesting that building UIs from objects (cf Spring) is the best way (since it's OOP) and looking for a Java solution. This talk from an embedded-UI guy where J2EE is too heavyweight anyway. Suggests composing UIs from object components corresponding to DOM objects, and storing session context in one thread per session (which sounds elegant; do any web containers do it this way?). Good for modelling page flows, good MVC, tiny footprint, bad for bookmarking, separating grahical design and changing rendering.