Thoughts on Thursday’s JavaOne events…
Well, thanks to missing the announced schedule change, I missed the VB in Java session. I will have to go back and check that one out online. The JAX-B session was good. It is really nice to see JAX-B finally not suck. Going back to my previous post on XML in Java, JAX-B 2 is a great half step there.
Another really interesting presentation was from Ronald Simmons, Sean Merritt and James Gammill on the ComputeCycles project. This is an attempt to build an on-demand grid computing solution for Java. The usual suspects make an appearance: JINI, JavaSpaces. It also uses Glassfish as the manager server and for codebase deployment. It is still a little feature thin, notably, IMHO, lacking prioritization, but it is a off to a great running start and would seem to have a smart and committed team.
The “Top Ten Ways to Botch an Enterprise Java Technology-Based Application” session was really good. A lot of it is stuff I suspect many of us have learned the hard way, but it was a nice coherent view and there are definitely a few insights to be gleaned.
The big After Dark party with the Mythbusters guys, fatal1ty and AC/DShe was there. Lines were long, room was crowed, but all in all it wasn’t bad for a corporate party.

Finally, It was the great Web Framework roundup night in the BOF sessions. The evening BOF sessions included Grails (Rail-ish in Groovy), RIFE and Trails. The differences were striking.
Grails is an impressive framework. It is generally based around automatic creation of scaffolding from Groovy objects that become Entity beans. There was a minor debate about the nature of its operation vs RoR and Hibernate. Funny, because as Graeme was giving the talk, Fleury and Gavin were in the back of the room.
The discussion centered around whether your domain objects, in this case, in Groovy, or your RDBMS should be the “starting point”. One questioner (sorry if you read this, I didn’t catch your name) made a point of noting that RoR using the DB as the base and mapping proceeds from the deltas. Grails uses Hibernates DDL tools to generate or modify a database based on the Groovy/Java objects.
Now, I have to sound off on this:
The database is authoritative.
Look people, we have a whole professional class devoted to knowing EXACTLY how the database optimizes things. Hibernate’s “Update” feature, while fine for green dev projects is a HORRIBLY bad idea on a production system. Especially one where you share access with legacy code (BTW, Chris Nelson from Trails at least acknowledged this up front, though his system is also based on Hibernate). Gavin shouted out in the middle of this that Hibernate Revenge(?) will reverse the DB, which is a valid point, however, the discussion at hand was in the scope of Grails.
RIFE is something that has always impressed me. It is a really good basic framework for rolling. The presentation also emphasised its flexibility — you can pick and choose which parts you want to use. It has its own templating system, and a “controller” level that, I think, encourages “considered harmful” programming. however. There is something impressive about the serious full-stack nature of the effort. While few of the decisions made represent what I would have done in similar circumstances, it reminds me of the few web frameworks I have put together in the course of many years in the professional services world. It is a bag of tricks derived from repetitive need, and I can’t hold anything against that.
Trails is, frankly, the most beatiful of all these. There is no “scaffolding” just a clever inspection layer that can look for your entity beans and instantly give you a CRUD app for them. For the fast and dirty, it is really ingenious. Moreover, I can’t help but think that using the new NB RE tool (which spits out JSF scaffolding that bites next to trails) to spit out your entity beans would make this about damned immediate to go to an app. It has a fairly good security model and — and let me go to a religous argument here — doesn’t generate code. I am still part of a school that thinks that if you are generating code, you are doing something wrong. Yes, I know the dynamic languages let you do MORE at runtime, but that is a bit arbitrary.
As an aside: I went to the “Dynamic Languages on the JVM” session today, and I still don’t see why providing a compiler-generated interface for all concrete objects so that they can get a Dynamic Proxy associated with them doesn’t solve at least half this problem… but whatever.
RIFE, of course, has it’s own templating, but to its credit, it is replaceable. Trails is closely tied to Tapestry and Grails brings us GSP, a retread solution to a problem we don’t want. Of these options, RIFE is definitely the winner, but it is really hard for me do dis the code elegance of Trails.
The worst part is, all of these and Seam next to the old standbys of WebWork and Struts, I still don’t see anything that makes me think it is “the” answer to the J(2)EE problem. Scalability matters, and they just don’t seem to have it quite right yet. While they all take different tacts, and each has a single spotlight feature or two, none seems to have it altogether, and I guess the real question is, how much can you take “architecture” out of the mix and still get something that is truely scalable. Moreover, how do you get a nice app with minimal… trash.


Thanks for your writeup.
Can you please explain what you mean when you say that RIFE "encourages 'considered harmful' programming". This is a rather strong statement to put out without being specific. Also, let me correct that RIFE is hardly "a bag of tricks derived from repetitive need". Everything has been carefully designed and of course, some parts grew incrementally over the 5 year development period, but nothing is done as a quick trick.
Best regards,
Geert
>Can you please explain what you mean when you say that RIFE "encourages 'considered harmful' programming". This is a rather strong statement to put out without being specific.
Well, but this I mean it is really easily to get your business logic, output logic and controller logic all mixed up in the same class. As "ugly" as Struts may be, for instance, there is a veru clear separation, and even then you still end up with a lot of people putting what is definably business logic into Action classes. While I appreciate the goal of the templating system, having things like block repetition inside what I would view as the "controller" layer is a bit dangerous.
I certainly don't mean anything derrogatory by "bag of tricks" either. By that I simply mean a collection of invididual components targeted at a specific goal.
Hi,
indeed, we encourage the controller logic and the view logic to be inside the same element (which is in any way totally web related). It's then up to the team to have a direction for the business logic. Either you externalize that or keep it inside. This is probably related to the size of the project and whether is actually makes sense to have a separated business logic (in practice for many small to medium sized projects it doesn't).
As you said, it's almost impossible to keep those from being mixed, even with clear separations. We thus opted to make 100% sure that the templates are logic-less so that they can easily be replaced. This makes your web components much more easy to reuse in different contexts.
I'm still not so certain that I understand where you get the impression that RIFE is targeted at one specific goal. It really aims to provide a general purpose framework with answers to most of the things you're need during the development. Of course, they are our answers and as with any framework we have strong points and weaker points. I don't see however why RIFE is more "targeted towards a specific goal" than any other web framework out there.
Best regards,
Geert
>I'm still not so certain that I understand where you get the impression that RIFE is targeted at one specific goal. It really aims to provide a general purpose framework with answers to most of the things you're need during the development.
Not so much the framework, but the fact that there are individual components that are, for lack of a better term, single purpose that can be used invididually without heartache. Again, I am not using that as a negative. Indeed, I see that as a strength: if you decide one part of RIFE is no longer fitting your needs, it is easy to move away from it without replacing your entire application stack.
As to the code mingling, there is definitely decisions to be made there. I have opinions on it, but I am certainly not the difinitive word on the topic. I guess in terms of RIFE, I am not sure how much separating, for instance, iterator logic from the templates really buys you. If I wanted to change the template to, for instance, make a table vertically in stead of horizontally, I would have to go in and rework the Java code anyway.
While I am not in the world of the "professional services/web shop" anymore, I can appreciate that RIFE's templates are, shall we say, "Dreamweaver-guy friendly", which I think has a lot of selling potential on its own. One of the things I always felt was "wrong" with JSF is that while the component model is not horrible, you can't take Joe Graphic Designer and put him in front of JSC or NetBeans and have him be happy with his results. RIFE may be the only one of the frameworks that really goes after that problem with a clear solution. However, in the world in which I play now, it seems like a less clear fit. The web framework stuff is DEFINITELY not a one size fits all world right now, though I wish it would tighten up a bit more.
If you want to see some photos of AC/DShe, check out my music review site:
AC/DShe - Photos from JavaOne 2006 in San Francisco
Enjoy,
Pete
Thanks very much for the nice comments about Trails.
One minor clarification: while Trails makes use of the JSR 220 persistence annotations of EJB3, it does not require you to have your POJOs actually be Entity Beans. All the interaction Trails does with Hibernate are through Spring and not through a JPA EntityManager. I am not in fact using an EJB container for any of the the work I do in Trails. For those of us who are a bit "container shy" this is worth mentioning.
--Chris