Could the Google App Engine be used to drive a desktop application? - java

I have the impression that the Google App Engine allows an interface for developers to make use of Google's servers for storing custom application data in a highly scalable and cost effective way. Whilst working through their tutorials, it seems like tools are focused on aiding the development of 'web applications'.
I'm looking to take advantage of the GAE in order to serve data for a platform independent desktop application that I'm writing in Java, so my end product will not rest within the confines of a browser. Is this functionality supported by the GAE?

Yea! you can do that.
So basically, you are going to build a native application and use API calls to send/receive data from a server(GAE). I see a good solution will be to
Build your API endpoints using the Endpoints lib https://cloud.google.com/appengine/docs/java/endpoints
Then, depending on your application you can make API calls directly or build a client library

Related

Integrate my android application with existing POS(point of sale) system

Is it possible to integrate a third party app with the already available Point of Sale Systems present in retails/restaurants?
Do they expose their APIs or any such thing where I will be able to integrate my system with them. Any help would be appreciated.
No doubt, we can develop applications for them using Android. But, basically all the restaurants, retails don't use the same Software, that depends on them, which resource they are using. And we can't say whether they are exposing their API to develop the Android application or not. To make android application for those type of applications we need to talk with the application provider or we need to design our own API.

Can I use Google's Datastore for a desktop application?

I was asked to provide a quick and easy solution for storing data in Java, and since I had experience in working with Google App engine, I thought that I could just use their Google Cloud Datastore (https://developers.google.com/datastore/). But, the project that I'm working on now is a desktop application with a GUI. My question is, would I be able to use these services even though the application I'm developing isn't a web app, and uses Java's GUI components?
Yes you can. The Cloud Datastore gives you access to the normal App Engine Datastore but does not require you to be running a web app. You can then use all the normal Datastore tools that App Wngine provides to manage your data.
You'll want to follow these instructions for setting up your Cloud Datastore project to connect from your GUI app.
It depends. dev_appserver isn't a hardened environment, and simulating a deployed environment is a priority over performance. dev_appserver provides a simulated Datastore, not the real thing. That said, I've built several single-user, locally-served web apps using both the Java and Python dev_appservers, because it was a convenient way to get started and performed well enough for my purposes.
I don't see why not,
Not a java dude, but it says it exposes a HTTP interface, so this:
code.google.com/p/google-http-java-client/‎
should allow you to communicate with it I believe.
Also perhaps have a read of this question
Database for Google App Engine and desktop application

Android application development: java vs. jquery mobile

I'd like to build an android application for a school project but I'm a bit confused, I saw that i can build an application using Java or using Jquery mobile.
Do they have the same capabilities?
If i build an application using Jquery , can i pack it and have it installed like a java application (as apk) or is it only used for building websites?
If so, what tool do i use to pack it?
jQuery Mobile needs an intermediary framework that communicates between JavaScript and Java. PhoneGap is a popular one of these frameworks.
PhoneGap is also actively maintained and they roll out new versions almost every month.
The main reason to use PhoneGap/jQuery Mobile is that it makes development easy if you already know HTML/JS/CSS. Another great reason to use PhoneGap is that you can use your existing website as the base for native applications, yeah, plural, not just Android but also iOS, Blackberry, etc. It also gives you a pre-built UI with some widgets so you don't have to roll your own.
The jQuery Mobile documentation talks about some of the caveats to creating a native application with PhoneGap and jQuery Mobile.
I don't know what you have already tried or what your skill set is (based on your stackoverflow history you may know more about java than I do), but you would be best off just using the Android SDK. I was able to design and complete a custom business project and learn java while doing it. I can't comment much on jQuery since I've never used it. jQuery seems like it might be a nice for the reasons Jasper listed but might add layers of complexity you don't need to deal with if you don't need to run your app on other platforms.
Jquery Mobile Framework provides the way how you web application looks on different hand held devices simply but this can not use the native device capabilities like picking up an contact from the contact book/application. while native application has the capabilities to handle all the system generated events or broadcasts.

Alternatives of Google App Engine + Java

If I develop my web application on GAE using Java, in future would I have easy migration opportunities, or will I stuck to GAE?
What can be other alternatives of Google App Engine + Java?
Not:
An GAE you are pretty much developing inside a Google managed Container - against restricted Java and other APIs. This is the PaaS - Platform As A Service approach to cloud computing. This would be similar to the Salesforce, Facebook etc approach.
However for most flexibility you should look at IaaS - Infrastructure As A Service Cloud platforms (like Amazon/Rackspace/etc..) where you have most flexibility.
We currently use both Rackspace and Amazon and have machines as our elastic containers on top of which we can deploy anything we want (custom Ubuntu image etc..)
With some care, you can write a Java app such that it will work both on and off App Engine. A better option, though, would be to use AppScale if you choose to leave App Engine. AppScale provides an App Engine compatible environment on your own hardware.
right now most viable competitor of GAE is Windows Azure. You can easily build a site/application in Azure without getting dependent on Azure framework. There is /very/ little from Azure APIs that you have to deal with(mostly for diagnostics). If you decide to use other Azure services, like table storage services, you'll want to get real good at abstracting yourself away from the table storage to make your code portable. Dealing with SQL Azure (at least from utilization perspective) is no different then using SQL Server and you would need to make a simple abstraction from actual rdbms implementation (most data access libraries do that anyway) to later utilize MySQL or Oracle, etc.
You will probably be stuck to GAE (or a very similar platform you could replicate on your own).
Alternatives: Amazon EC2? Windows Azure?
Using GAE requires you to design the app around their system so migration could require a rewrite. Certainly their NoSQL db at the least. Some people are saying Amazon EC2 is a better bet, but I haven't tried it yet. Also I prefer python-based stuff like Django, rather than Java stuff. Try the pyjamas client-side toolkit also.

Architecture to develop an application in java that could be used with desktop and web interface too

I'm developing a java application or service for execute remote commands or another applications and receive the results of these commands. And I think about to project this application to be possible his use with a swing interface or a web interface.
I have to take care with the parameters to pass for my businnes classes and how I will deal with the results. I need to use a architecture and project that let me able to use my classes with a desktop application or web application too.
I believe this is related with API and service design. Some popular applications have a web interface or dashboard for control services, and the services are manageable by agents installed for execute some demons, services or applications. To do start or stop commands for database systems, directory services an other tasks
There are some guides to how develop applications and services in java that can I use with web and desktop environments?
I felling a bite confusing about this, because in my mind if I choose to develop this with a swing approach all the thinks turn clear for me. But when I imagining the same project using the web perspective I lose my directives.
Sorry and Ihope that someone could undertand me. :-P
Consider spring and MVC architecture. Neither of them is constrained to Web development only, however they are extensively used as such.
You might look into Naked Objects ,where you develop a domain object model and gets the UI more or less for free (You can get a desktop GUI, and various forms of web UIs). This is probably not a feasible approach if you're developing a public facing application, but more suited towards applications developed for expert users.
I have been in a similar situation recently while I started working on a simple CMS. I wanted my cms engine to be free of what UI/client is used to interact with it and finally I settled for a Web Service oriented approach. As a student of RESTful WS/ROA I usually like to take that approach.
If I understand your problem correctly, I would design it to be, each external program, service, web service I want to provide remote access to would be a 'Application' to my web service, where 'Application' would be a 'Resource'. Performing actions on the 'Application' resource would mean executing GET requests with different query parameters. How the 'Application' infers would depend on the 'Application' resource.
A similar approach I took in the CMS engine is for generating representations for a content. I support Ruby (JRuby), Groovy, JavaScript (Rhino) and Velocity template for generating representation. User creates the template script as a resource and refers then in the content type definition. Clients are provided URI's to the representation from the content generic media formats (Atom XML, JSON) and upon fetching them receives the output generated by the script. I am tempted to take a similar approach for your problem. It would not only separated the UI from the business objects, but also provide flexibility to add new backend services in the long run.
As tools for RESTful WS over Java I would recommend, Jersey, Abdera, Jackson. As an example for how use them together you can have a look at the CMS project I was referring to.
Hi i would suggest you to build your system with a modular approach such that
you have all your business logic is exposed as a service which can be accessed by REST,
in addition create you can have web application layer and a desktop layer.
schemantically it will look like be at a higher level
weblayer/desktop---------{REST interface} ------- {business logic}-----EIS
and for modularisation you can consider OSGI
hope this helps

Categories