Quantcast
Channel: Code:Q
Viewing all articles
Browse latest Browse all 50

JavaOne day two, part 1

$
0
0


Thomas Kurian talked about Oracles products during the Wednesday morning session. He pushed Oracles Ajax library, built with JSF. He described The Next Application Platform, comprising seven layers! I like flexible designs and architectures, but this is rediculous! When was YAGNI thrown away from common consciousness?

They announced that they've donated their EJB 3.0 reference implementation to project GlassFish. Now, what would they do with it? Doesn't the GlassFish guys have one already?

Next up was a demo of some EJB 3.0 POJO programming. What was new was perhaps that they have some support for inserting annotations such as @OneToMany into the code. Useful, I guess, before you're feeling totally comfortable with these annotations. After a while I assume you'll prefer to do it manually. To their credit I must say the demo they showed off was well done in that they started from the POJO/Entity level and then moved upwards, adding a business BPEL level (with boxes and arrows and that stuff we so successfully tried and embraced in the late 80s). BEA has had this for a year or so, but perhaps more players in this area will make it all take off. I will not hold my breath.

Next step in the demo was, of course, to show a shopping application using Ajax. What they demoed was a different application from what they started with, which in a way means that the bottom layers are getting easier and easier to do, while the top layers are getting more and more complex (they couldn't do that code during a keynote session). I mean, there are products out there now that can generate your whole POJO/DAO layer from your database tables, but there are no such tool for our Ajax UI tier.

I then attended Gavin Kings presentation of Seam, which builds on top of JSF 1.2. He recommends us all using Facelets instead of JSP as the base under JSF. I really must look into Facelets. It came in under my radar, which is kind of embarrassing. He also mentioned Managed Beans, which seems to be JavaBeans with dependency injection. Ugh, that JSR slipped in under my radar too. Anyway, he then started off with a simple Document table and a POJO Document Entity class representing rows in that table. Then off to a simple Facelets search page where you'd type in an id for a row in the table, and then mapping that to a function for getting that row. Then he showed a Stateless session bean using a typical EntityManager to find it. He then went off showing a DocumentEditor class which held that Document POJO object and a Long document ID (what was it used for?), then get/set functions using the previously presented DAO class for CRUD to the DB. He then declared that DocumentEditor as a Managed Bean in an XML document. He claimed this was much simpler, powerful and testable compared to previous J2EE frameworks. Hm... mumbling (not me, Gavin did).

Anyway, he claimed that that Managed Bean was unnecessary - didn't add any functionality, only glue code. He also correctly pointed out that the navigation rules were weakly defined. So, here is the ideas behind Seam:
  • Unify Java EE 5 and JSF
  • Integrate jBPM
  • Make it possible to run in Tomcat, or TestNG
He then reintroduced the EditDocumentBean adding a Name("documentEditor") annotation on the class, and a @Begin and @End annotation to the get() and save() functions, respectively, that creates a "conversation". He then went off on a demo, mumbling and humming a lot. Talkin fast is fine, being incoherent is not. I kind of zoned out for some time until he did say something interesting, namely a problem with dependency injection, namely that it only goes one way, into the object. What if you have a stateful session bean with which you can edit a Document object, then that Document can be inserted into the session bean, but not reverse-inject it when you're done with editing that Document object. He used the word "bijection" for this. Don't know if he coined the term himself, or stole it from somewhere. Seems quite useful, but his jab at Spring for not being able to handle this was rather unnecessary.

All in all pretty interesting. No mention of Ajax, which in some ways was nice, but it also leaves you wondering how well they're going to be able to create websites using Ajax.

I then attended The SOA Programming Model held by four guys from IBM, BEA, SAP and Oracle (a pretty heavy group of companies). They are all members of the SCA Collaboration Team at www.osoa.org. Darn, these guys have been flying under my radar too.

He stated a number of principles of SOA, where "Services are stateless" struck me as odd. Yes, statelessness are simpler, but that doesn't mean we can live without stateful services, no?

In general, the session was too abstract to me. Mostly boxes and arrows. This whole SOA/SCA architecture is doing its best to stay technology independent, so that services in other languages can be used. But if that is the case, why not just create a simple web service interface to those legacy services, bind them to Java classes with wsdl2java or similar tools, and access them from Java? I mean, Java is the best language to use for wiring services, except for joins, perhaps, but that can certainly be solved. Using these SOA/SCA stacks seems like far too much abstraction. It will make things slow and complex. I must say I'm really sceptical to this whole enchilada.

Next up was Java Technology Techniques for Developing AJAX Applications held by two guys from Google. They've decided to create a framework with which you can create Ajax applications in Java, and then generate the JavaScript Ajax application when you're done. You can use much of the Java standard libraries, and all these calls will then be translaed to JavaScript on the server! They used Eclipse while demoing this, but it is in no way tied to that IDE, thank heaven. Some details:
  • Session state? All client, not a server issue
  • UI event handling? All client, no round trips
  • Deplyment? No fancy server, just compiled JavaScript-based code
  • You get static type checking
  • You can share Ajax libraries as JARs
  • They have full support for the back button and bookmarks!
The whole thing is released as open source. Some of the demos they showed were very impressive. I'd say Zimbra will get their butts badly kicked in the future, because I think this is a much better framework. I believe this session showed something that will wreak havoc in the Ajax world, as well as the web devloping world in general. I'm glad I was there. Roaring applauses after the session.

After the session, during the QA, I talked to Joe Walker, the creator of DWR, and we were equally impressed. They probably had no Comet/Reverse Ajax support, and if they had adressed accessability problems is unclear. Except for these things, this might be a total killer.

After that I attended Extending EJB 3.0 With Interceptors held by Bill Burke, architect at JBoss. I had attention problems during this session, since I was ruminating the previous Google session. Anyway, Burke mainly talked about EJB 3.0 @AroundInvoke, which I knew about since before. Poor mans AOP, but probably good enough for 95% of all cases.


Viewing all articles
Browse latest Browse all 50

Trending Articles