aspose file tools*
The moose likes Scala and the fly likes Difference between Play for Scala vs Scalatra Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Scala
Bookmark "Difference between Play for Scala vs Scalatra" Watch "Difference between Play for Scala vs Scalatra" New topic
Author

Difference between Play for Scala vs Scalatra

Tony Hsieh
Greenhorn

Joined: Feb 05, 2013
Posts: 3
I was confused with first using Play (2.0) for Scala (though I admit I was trying to learn Scala at the same time) so I have gone back and focused on learning the language first.

Now after the Coursera class, I'm slightly better armed to take on Play - at least syntax-wise.

I now hear about Scalatra as a simpler-to-grok framework.

With so many things to learn and so little time, what is the difference between the two frameworks?

Is Play for Scala harder to learn but ready for industrial strength site and Scalatra simpler to learn but more for less scaling "toy" sites?

Any thoughts would be great!

Thank you
-- Tony
Erik Bakker
author
Greenhorn

Joined: Feb 03, 2013
Posts: 8
Tony Hsieh wrote:I was confused with first using Play (2.0) for Scala (though I admit I was trying to learn Scala at the same time) so I have gone back and focused on learning the language first.

Now after the Coursera class, I'm slightly better armed to take on Play - at least syntax-wise.

I now hear about Scalatra as a simpler-to-grok framework.

With so many things to learn and so little time, what is the difference between the two frameworks?

Is Play for Scala harder to learn but ready for industrial strength site and Scalatra simpler to learn but more for less scaling "toy" sites?

Any thoughts would be great!

Thank you
-- Tony


Note upfront: I don't have any experience with Scalatra, so the remainder of this post is guesswork ;)

I think the main difference is that Play is more of a full-stack solution, with a bunch of built-in or at least recommended components, while Scalatra provides only a core and relies on you choosing the third party libraries of your liking for many tasks.

I don't think that any of the frameworks is particularly harder to learn.

Given that Scalatra has a very similar architecture, I think it will scale just as well as Play, and it's certainly not just for simpler or toy sites.


I know that you believe you understand what you think I said, but I'm not sure you realize that what you heard is not what I meant.
Tony Hsieh
Greenhorn

Joined: Feb 05, 2013
Posts: 3
Thanks for your reply, Erik!

I bought your book as a direct response after flailing with Play. I'm going to use my willpower to work through your Play for Scala book before I switch over to something else like Scalatra.

Thanks again for your response, Erik!
-- Tony
Dave Hrycyszyn
Greenhorn

Joined: Feb 05, 2013
Posts: 1
Hi, I'm chipping in late here, but I have a few things to add to what Erik said (all of which I agree with by the way).

First, it's important to say that there are quite a few similarities. Obviously, both promote Scala as a first-class language. Both have books available, e.g. there's Play for Scala and Scalatra in Action. Both frameworks are fast, with Scalatra probably having a speed edge in (mostly meaningless) benchmarks. Both are routinely used by very large organizations that want to scale massively.

The most obvious difference between the two frameworks, as Erik said, is that Play! is a much more full-stack framework, and does a lot more convention-over-configuration for you - so it provides convenience with the trade-off that it makes more assumptions about your application's setup.

In contrast, Scalatra tries to provide a very small set of core routing functionality and then let you easily layer whatever other libraries you want on top. In our view (I'm a Scalatra contributor), this is good thing as it gives you more freedom to structure things the way you want. I like Scalatra because it makes it easy to write multiple small applications with well-defined purposes.

There is another difference which may be somewhat less obvious but is still very important: deployment.

Play! is usually deployed using Netty (I am not sure of the status of its external WAR plugin at this point, maybe somebody else can comment on that). Scalatra only deploys on regular servlet containers (Tomcat/JBoss/Jetty/whatever), so if you need to deploy your app that way, it might make a difference to you. Each has its advantages and disadvantages.

New book! Scalatra in Action - http://www.manning.com/carrero2/
chris webster
Bartender

Joined: Mar 01, 2009
Posts: 1477
    
  11

Thanks for the expert input, Dave, and good luck with the Scalatra In Action book!


No more Blub for me, thank you, Vicar.
Tony Hsieh
Greenhorn

Joined: Feb 05, 2013
Posts: 3
Thank you, Dave, for your response! I do like the thought of a framework with slightly less "magic" (...because sometimes Scala itself feels like it.)

Now you are tempting me to buy your Scalatra in Action book as well!

Thank you again!
-- Tony
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Difference between Play for Scala vs Scalatra
 
Similar Threads
Can't find the right framework. Creating a single page app, with dynamic forms
Grails: A Quick Start Guide Question to Dave Klein
what is scala ?
Which is better Groovy or Scala?
Play for Scala - SBT advice? Compile time?