What Scala web-frameworks are available? [closed]
Asked Answered
S

18

198

I've just started learning Scala, and the first thing I'm going to implement is a tiny web application. I've been using Erlang for the last year to implement server-side software, but I've never wrote web applications before. It will be a great experience.

Are there web-frameworks for Scala except for Lift?

Don't get me wrong, Lift looks awesome. I just want to know how many frameworks there are so that I can then choose between them. It's always a good to have a choice, but I the only thing I found was Lift.

Sophronia answered 28/9, 2009 at 17:50 Comment(0)
I
79

I'm very interested in Scala, but I have not used it yet, so with that caveat, the frameworks I am aware of that are not mentioned in HRJ's answer (Lift, Sweet, Slinky) are:

Iulus answered 28/9, 2009 at 17:50 Comment(8)
Interesting. Lift is by far the most heavily publicized: it's curious that you weren't familiar with it.Victoriavictorian
Note statement "...I am aware of and not mentioned by HRJ..." HRJ already mentioned Lift. ThanksIulus
Step is good fun. Though the source is more complex than it needs to be imho.Welldressed
Step is now Scalatra.Handyman
play has a scala version tooSalleysalli
/me sighs. <rant>Step is a perfectly good name, why change to Scalatra? Express.js isn't called Nodatra. Flask (not quite the same but close) isn't called Pythatra. </rant>Abby
@djensen47 your always free to develop your own ;)Sweettalk
The modern Scala web framework are: Play (on Akka HTTP), Scalatra (Akka Actors) and Finatra. reddit.com/r/scala/comments/743zjv/web_frameworkCowan
G
46

I wrote a blog post about this.

To summarise, some of the options are:

  1. Lift
  2. Sweet
  3. Slinky

I finally found that none were suitable for me, and developed my own little "framework". (It is not open-source yet).

Godoy answered 28/9, 2009 at 18:16 Comment(0)
S
35

I like Lift ;-)

Play is my second choice for Scala-friendly web frameworks.

Wicket is my third choice.

Scholium answered 18/6, 2010 at 5:52 Comment(3)
David, how did you hear about Lift? ;-)Discharge
@Derek Mahar Inside job I believe ;-)Pothouse
It appears you are affiliated with Lift. Please note that our self-promotion policy requires you to disclose this information in answers like this one.Secundine
G
35

Following is a dump of frameworks. It doesn't mean I actually used them:

  • Coeus. A traditional MVC web framework for Scala.

  • Unfiltered. A toolkit for servicing HTTP requests in Scala.

  • Uniscala Granite.

  • Gardel

  • Mondo

  • Amore. A Scala port of the Ruby web framework Sinatra

  • Scales XML. Flexible approach to XML handling and a simplified way of interacting with XML.

  • Belt. A Rack-like interface for web applications built on top of Scalaz-HTTP

  • Frank. Web application DSL built on top of Scalaz/Belt

  • MixedBits. A framework for the Scala progamming language to help build web sites

  • Circumflex. Unites several self-contained open source projects for application development using the Scala programming language.

  • Scala Webmachine. Port of Basho's webmachine in Scala, a REST-based system for building web applications

  • Bowler. A RESTful, multi-channel ready Scala web framework

Grosso answered 7/10, 2010 at 15:58 Comment(2)
Unfiltered has a good slideshow here: linkPestalozzi
I added bowlerframework (just found it on the web).Chavannes
S
23

Try Play Framework, which also support Scala.

Swashbuckler answered 13/6, 2010 at 7:0 Comment(1)
Play with Scala support looks very promising.Bohunk
A
8

It must be noted that there is also a considerable interest in Wicket and Scala. Wicket fits Scala suprisingly well. If you want to take advantage of the very mature Wicket project and its ecosystem (extensions) plus the concise syntax and productivity advantage of Scala, this one may be for you!

See also:

  1. Some prosa

  2. Presentation

  3. Some experience with Wicket and Scala

  4. Announcments with reference to the project for the glue code to bind Scala closures to models

Arcboutant answered 28/9, 2009 at 18:35 Comment(0)
P
8

One very interesting web framework with commercial deployment is Scalatra, inspired by Ruby's Sinatra. Here's an InfoQ article about it.

Petasus answered 7/10, 2010 at 14:30 Comment(0)
A
8

I find Unfiltered very interesting https://github.com/unfiltered/unfiltered.

It's mentioned in IttayD's list.

Here is a presentation about it http://unfiltered.lessis.me/#0 and the video http://code.technically.us/post/942531598/doug-tangren-presents-the-unfiltered-toolkit-for

Also here there is an article with more info http://code.technically.us/post/998251172/holding-the-parameter

Ardellardella answered 8/10, 2010 at 0:20 Comment(1)
Unfiltered is very, very cool. It is really clean & functional but not too complex.Elohist
S
7

Play is pretty sweet.

It is now production ready. It incorporates: a cool template framework,automatic reloading of source files upon safe, a composable action system, akka awesomeness, etc.

Its part of the Typesafe Stack.

Having used it for two projects, I can say that it works pretty smoothly and it should be something to consider next time you are looking to learn new web frameworks.

Sigfried answered 22/9, 2011 at 17:43 Comment(0)
G
5

I tend to use JAX-RS using Jersey (you can write nice resource beans in Scala, Java or Groovy) to write RESTul web applications. Then I use Scalate for the rendering the views using one of the various template languages (JADE, Scaml, Ssp (Scala Server Pages), Mustache, etc.).

Gemsbok answered 8/10, 2010 at 15:9 Comment(2)
I'm interested to know what IDE you use to develop Scalate projects?Pentup
I use IntelliJ for all my developmentGemsbok
P
4

There's a new web framework, called Scala Web Pages. From the site:

Target Audience

The Scala Pages web framework is likely to appeal to web programmers who come from a Java background and want to program web applications in Scala. The emphasis is on OOP rather than functional programming.

Characteristics And Features

  • Adheres to model-view-controller paradigm
  • Text-based template engine
  • Simple syntax: $variable and <?scp-instruction?>
  • Encoding/content detection, able to handle international text encodings
  • Snippets instead of custom tags
  • URL Rewriting
Petasus answered 12/3, 2010 at 5:27 Comment(0)
O
4

Prikrutil, I think we're on the same boat. I also come to Scala from Erlang. I like Nitrogen a lot so I decided to created a Scala web framework inspired by it.

Take a look at Xitrum. Its doc is quite extensive. From README:

Xitrum is an async and clustered Scala web framework and web server on top of Netty and Hazelcast:

  • It fills the gap between Scalatra and Lift: more powerful than Scalatra and easier to use than Lift. You can easily create both RESTful APIs and postbacks. Xitrum is controller-first like Scalatra, not view-first like Lift.
  • Annotation is used for URL routes, in the spirit of JAX-RS. You don't have to declare all routes in a single place.
  • Typesafe, in the spirit of Scala.
  • Async, in the spirit of Netty.
  • Sessions can be stored in cookies or clustered Hazelcast.
  • jQuery Validation is integrated for browser side and server side validation. i18n using GNU gettext, which means unlike most other solutions, both singular and plural forms are supported.
  • Conditional GET using ETag.

Hazelcast also gives:

  • In-process and clustered cache, you don't need separate cache servers.
  • In-process and clustered Comet, you can scale Comet to multiple web servers.

Follow the tutorial for a quick start.

Omeara answered 22/9, 2011 at 5:53 Comment(0)
P
3

There's also Pinky, which used to be on bitbucket but got transfered to github.

By the way, github is a great place to search for Scala projects, as there's a lot being put there.

Petasus answered 28/9, 2009 at 18:28 Comment(0)
W
3

I'd like to add my own efforts to this list. You can find out more information here:

brzy framework

It's in early development and I'm still working on it aggressively. It includes features like:

  • A focus on simplicity and extensibility.
  • Integrated build tool.
  • Modular design; some initial modules includes support for scalate, email, jms, jpa, squeryl, cassandra, cron services and more.
  • Simple RESTful controllers and actions.

Any and all feedback is much appreciated.

UPDATE: 2011-09-078, I just posted a major update to version 0.9.1. There's more info at http://brzy.org which includes a screencast.

Weathersby answered 28/10, 2010 at 17:0 Comment(0)
R
1

Both Sweet and Slinky seem to be unmaintanted for about a year. Sweet Maven repo sweetsoftwaredesign.com is dead so there's even no way to download dependencies.

Ribaldry answered 19/12, 2010 at 4:37 Comment(0)
S
1

Note: Spiffy is outdated.

<plug>

Spiffy:

  • is written in Scala
  • uses the fantastic Akka library and actors to scale
  • uses servlet API 3.0 for asynchronous request handling
  • is modular (replacing components is straight forward)
  • uses DSLs to cut down on code where you don't want it
  • supports Scalate and Freemarker for templating

Spiffy is a web framework using Scala, Akka (a Scala actor implementation), and the Java Servlet 3.0 API. It makes use of the the async interface and aims to provide a massively parallel and scalable environment for web applications. Spiffy's various components are all based on the idea that they need to be independent minimalistic modules that do small amounts of work very quickly and hand off the request to the next component in the pipeline. After the last component is done processing the request it signals the servlet container by "completing" the request and sending it back to the client.

https://github.com/mardambey/spiffy

</plug>

Scud answered 27/3, 2011 at 1:17 Comment(0)
L
0

You could also try Context. It was designed to be a Java-framework but I have successfully used it with Scala also without difficulties. It is a component based framework and has similar properties as Lift or Tapestry.

Lachlan answered 9/4, 2011 at 13:38 Comment(0)
S
0

I have stumbled upon your question a few weeks back, but since then also learned about Circumflex. This is a nice, minimal framework that is therefore easy to learn, and it has pretty good documentation available as well.

Beside it's minimal-ness, it also claims to work well with other libraries and lets you use your own implementation of things when you need it.

Shorts answered 10/7, 2011 at 16:59 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.