I’m building a new REST API that will replace a pre-existing one. The older API was written to be a SOAP API built with Java and this is where the questions resides.
Most of the data access layer libraries are written in Java and if we could use those libraries would be a great asset.
Our two options so far are: Ruby/Sinatra and Scala/Lift
We also have the possibility to use JRuby on the Ruby/Sinatra stack in order to use the Java libraries that I mentioned before. Our main worry is in regards to possible JRuby-Java libraries incompatibilities…
What do you reckon is the best approach?
I’ve been using Ruby for the past 2 years, and recently tried to develop an application using Scala & Lift.
I gave up on Scala in favor of Ruby, and here’s why.
The Ruby community is huge compared to Lift, you can get a gem basically for everything, there’s tons of documentation and tutorials and it’s easy to get a fast response when you run into trouble. The Lift tag here on SO has only about 500 questions.
Lift has a completely different approach to stuff, and unless you already know Scala, it will give you a lot of pain before you get the hang of it.
On the other hand, Sinatra is dead simple and obvious. It’s easy to integrate with other rack-based libraries and there’s just tons of documentation and tutorials on Sinatra related issues.
I don’t want to sound like I think Lift is bad, but it’s definitely a lot more complicated to start with. Prototyping with Sinatra is also insanely easy, since you can drop everything into one file. Lift is a lot more heavyweight.
All this comes down is a matter of preferrence. If you’re not afraid of Scala, give Lift a try. But if you just want to get the stuff done, Sinatra will give you much less headaches.