Scala-friendly game framework - scala

Is there any finished Scala-friendly 3d game framework with nice documentation and tutorials for beginners?
I found this question, but it's quite old. Both Sgine and Simplex3d don't look alive and/or complete.
Please, do not post answers with Java frameworks/engines if they don't have any kind of Scala support (e.g. custom operators, implicit conversions, tutorials with examples in Scala).

Related

Is there any book or online tutorial for Scala DSL?

I read this one for DSL scala http://camel.apache.org/scala-dsl-getting-started.html. It doesn't help much for me. I want more details. Can any one help me out?
There is Debashish Gnosh book DSLs in action. It isn't focused entirely on Scala, but has a good section on DSL developemnt using Scala. Generally this would be enough for starter knowledge, for deeper experience I would look at either ScalaTest or Specs source code.
There is a lot of research ongoing in this area, especially regarding high-performing Scala DSLs. Look at:
Lightweight Modular Staging
Delite
I've published an article about building regular DSLs in Scala.
A short overview: most-likely the DSL you're trying to build belongs to a class of regular languages. If so, you can model this DSL with a finite state machine. The article contains a step-by-step manual how to transform that FSM to Scala code.

Important Scala concepts to "be thorough in" when learning Lift

I am learning Scala with the intention that I be able to develop in Lift. What are the Scala concepts that are highly ingrained to Lift, that I must be thorough in?
What are the concepts/design styles that I must start early to lead to maintainable Lift projects?
Particularly, I am interested in lazy vars, actors and pattern matching
To me, there are no scala fields that you won't use in Lift. Of course it can depend a lot on what you are working on. For exemple I did't have to use actors but some people chose Scala for their webapp because of them.
However here is what I personally recommend as a first aid kit:
The List API
I use a lot the List API. Mastering it is useful for all data anylisis and filtering cases. If you use Mapper[T] in Lift, it will return some List[T] as a result.
As you are interested in pattern matching I am sorry to tell you that with List you won't have to use match a lot.
Object oriented programming
It sounds silly but another interesting fields to master is the difference between Class and Object including of course inner classes and inner objects as, later on in Lift they will have different meanings in snippets to know if the snippet is a singleton, if the val is static of not...
Scala traits can also be powerful in Lift context, but in fact they are useful everywhere
Scala XML support
Mastering Scala XML will be very useful as you will certainly have to set some xml by hand, so if you don't have problems with this it will be really helpful.
To the list Chris wrote I would add:
Actors
While Lift has it own LiftActor and CometActors implementation, it is helpful to understand how to interact and use the actor paradigm. Comet, which is one of the best features in Lift is written using Actors.
Box
Lift has something similar to Scala's Option, called Box. A box can have any of these three statues, Full, Empty or Failure. You can read more about it on David's blog
Where to find help
While you will find useful answers here on SO (Like Chris's answer), most of the Lift community hangs out at the mailing list. There are thousands of questions and answers there.
We are currently working on a cookbook, there is the
wiki, there are three books about Lift, Lift in Action, SImply Lift and Exploring Lift

Can you tell me any good scala web frameworks? [duplicate]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a book, tool, software library, tutorial or other off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
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.
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:
Scalatra, previously Step (on GitHub)
Play 2 (on GitHub)
Pinky
I wrote a blog post about this.
To summarise, some of the options are:
Lift
Sweet
Slinky
I finally found that none were suitable for me, and developed my own little "framework". (It is not open-source yet).
I like Lift ;-)
Play is my second choice for Scala-friendly web frameworks.
Wicket is my third choice.
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
Try Play Framework, which also support Scala.
One very interesting web framework with commercial deployment is Scalatra, inspired by Ruby's Sinatra. Here's an InfoQ article about it.
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
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:
Some prosa
Presentation
Some experience with Wicket and Scala
Announcments with reference to the project for the glue code to bind Scala closures to models
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.
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.).
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
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.
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.
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.
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.
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>
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.
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.

Good Scala introductory article/video to whet the appetite

What are some good online articles or videos you've seen that would be most likely to get a developer interested in Scala? I'm looking for an introduction that is brief & to the point that dives right into example code, and would leave a developer who does not know Scala wanting to learn more about it.
Try in this order:
Pragmatic Real-World Scala - This video shows off all kinds of things that would make a Java developer drool.
Programming In Scala - This is simply a great general-purpose programming book. In addition to being a gentle, clear introduction to the language, it's also a fantastic introduction to functional programming concepts and language design. Even if you hate Scala,
this book will make you a better programmer.
Scala For Java Refugees - Very well-written mostly gentle introduction to major Scala concepts.
Another tour of Scala - A Java-centric breakdown of fundamental Scala features.
i went to this talk, it was excellent. can't tell if it is still there due to our internet restrictions, if it's not i'll delete this post.
http://powerhost.powerstream.net/008/00102/100203Scala.wmv
I'd go straight to the horse's mouth, the Scala website itself: Code Examples.
http://www.escalatesoft.com/screencasts
Escalate software is in the process of creating a series of screencasts for Scala information sharing and training purposes. The first available screencasts are provided here for free and cover the new features of Scala 2.8. In the longer term we will create training materials in the form of these videos along with supporting material that will be for sale from this and other sources as well.
http://blog.jaoo.dk/2009/03/09/an-introduction-to-the-scala-programming-language-by-bill-venners/
Take a look at the following presentation by Jonas Bonér (a well known figure in the Scala community, responsible for the AKKA actors concurrency framework). I'm sure this will whet the appetite for Scala.
http://www.infoq.com/presentations/Scala-Jonas-Boner
german introduction, maybe useful for you: http://www.rheinjug.de/videos/gse.lectures.app/Player.html#Scala
I would recommend Chapter 1. Zero to Sixty: Introducing Scala of the Programming Scala book by Dean Wampler and Alex Payne. The rest of the book is also great. The book is freely available online.
EDIT
I recently bought and read the Atomic Scala book by Bruce Eckel and Dianne Marsh. This is the best book I have read so far for anyone wanting to learn Scala.

REST in lift 2.0 + Scala 2.8

I can see from release notes and such that there has been
many improvements in lift 2.0 for building REST stuff,
but I'm unable to find what has been done or how to
use the new stuff compared to the old.
Does anyone know of such documentation, blog entries, examples
or similar for how to use REST in lift 2.0.
Ideally I would like something along the lines of the links below
updated for lift 2.0, or something similar.
Perhaps someone here have such examples handy or know where
to find it?
http://blog.m1key.me/2010/07/rest-with-scalas-lift-framework-part-1.html
http://blog.m1key.me/2010/07/rest-with-scalas-lift-framework-part-2.html
I'm a REST-enthusiast in general and currently evaluating various aspects of Lift's support. I've recently blogged by thoughts on URI matching and Content Negotiation here and here. This is an ongoing series at this moment.
I really like what I see so far. The framework is very flexible. Even if you find an aspect of REST-support is missing you can extend the functionality with reasonable effort.
Lots of things have changed which make REST APIs a lot easier to create. Here are two links to articles which describe the new methods for building them. You should also look at the google group as there are lots of examples in the archives:
http://blog.getintheloop.eu/2010/3/29/multi-format-rest-services-with-lift
http://www.assembla.com/wiki/show/liftweb/REST_Web_Services