TSSJS DAY 2: GWT Flex Smackdown

Mostly listened to this session and was entertained by the banter between James and Matt.  Here’s some tips and selection process that they concluded with.

RIA Tips

  • Don’t load everything on the first page load
  • Slower machines can mean slower clients…know your users
  • Don’t use for sites…use applications
  • Be aware of the file size of the resulting artifact.  They can get pretty big.
  • Work with designers that know how to create RIA (or desktop) clients…not Web apps!

How to choose an RIA framework?

  • Prioritize a list of features that are important to the application
  • Pick 3-4 frameworks and do a 1-week spike for each, deploying the same application
  • Document and rank each framework against the list of features
  • Calculate and choose!
  • GWT is a good alternative for Java developers without a lot of Web development experience (JS/CSS)

TSSJS DAY 2: Java and Flex

Sitting in on James Ward talk on Java and Flex. James shows a great Flex app for accident report.  Instead of prose, he shows it graphically.  This is his lead-in to RIA apps as a more compelling option to traditional Web app development.

Flex builder IDE is used to develop in two types of languages: ActionScript and MXML.  The former was JS-based but now is more OOP-based like Java.  The latter is more like XML to do declarative programmer to instantiate objects and set properties.  You don’t necessarily have to use the latter.  The resulting artifact of the code is a SWF file that runs on the Web server.  Alternatively, you can also deploy to the desktop runtime called AIR.

Flex can use a number of protocols to interact with the app server as SOAP, HTTP/S, AMF/S, and RTMP/S.  Use BlazeDS or TC services to access Java services.  AMF/S is extremely optimized!

Tour de Flex has over 400 samples that you can copy-n-paste code into your own projects.  Great samples for several types of controls, data access, AIR capabilities, etc. He showed a nice map tool that allows you to see who’s using Tour de Flex currently…pretty cool!

James showed an example of using simple HTTP data services into a data grid…seems pretty straightforward.  Next, we showed an example of calling a Web service…just change a few things to switch over.

Checking out his census site.  Pretty cool site to show where the long pole is when returning a large data set and demos of different transfer types, especially AMF to reduce time.

BlazeDS you add some libraries, map a MessageBroker in the web.xml, set up the broker in the services-config.xml and in remoting-config.xml you set up a destination to configure everything.  In the front-end you just use a “RemoteOject” and define the endpoint and destination.  He bumped up the results from 200 to 20000 and got sub-second response!!  Spring BlazeDS makes it even easier using an annotation driven approach to hook-up to the service or any Spring bean.  GraniteDS and GAS are some other projects to look at.

Another option is you can use streaming to set up pub/sub style for async processing.  This can certainly hook into a JMS Adapter.  For offline, you can use local shared objects (large binary cookie) to store data, but AIR has a sqllite database as a better offline option.

In summary, it looks like you can create some really visually compelling web sites with little coding compared to some other frameworks I used in the Java EE world.  It will be interesting to invest some more time with this especially consider the amount of data I need to move around to the GUI for our customers.

TSSJS DAY 1: Rich Enterprise Applications with JavaFX

I sat in on Max Katz’s talk today on JavaFX.  I mostly been using ExtJS for RIA’s on some Flex, but coding in JS or ActionScript leaves something to be desired.  I haven’t seen JavaFX take hold really, but I’m interested in what it may offer.

JavaFX has a scripting language that uses a powerful DSL and the full power of Java to create the UI.  First example he demoed looked verbose and ugly…NOT very impressed thus far.

Flamigo is on open source connection tool to bootstrap RIA to back-end services from Spring, Seam, Java EE services and has an off-line option to hold data locally until you are connected to the network.  It has CRUD tools and server-side push.  Flamingo seems to help support CRUD ops and validation with the back-end from his demos.  It also manages conversation state where you can start a conversation and have it held in session until you end the conversation.

EL is another area he demonstrated that allows you to use a canonical expression (componentName.attribute) to show values in the GUI, but the call was verbose and ugly by his own admission.

For a talk that was supposed to be about RIA, there wasn’t much RIA involved at all.  The title should of been “How to use Flamigo for integrating your RIA with Java”.  Oh well, now I know.