Introduction

There are zillions (literally) of Java enterprise applications that are candidates for being repurposed to provide benefit to mobile users. This is first of a multi-part series where we walk through the process of creating a mobile app for one of the most popular Java enterprise (JEE) applications, the Petstore application. We have dubbed the mobile application Mobile-Petstore, and it will provide browsing of the petstore’s catalog of exotic and classic animals. We will build Mobile-Petstore as an HTML5 application for iOS and Android devices. Following is the Petstore web user-interface (top) and a mobile user-interface mockup running on an iPhone5 and a Nexus S Android phone (bottom).

About the Petstore JEE Application

The Petstore application was developed by Sun (now Oracle) and first appeared in 2000 as a  demonstration of key Java enterprise technologies and design patterns. (Many of us old enough to remember it will recall those painful days of suffering with EJB1.) It was updated around 2007 to use the latest JavaEE 5 technologies of that time. If you Google for the app, you will find it is no longer supported by Oracle. For this article we are using a new implementation of Petstore named Yet Another Petstore (YAP) from Antonio Gonclaves.

HTML5 Applications - What’s the big deal?

Our plan is to build Mobile-Petstore as an HTML5 application for iOS and Android devices. If you are unfamiliar with HTML5 applications (a.k.a., hybrid apps), they are HTML5 webapps packaged as native apps. When the app is launched on a device such as an iPhone, the app starts up an integrated browser that loads the app’s HTML5 web user interface as if it were native. This simple approach has the benefit of being cross-platform capable (write-once, deploy anywhere) and very affordable to develop because it requires only basic web programming skills.


We will use open-source Apache Cordova SDK (PhoneGap), as it has become the  HTML5 app runtime de facto standard and has been ported to run on iOS, Android, Windows 7 Mobile & 8, Blackberry, and less popular platforms. Cordova also provides a cross-platform JavaScript API through with the app can access key sensors and services of the mobile platform.

About Tools and Services

We will be using the latest version of MyEclipse IDE (MyEclipse ver. 2013) for development. MyEclipse 2013 includes cross-platform mobile and HTML5 development tools, which work great with JEE 6 apps like the Petstore. Specifically, we will make heavy use of MyEclipse App Center Builder, a cloud-based service for building native iOS and Android apps.

The user interface will be implemented using the JQuery Mobile HTML5 user interface library and the Knockout.js model-view library (more about this later). Mobile-PetStore will interact with the REST web service implemented by JEE6 PetStore application. The PetStore JEE 6 application is deployed to the Glassfish 3 server using the Apache Derby database for storage. We will say more about the PetStore implementation in a future article.

Next Steps

In Part-2 we will talk about the user experience and outline the REST web service APIs we plan to use.

Related Posts

Beware of Software Scams Even though imitation might be the best form of flattery, we are Genuitec, LLC, not Genuitec, Inc. Someone is using our name and old logo to run a number of scams, including real estate transactions and software sales, with the clear intent to hide behind Genuitec’s good name. We are, however, already taking action to demand an immediate cease and ...
Take a deep breath — Eclipse Oxygen is here! We can all breathe a little easier now that Eclipse Oxygen has arrived! And just like the last Eclipse release (remember Neon?), this is a biggie!83 projects287 committers71 million lines of code664 contributorsOur development team is ecstatic about all Oxygen has to offer. When Ignacio Moreno (our SDC Product Manager) was asked to give a favorite,...
Genuitec Went Virtual Before It Was Cool! Home is where the… work is? Indeed! More and more companies are choosing the online world, and we are no exception. Why be tied to an office if your job can literally accompany you wherever you go? That is the case for developers who can be working peacefully in the comfort of their homes or any other location of their choice. That is definitely th...
Day 1 – Learning Angular + Node.js as a Java... Day 1 -- Kicking the tires...Disclaimer: I’m not an Angular guru - as the title says, this is my journey to learning Angular and Node.js, and I’ll be sharing my experiences along the way. My Java developer’s world was recently rocked -- I discovered the powers of coding with Angular (frontend) and Node.js (backend). Everybody is talking about Angu...

Posted on Apr 23rd 2013