We are planning to write an application that, in its start phase will be accessed by about 100 users a day who will send a total of ~1000 requests to a server.
We decided to choose Java as the server language (most of the programmers` favorite). As we want to have flexible interfaces and the interface designers (Iphone, php, javascript) we do not want to rely on java specific solutions for client display(JSF…)
The server will also run a database with some thousands of entries. User management is also needed. It will mainly be about database requests. Maybe a typical example of a Service Oriented Architecture?
Methods will mainly store, retrieve data from the database.
What I am looking for is a suitable Way/Framework to implement that. Is SOA the right approach? Is it too big for this use case? Is JSON a good means of returning the results to the clients? How to trigger methods on the server via (safe) requests.
I am trying to figure out some options. Experience?
One option would be Restful webservice and for example use Java EE 6 (jax-rs), pretty simple.
Simple example from one of the links below:
If you would like it to return json instead just change the Produces annotation:
@Produces(MediaType.APPLICATION_JSON)or let the client decide which it prefers by specifying multiple options:
@Produces({"application/xml", "application/json"})The Java EE 6 Tutorial chapter about RESTful webservices
http://docs.oracle.com/javaee/6/tutorial/doc/giepu.html
Java EE 6 introduction
http://www.oracle.com/technetwork/articles/javaee/javaee6overview-141808.html
This stack overflow reply and links seem very useful for beginners too:
https://stackoverflow.com/questions/3882082/rest-json-web-services-java-ee-framework