Scala 框架 Bowler

fmms 12年前

Bowler 是一个 RESTful, 多通道的 Scala 的 Web 框架,使用函数式编程风格,构建在 Scalatra 和 Scalate 的基础之上,使用 Lift-JSON 处理 JSON 数据。它拥有以下特性:

  • RESTful URL routing based on Scalatra, supporting named parameters, wild card URL's or regex URL's (see more at the Scalatra URL)
  • Uses Scalate for templating: use any templating dialect supported by Scalate, such as Mustache, SSP, Jade or Scaml.
  • JSON API "for free": JSON is central in todays web landscape, be it to create rich webapps with Javascript frameworks like JQuery, or providing API's for mobile apps. Every GET URL in Bowler will return a JSON representation of the underlying view model if you set the HTTP "Accept" header to "application/json"
  • HTTP Request to object mapping with ease: Bowler comes with out-of-the-box support to easily map from requests to arbitrary objects and back while respecting RESTful principles.
  • Composable UI's with ease: Bowler provides the means to easily compose- and re-use UI components with a minimum of overhead. In terms of approach, it lies somewhere in-between Apache Wicket Components/Panels and Lift snippets, but with it's own flavour and based on Scalate.
  • Decomposition of the View into "Resource View" & Layout - A consequence and enabler of the above two points, a stricter separation between the Resource View representing the Model you want to display and the Layout you want to surround it with
  • Localisation & multi-channel support out of the box: localisation of everything from UI to validation error messages is supported out of the box, as is adapting the view and layout based on request characteristics, such as User-Agent (you may want to render a web page differently for an iPhone compared to a desktop browser).
  • Sensible defaults, but ultimate configurability: Bowler has sensible defaults out of the box that you may never change. But it also allows you to extend- hook-in and adapt the framework at any point you choose: Don't like the validation framework? Use another one! Prefer a different rendering mechanism to Scalate? Change it!

项目主页:http://www.open-open.com/lib/view/home/1333592063046