Monday, I had the opportunity to speak at OpenCloudConf in Sunnyvale California. I spoke about the new AeroGear project at Red Hat, of which I am a team member, and how we are developing mobile web apps and hybrid apps for JBoss AS7 and how the cloud, in specific OpenShift, play a role in that effort. This post is a brief summary of that talk for those who couldn’t make it to OpenCloudConf, those that were there but may have gone to another workshop at the same time or those that are just interested in mobile development and OpenShift.
In my talk, I gave a quick intro about the AeroGear project. Basically, AeroGear is all about making mobile development as quick and easy as possible on JBoss through community, education and innovation by creating examples and tutorials for people to use and getting feedback from users on what would make mobile development on JBoss easier for them. After that, I did a quick run-through on the tools and technologies we are currently using, a few of which include JBoss AS7, JBoss Tools, RestEasy, jQuery/jQuery Mobile and Apache Cordova. That was pretty much the extent of my slides because I wanted to dive straight into an example application and look at some of the code and techniques we use to mix mobile and cloud technologies.
The first example I did was to quickly run through the AeroGear kitchensink quickstart. Many of the JBoss projects have what we call quickstarts which are a way to quickly get up and running with the particular technology that project is using, building and supporting. Using the steps described in our Get Started with HTML5 Mobile Web Development with JBoss wiki article, I was able to show attendees how to generate a new project in JBoss Tools from our Maven archetype, start up JBoss AS7 locally on their computer and then deploy that generated project to the server and see it up and running in just a few minutes. We then walked through some of the cool features of that web app including its dual desktop/mobile features and how we use some responsive design techniques and jQuery Mobile to make that possible.
From there, we walked through how to deploy this project to OpenShift. For those who don’t know, OpenShift is Red Hat’s free, auto-scaling Platform as a Service (PaaS) for applications. As an application platform in the cloud, OpenShift manages the stack so you can focus on your code. With OpenShift, we can easily deploy our project to the cloud and have it available to the world in just minutes. And with JBoss Tools, it’s even easier because the ability to create and deploy a project to OpenShift is done in just a few clicks. You can get more information about that process in our wiki article titled Converting an AeroGear POH5 Web App to a Hybrid App with Apache Cordova.
The final example was more mobile focused. My last blog post, A Trip Through Cordova, talked about how I took our quickstart and converted it to a hybrid application using Apache Cordova. In that app, I added a very simple bit of code to display the network connection status of the device just to show that we actually had access to native device APIs. What I wanted to do for this workshop was to take that a step further and do a little bit deeper device integration and somehow tie that back to the cloud. What I decided to do was to integrate the device contacts with the member list that was being displayed and updated in the quickstart. I provided both the ability to add a member from the list to the devices contacts, as well as, populate the member registration form with information from a contact in their devices list of contacts. And because the hybrid app still uses the OpenShift hosted version for its data store, anyone who installed the app or used the web based app would have their member lists always stay in sync.
Overall, attendees seemed to enjoy the presentation and hopefully learned a little bit about how to go mobile with JBoss and OpenShift. The few slides I used for this presentation are available on my website and all of the code for the examples I presented are available at the following links:
- AeroGear Kitchensink Quickstart
- Kitchensink Cordova
One final important note. The OpenShift team announced the release of OpenShift Origin, the source behind OpenShift. This is really exciting and gives you the chance to see how OpenShift works and even implement your own PaaS if you want so definitely check it out!