1 Reply Latest reply: Feb 9, 2012 10:00 AM by Kris Borchers RSS

New Multi-Client Example For AeroGear

Jay Balunas Master

Now that I'm over the flu, or whatever it was that tore me up earlier this week, I finally have the time to post about our next example idea.  The JBoss AS quickstart was just the beginning, and to be honest a fairly modest one (although being a quickstart I think that is fine).

 

We wanted to create a more complete, and detailed example that anyone can build a true enterprise application from.  Not only a a great starting point, but also a showcase for handling common enterprise concerns across clients.  The trick is making an example that is easy enough to consume, while showing the recommended ways of handling complex enterprise concerns like security, and local storage.  Here are some initial thoughts for it.

The Core Services

  • Support full CRUD
    • Quickstart was really just "C"
  • More advanced entity model
    • At least two entities with complex relationships
    • Likely supporting the concepts of user/groups
      • Full application based security, access for services, and views to follow
  • JAX-RS services
    • JSON/XML support
    • Support bean validation

 

The Client Options

One of the main goals of this application will be to showcase multiple client types, and support based on a single backend.  We also want to make sure the UI's have great styling and showcase some of the power of the clients.  Here are some of the thoughts:

 

  • Desktop/ Mobile Web / POH5
    • jQuery Mobile + others
      • Similar to the quickstart, but vastly updated UI
    • Backbone, Zepto, etc...
      • Alternative approach, and good to showcase differences
  • Desktop / Mobile Web / Other
    • TorqueBox/Ruby based client with client side libraries as needed
    • RichFaces/JSF based client
    • Errai/Gwt based client
  • Hybrid
    • Apache Cordova
      • Take best of compatible mobile web approaches and convert to Apache Cordova example
      • Minimum of iOS, and Android support, WP would be good too
    • Appcelerator
      • TBD
  • Native
    • TBD

 

Project Structure

The project structure must be flexible enough to allow for a separate service layer, and multiple clients.  Using maven as our base a structure like the one below will be used at first.  However this may not work for all clients, so we'll have to be open to change.

 

/services
  /jax-rs
  /core
/clients
  /poh5-jq
  /poh5-alt
  /richfaces
  /cordova
    /ios
    /android
    /www
  /etc...

 

Futures & Thoughts

Other options once we get a good core example in place would include:

 

  • Offline/Local storage support
  • PhoneGap build integration
  • Automatic openshift deployment through CI
  • More advanced workflows
    • Likely better for a follow-on demo
  • TBD, but the sky's the limit

 

We also need to make sure that any updates follow our coding standards, and practices as outlined Contributing To AeroGear

 

If anyone has any comments, thoughts, etc... please speak up!!  I think this example will be an important showcase moving forward, and will provide us a great deal of flexibility, and a great starting point for anyone wanting to write their own enterprise based application.

  • 1. Re: New Multi-Client Example For AeroGear
    Kris Borchers Newbie

    I think it might also be a good idea / nice to have a build process for the Desktop/Mobile Web/POH5 clients. Though it is still in beta, Grunt looks really promising. It provides the ability to validate, concatenate, and minify your JS files as well as run unit tests. All of these things can be configured in a single config file and run from the command line, so they may even be able to be triggered from JBoss Tools (though I'll admit that isn't my area of expertise). You can also even tell Grunt to watch certain files and run those same tools whenever that file changes so it's pretty cool. One drawback though is that it runs on Node.js so that would have to be installed on the developer's machine but I think it could be a great tool.

     

    There are other tools out there like Jake, Rake, etc. that may be good to look into as well but just thought I would throw that out there.