Lightweight application development – the server side java symposium

This session is a live demo of developing an app quickly. Kind of like the Ruby on Rails “see i can develop an app in 15 minutes so long as it fits my extremely fitting scenario”. It was an informative and humorous/domain specific (casino) example. And I was pleasantly surprised that it didn’t trivialize the amount of work required. It was obviously a hello world type example and not intended you have a complete application in an hour. And the humor made it a great way to end the day.

The demo uses NetBeans because the speaker doesn’t want to install plugins, jab at Eclipse.

Since this was largely demo, comments are light, but here are some points:

  • Recommends using CDI instead of managed beans
  • Noted larger projects take a few seconds to rebuild/redeploy via maven
  • The interceptors and beans look so much like Spring and just as easy. I[ don’t see why you would switch back to ejb and know oracle plans to stay behind the curve]
  • Have a bean.xml even if empty so server doesn’t need to scan the whole project, just the cdi jars
  • I like that he included a custom annotation
  • In jee, an ejb can be a restful service
  • Avoids interfaces, only uses when really variation [what about testing?]

The speaker feels you should use Spring with an older JEE technology, but not JEE 6 because redundant. [you would still be deploying to jee 6 even if you aren’t using it though]

Glass fish and JEE 6 keynote at the server side java symposium

Oracle’s first slide is a TEN LINE disclaimer from their legal department.  Which must be standard because nothing was forward looking.

JEE 6

  • Split  sub platforms so less large
  • JEE web profile
  • New: managed beans, bean validation, CDI (dependency injection)
  • ejb 3.1 lite lets you use ejb in a war file
  • Ear files are now for backward compatibility
  • Encouraged use of setting up everything in annotations instead of web.xmk [I think somethings belong eternalized]
  • Putting a web-fragment.xml file inside your meta-inf directory lets jars contribute content to the web.xml
  • Can promote a managed bean to a “real ejb” to take advantage of transactions
  • Showed response builders for web services. Nice concise way if setting status, content type, result, etc.
  • Ejb 3.1 supports singleton and start up beans. Can set scheduled tasks and asynchronous tasks in annotations as well.
  • Going to great lengths to avoid mentioning Spring,  Guice was cited as the comparison/example of dependency injection. Speaking of Spring, this is the first time I’ve seen this much JEE 6 code. It looks a lot like Spring.

Glassfish

  • Web profile ships with REST
  • Glassfish is wonderful because Oracle says so. Not taking further notes on this. Do people really use Glassfish in production?