Java / Spring Based Web Services Alternative

I am looking for alternatives for my team to create simple REST services that respond in JSON format to multiple clients. While these services are being developed on Spring MVC with Hibernate. It is imperative to connect and work with legacy databases (SQLServer, DB2 and MySQL - depends on the project). Now I am looking for alternatives in order to make the development of the service easier. Don't get me wrong: Spring does a good job, but unfortunately not everyone in our team is familiar with Spring even Hibernate. Addition to this: in most cases, a full Spring stack is not required. It will also help get rid of the JVM too.

I was thinking of something like a script-like solution. Maybe PHP? Is there something like ORM that can work with legacy database systems? The same goes for Ruby on Rails.

Perhaps there is something that I did not hear about and did not come now. I would like to hear your opinions or experience with other methods.

Hi

+7
source share
3 answers

JAX-RS is a really nice easy way to relax on the JVM. There are plugins that convert JAXB annotated objects to JSON, or you can simply collapse this yourself in many ways.

EclipseLink is a good implementation of the JPA specification. Its a pretty simple way to map objects to a database using annotations. JAX-RS works with this by default, for example. you can find an object with jpa. You can then annotate it using JAXB, and then return it directly from your web service method (if you want XML), and it will work. There is also a plugin for Jersey (JAX-RS reference implementation) that also allows you to serialize things as JSON.

These JAX-RS, JPA and JAXB are three really nice APIs. They do not do everything, but they are light and help you do the real job without any problems.

+2
source

I'm not sure if you want to go in that direction, but I recently wrote a web service in ASP.NET MVC 3. You can associate the passed JSON directly with object models without the need to write additional code. You can also configure URLs according to the REST standard. If you are working with something like SQL Server, this approach is likely to be pretty simple.

+1
source

I would recommend Rails or Sinatra (which you could run on top of Java using JRuby). Both can use ActiveRecord and other Ruby ORM and DB libraries; You should be able to get these libraries to talk to your legacy databases without too much trouble.

0
source

All Articles