Sunday, February 17, 2013

Google Web Toolkit and Google App Engine With PhoneGap for Mobile Apps

Google Web Toolkit and Google App Engine With PhoneGap for Mobile Apps

To write Java EE server side code and Java client code that deploys to the cloud and serves thin, mobile and headless clients - I find Google Web Toolkit used within Eclipse that deploys to Google App Engine using a Google Cloud SQL instance works very well.  If you go one step further and package your client HTML5/JS client code using PhoneGap for iOS and Android then you have a full end to end solution.

The following diagram illustrates various start and end points when developing thin or mobile clients.

Options for generating native, thin and hybrid mobile clients


Sequence diagram for generating HTML5 based mobile apps from Java using GWT and PhoneGap

Getting Started

I am interested in getting the JPA 2.0 provider working in Google App Engine.  Unfortunately Google does not use the open source EclipseLink JPA 2.0 provider - instead it uses the DataNucleus provider.

There are a lot of differences and constraints on the JPA 2 provider - here are some of the highlights.

You must use the Key PK wrapper - which shares implementation with JDO

import com.google.appengine.api.datastore.Key
[0] Nutrient (id=164) id Key (id=169) jdoDetachedState null jdoFlags 1 jdoStateManager JDOStateManager (id=171) name "aName" (id=178)


Software

Eclipse 3.8/4.2 with DTP, GWT
Google Web Toolkit 2.5
Vaadin for GWT - use the Eclipse Plugin
Google App Engine
PhoneGap/Cordova 2.4

Google App Services

Google Datastore using the paxos algorithm:  

Links


Sunday, February 10, 2013

Blackberry 10 Development

Blackberry Z10 Development


20140720: Update: After 14 years using RIM devices from the 957,6700,8800,9000,bold and Q10 - I have retired using blackberrys - for the first time my Q10 keyboard has become defective - I officially move to full time iPhone 5s usage with Android 4.4 on the side.  The lack of support for clinical devices such as the hexoskin, muse and Bluetooth Smart based systems is also a factor.  The iOS 8 ecosystem is also easier to use.

RIM/Blackberry has done an excellent job bringing out Blackberry OS 10 and the Z10/Q10 devices (I have both) which I like better than the iPhone 4s except for the # of apps available ofcourse.  The Q10 device however has a darker and slightly inferior screen compared to the Z10 but the keyboard is excellent.

The following blog details steps in getting up and running developing natively, using PhonGap or porting over Android apps.

Development Environment

see https://developer.blackberry.com/ as of 20130210 the 10.1 beta is out.
Start by downloading both the Native API - Cascades for and Blackberry 10
Get the API's https://developer.blackberry.com/develop/platform_choice/index.html
Android 4.2 for Blackberry http://developer.blackberry.com/android/
Get the simulators https://developer.blackberry.com/develop/simulator/index.html

Before running a native C/C++ app on the Blackberry Z10 or Q10 you need to enable development mode and download .bar certificates to the devices - do this by selecting to generate a new debug key.

PhoneGap/HTML5


Android Emulation

Get the eclipse plugin for android porting http://developer.blackberry.com/android/documentation/install_plugin_prerequisites_1895476_11.html
Currently only Android 2.3.3 (API 10) is supported on the Blackberry.
Install the eclipse plugin for Blackberry / Android development tools (using jcommon-1.0.12.jar and kxml2-2.3.0.jar) https://developer.blackberry.com/android/downloads/eclipseplugin/.
To get around Unable to read repository at https://dl-ssl.google.com/android/eclipse/plugins/com.android.ide.eclipse.ddms_21.0.1.v201212060256-543035.jar.
try the install again
To get around the error after restarting eclipse

java.lang.RuntimeException: Application "org.eclipse.ui.ide.workbench" could not be found in the registry. The applications available are: org.eclipse.cdt.codan.core.application, org.eclipse.cdt.core.GeneratePDOM, org.eclipse.equinox.app.error, org.eclipse.equinox.p2.director, org.eclipse.equinox.p2.garbagecollector.application, org.eclipse.equinox.p2.publisher.InstallPublisher, org.eclipse.equinox.p2.publisher.EclipseGenerator, org.eclipse.equinox.p2.publisher.ProductPublisher, org.eclipse.equinox.p2.publisher.FeaturesAndBundlesPublisher, org.eclipse.equinox.p2.reconciler.application, org.eclipse.equinox.p2.repository.repo2runnable, org.eclipse.equinox.p2.repository.metadataverifier, org.eclipse.equinox.p2.artifact.repository.mirrorApplication, org.eclipse.equinox.p2.metadata.repository.mirrorApplication, org.eclipse.equinox.p2.updatesite.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.UpdateSitePublisher, org.eclipse.equinox.p2.publisher.CategoryPublisher, org.eclipse.ant.core.antRunner, org.eclipse.help.base.infocenterApplication, org.eclipse.help.base.helpApplication, org.eclipse.help.base.indexTool, org.eclipse.jdt.apt.core.aptBuild, org.eclipse.jdt.core.JavaCodeFormatter, org.eclipse.jdt.core.JavaIndexer.




Total Pageviews

Followers