简体   繁体   中英

Developing Apps for iOS, Android and the Desktop

We have an existing distributed application used by a small company to manage their customers.

The server side component is deployed in the cloud as a simple Java app that manages a connection to a MySQL database.

The client side is implemented as a Java Swing application deployed using JNLP and communicates with the server side using RMI.

This has worked quite well for us so far, but recently we've been looking at how our customers could access the application from mobile devices, tablets (both iOS and Android) as well as from the desktop.

At the minute I'm thinking we should be looking into developing RESTful web services on the server side to manage access to the MySQL database. On the client side, we could use Googles GWT to provide a quick and easy solution for accessing the services from all platforms. Going forward we could implement native iOS / Android apps to access the web services.

Am I am the right track here? Does anyone have any better approaches? Does anyone have any recommendations as to what tools I should be looking at?

The key thing I am interested in is being able to access the server side from any platform. I really don't want to have to implement separate server side implementations for each

Sounds like you are on the right track with the RESTFul web services. If you go this route, you should be covered for the backend. As long as your frontend can do http requests and handle JSON data you will be fine.

Going forward we could implement native iOS / Android apps to access the web services.

It is possible to design a mobile app for deployment on both android and iOS, this could save time on the development effort. To do that you could use, for example PhoneGap, which creates an abstraction layer over the phone hardware, along with something like jQuery Mobile, in which the UI is developed in HTML5 and javascript, and the same code is deployed via PhoneGap on both devices.

PhoneGap: http://phonegap.com/

jQuery Mobile: http://jquerymobile.com/

if there is some other option that lets you deploy the same frontend on android, iOS, AND the desktop, i would go with that, so that you only have one code base for the frontend.

I think your solution (GWT/HTML5) client talking to a server-side "business" layer is a good multi-client solution. RESTful web services are unneccesary in the context of what you have described since the GWT implmentation would take care of the comms between client and server:

   GWT client <--->  Server (GWT) <---> Database

If you are using a different client implementation (such as iOS), then RESTful services will be very handy indeed (and you wouldn't use GWT):

  iOS client <--->  Server (RESTful endpoints)  <---> Database

HTML5 is becoming provides a decent compromise between broad applicability (many clients) and rich client features. I have seen an article in the past about using PhoneGap and GWT together which sounded like a good strategy for working with GWT (which I like) and gaining access to device-dependent capabilities. All whilst working in an environment where you can (Java-)debug even client code (incredibly useful GWT feature).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM