I've finished reading the
Jmatter book and I've been itching to talk about it. I've said before that one of the reasons that I wanted to
Desktop Matters was to reconnect with Swing development and learn from the desktop experts tips and techniques that may be useful in web land (because it so happens that I
now work for one). Earlier this year I also said that what was lacking on the Swing development front was a framework that leads the revolution much like Struts did seven years ago with web development (a couple of days later Hans posted info on an early implementation of JSR296, the Swing Application Framework, go figure).
Back to DM, 3 frameworks were presented (in this same order):
JS3296 Swing Application Framework: it has many interesting things like the Resource and Action Managers, support for basic views and eventually data binding with JSR295 (BeansBinding). Spring Rich Client: has the feeling of the Spring framework in it, (in term of design), bindings to common layout and widget libraries (JGoodies, Swinglabs, JIDE). JMatter: a framework that lets the developer concentrate on the domain and leaves the burden of UI and binding to its internals.
The way these 3 frameworks were introduced to the audience was very clever (good job Ben) because as presentations went you could see how each was in an upper lever of abstraction as the previous one. SAF will only focus on common tasks of Swing app development (launching, UI resource management, action binding, simple life cycle), Spring RC adds support for view management, several alternatives for view building, and tight integration with all the stuff that Spring provides and you've come to love. Finally we have JMatter which has all of many of the previous features but it increases productivity by a tenfold, because the developer is free to work on domain problems and does not have to work with the "Swing tangle".
Comparing Spring RC with JMatter is like trying to compare Struts with Grails (or AppFuse if you are a Java only dev), Struts lets you micromanage every aspect of your app but at the same time requires a lot of configuration files; Grails in the other hand, lets you do everything you do with Struts but with less configuration (because of the CoC paradigm) and adds up a stack for persisting your domain, calling services from "Actions" and other goodies.
Spring RCP lets configure every aspect of your app too, ending in tons of xml code to be written (even if the new schema syntax sugar is added into the mix) and you'll still have to code a lot. Let's say you want a simple CRUD-like application for 3 domain classes, you'll have to come up with following (at least):
code 3 domain classes Mappings for your persistence strategy (xdoclet is very handy with Hibernate) if you follow the anemic domain strategy, at least 3 service classes Either 4 views for each domain class or a generic solution for each CRUD operation. Configure everything with xml or another mean. And the tests? surelly you'll code tests for domain classes, services and maybe some of your view helpers.
With Jmatter you have to:
code 3 domain classes Configure your database (optional) you may create tests for the domain classes but they're not really needed.
See the difference? JMatter provides you with everything you need and more! did I mention that
it includes a login mechanism it lets you query the domain classes at your leisure save, list and manage those queries query log events (everything done in your app is monitored by default)
And there is more to come in the next months.
This means that Spring RC is doomed to fall behind JMatter as Struts is now behind the other web frameworks? not really, In my opinion it will help laying out the ground for Swing frameworks, it'll teach the new generation how to design and develop Swing apps from thin air, each layer at a time, but as those developers start requiring a higher level of abstraction they'll come up with their own solution. Well there is no need for that, JMatter is here. Now. And it will become easier to use with every release.
So if you're a web developer coming from the Grails/Rails camp and suddenly have to work in the desktop, give Jmatter a look, you'll see a lot of common things; if you're a Swing developer tired of doing the same things over and over, give it a look, you'll not be disappointed. And if you see something you don't like or an opportunity for improvement or discover a bug, please drop a line to the JMatter team, they'll surely appreciate all the feedback!.
PD: the intention of this post is in no way to bash on SAF and Spring RC, kudos to Hans and his team, and to the Spring RC team too, terrific work so far.
jmatter swing