Is there a technology stack that makes connecting android applications easily? - java

I'm creating an android application. Most of the functionality will be done offline, however I need to build some dependency between users of the application, such as being able to see peoples "high scores" and to communicate between users, and sending each other in-app messages.
Therefore, I'll need a webserver which the app can connect to in order to store such information. I imagine the app will make REST calls to get high scores.
I'm trying to avoid the overhead of having to create a fully functional web application (SpringMVC for example). Is there any application that makes this simpler?
What is a good, simple web stack I could use for this?

We use the Java RESTlet framework for creating RESTful interfaces for our mobile apps, and deploy via Google AppEngine. I shared a series of screencasts on YouTube demonstrating this approach that you might find useful. The RESTlet framework used in the screencasts is a few versions old, but this should help you get up to speed fairly quickly. We like this particular approach because it's straightforward for Android developers (who are already proficient in Java), scales well, and its free until you hit Google's quotas.

Related

Activator Play Framework with google app engine

I am wanting to develop a GAE application. However, I have used the play framework before and very much liked its layout. I was wondering whether the latest version (2.3 I think) works with Google App Engine? I have seen posts about this before. Some say it is not possible; I've seen a github project on porting the code over but no one has ever commented on the success of the project. I am concerned about losing efficiency/too much functionality.
Can it be done?
If not, any suggestions on frameworks (I know I am not really supposed to ask this second question on stackoverflow).
Have a look at this repo which enables you to package your Play app in a war that you can deploy onto GAE.
But you should consider the trade-offs before doing this. Play was designed to be stateless/Asynchronous and GAE runs on Java Servlet Spec. This means (generally):-
your Play app will not be truly asynchronous on GAE
you may reduce performance a bit because you are running in servlet container on GAE (depending on your app though you may not even be able to measure this so I wouldn't worry too much about it)
I have personally found that deploying my Play apps into Digital Ocean (I use Docker but you don;t have to) work really well for me. I have used GAE in the past but I wouldn't deploy a Play app there for the reasons stated above. Heroku is a nice alternative but gets a bit costly if you need to scale out.
I got Playframework to work on Goole App Engine (Flexible, Custom runtimes). It involves writing our own Docker image. The integration isn't seamless (e.g. default credential doesn't work, so we have to use a JSON credential).
See: http://tanin.nanakorn.com/blogs/345

Server-Side design options for mobile application

I am new to mobile application development and wanted to know from experts here on how they approach the server-side design. I need to support cross platform clients (iOS, Android, Windows) and require a scalable backend architecture.
What are the widely deployed server-side strategies
Are there any Mobile specific open source server-side technologies available.
What factors people consider for mobile application back-end.
I agree with half the answer above. You should use REST architecture - it is the most straightforward way to go. I use Ruby on Rails for my mobile projects. It is quick to start building the server code and see it working in somewhere like heroku.com almost instantly.
So I'd pick the following:
ruby on rails - worth your time picking up
heroku.com for deploying / or EC2 if you pick the Rubber gem
Google App Engine is another great option if you know some python / java
REST architecture
store all your heavy images etc with Amazon S3. They have some great SDKs to work with.
get yourself some JSON libraries to communicate with your server
on iOS:
use MKNetwokKit (it will save you lots of trouble down the road. it helps you cache and its a nice architecture all around).
if the app is small, try a data model based on NSArchiver instead of CoreData (SLOWWW). Mogenerator is a good start (this isn't server related..)
If you hate writing server side, I'd advice you to checkout Parse.com. Completely mobile only development with all server code handled for you. For big projects, you really should write your own server stuff.
Some extra things I'd consider:
how would the security work? just a session token in the HTTP header?
tier your app -- networking / MVC
what happens when you're offline? - this is currently something we're dealing with after not having thought early - pain.
I've had good success with creating a server using REST web services and XML data, but would recommend JSON instead. You can create this using Java and host it using Tomcat. This is widely deployed and widely consumable by multiple mobile and even non-mobile technologies.
A couple of factors to consider:
* You'll probably want it in a DMZ and being Internet accessible so think about firewalls, reverse proxies, and encryption via SSL.
* Will you host the server or sell the server to customers? Hosting is easy. If selling, there are many more considerations.

Advice on technology stack: Google App Engine, FLEX, GraniteDS (Tide), Java, Spring

Friends,
Your technology stack is the rope that will save you or hang you. For a one man webservice startup - what kind of rope is this list?
Plattform: Google App Engine, Backend: Google App Engine Datastore, Servicelayer: Java,
Frontend: Adobe Flex
Client/Service integration framework: GraniteDS, Client Application Framework: Tide (Part of the GraniteDS stack), Service Application Framework: Spring
Ok, let me give you my context.
Flextras is right! Technology is mostly chosen because of knowledge/infrastructure ... This is how I ended up with the list given above:
First of all: FLEX appeals to me. It’s easy to build rich UIs and Adobe is pushing it in the direction Desktop, web and devices. Adobe marketing gives us the promise: ”Integrate with the other tools in the creative suite” and ”Deploy everywhere”. (Of course it’s too good to be true, but they seem to be on the right track.) So lets choose FLEX as our UI framework.
FLEX often must integrate with serverside technology. So what technology to choose for the service layer? I know PHP of old, but the dynamic, untyped feel of the language, just doesn’t feel right working side by side with flex.
Flex draws much of it’s inspiration from Java. And thinking in ActionScript and thinking in Java just feels right. (I’ve explored Scala but the tooling and best practices are not there yet for someone like me to adopt this great new language). I’ve chosen to learn java, hoping that it will make patterns and knowledge reusable between the server-side-programming and the client-side-programming.
The problem with java is it’s complexity and that it’s harder to deploy (for PHP you could easily deploy on a cheep webhotel). My idea is a test and I don’t want costs and servers (who does?). I want to focus on exploring my ideas. So I’m looking at Google App Engine who offers a free amount of Java quota for a startup web applications.
The problem with Google App engine is that it’s restrictive Sandbox model, and many frameworks doesn’t deploy as is.
I want a technology line that will work together with a minimum amount of hacking. And this is where I’m asking for your expertise, helping me choose the right frameworks for integrating FLEX with Java on the Google App engine.
I want to use strongly typed objects from server to client so I’m looking for an AMF solution. From what I can tell looking at forums BlazeDS needs hacking, Pimento/Cinnamon doesn’t work, Weborb or Adobe Livecykle aren’t free. GraniteDS however seams to be working on the Google app store without patching.
GraniteDS comes with a client framework called Tide that integrates with serverside technologies. But once again Google App Engine is a restrictive environment. Seam (which seams to integrate the best with Tide) seams to be a hack job on Google app engine. EJB3 or CDI is Java EE 6 technologies and not supported by Jetty (the servlet container powering Google App Engine). Spring seams like a viable candidate however.
The Google app engine dosen’t have a relational database, but has interfaced It’s new datastore behind the JPA interface that both Spring and Tide (GraniteDS) supports.
I’m not sure all this rambling makes any of us any the wiser.
What I’m asking is this: From FLEX to the Google App Store, what line of technologies gives me the least rope to hang myself with? Im suggesting Tide/GraniteDS/Java/Spring/JPA. But what do I know until I’ve tried it.
Given the vagueness of the question:
I'm using Flex/Cairgorme/Blazeds/JBossAS/Oracle Java EE together for a mission critical, high performance, scalable application. I would highly recommend this combo.

Standard architecture for iOS/Android apps requiring server-side

Are there any standard architectures employed when building iOS/Android applications that require server-side functionality? For example, if an iOS app. needs to fetch a list of books from the server side, what/how does it do it? Does it use webservices? Does it use RPCs? What infrastructure is generally preferred for such applications? I've read about ways to encode data structures and objects using things like Protocol buffers and Thrift but nothing about an overall architecture that just lets me code my client-side and server-side logic. Will a simple spring/hibernate web-app work?
I hope the question makes sense and is a valid one.
Thank you
For Android, Google have started to produce tooling around integration with AppEngine using RPC. This Google IO video runs through the new tooling, or the highlights can be found on this blog post.

Beginning Google App Engine Java - Which Framework to start with?

I am new to both JAVA and Google App Engine. My Interest in Java stems from its compiled nature, speed and widespread enterprise use, whereas my interest in app engine is mainly because of it's initial free nature along with scalalbility.
I have been through Google's Getting Started and FAQ, I have modified the guestbook app and generally played around with the datastore, creating a simple entry system for use at work, using database schemas similar to the guestbook app. I come from a hackish PHP background, and most of my app consists of JSP pages with HTML and scriptlets mixed, with classes for the datastore stuff.
I have read about JSP, JSTL & JSF(not much) and also the basics of appengine, it's limitations,strengths and quotas. I also understand that my current approach is flawed. I have searched for JAVA frameworks and found one too many. I have been through the Will it play in App Engine list, but I do no half of the stuff mentioned there. I understand that webapp(used in the overview) is a framework and so is GWT. I understand I have to learn core java first.
What framework should I begin with which is easy to use and also robust/secure enough to handle a financial app? The framework should also have value, if I were to host it in a pure J2EE environment independent of App Engine.
I would appreciate a word on study resources too. Currently I see this book on amazon as a resource but are there cheaper alternatives like a library with a monthly subscription from where I can peruse similar books.(and I know that Google is a real good resource.)
Are there any developers here who have apps hosted on appengine java and would like to share their personal experience of appengine java with a beginner?
I use Eclipse with the Google App Engine plugin to develop and upload my apps.
Regardless of what you want to do in Java you absolutely need to learn your way around the core language and the basic part of the runtime library.
The Java Tutorial covers this and is pretty straightforward.
Then you need to learn the Servlet API which underlies almost all Java-based web solutions today. Sun puts this in the full Java EE tutorial (which is a bit heavy) so have a look at this quick overview.
When you have gotten so far, you have a much better idea of what your basic toolbox is, and can give information allowing to give better advice on what technologies you should choose.
Sorry for the steep learning curve, but the view on top is fantastic.
If you aren't doing Java development currently, and/or haven't done much web development. I definitely wouldn't complicate things with adding frameworks.
What are you trying to accomplish that you need a framework for outside of the Google App Engine stack?
I've been developing with Java for years and only started using Spring with my Google App Engine app because I need a good security and authentication option. I wish I didn't have to use it since it's a rather steep learning curve.
You should be able to do most everything you need to for a simple app with JSP. If done correctly you can even do it in MVC if you wish.
On top of everything else people have recommended, I suggest you take a look at Objectify, a much simpler datastore API than the JDO/JPA ones included in the App Engine SDK.
This is, of course, after you've gotten familiar with the core of Java first.

Categories

Resources