Uniscala is a set of Scala libraries for developing business applications. Uniscala's top priority is to support and provide the Uniscala Granite wep application framework and the upcoming Uniscala Topaz identity management application. Uniscala includes several db4o utilities that work flawlessly on Scala!!
db4o is being used as the primary database in this work-in-progress Scala/DB4O/Wicket/JQuery web framework project which is stringly influenced by Zope/Plone. Some useful tools available here:
http://uniscala.net/mvn/uniscala-db4o/scaladocs/index.html
can be used independently of the framework. They will allow you to do, among other things, SODA queries like this:
val db:ObjectContainer = // ... open database
val kwQuery = Query[FoodKeyword]
kwQuery.descend("keyword").startsWithIgnoreCase("bean")
kwQuery in db foreach { res => println(res(db) }
The Granite framework itself does other nice things like auto-committing the database after a web request (or rollback on uncaught exception), providing an IoC framework for hooking in the database and other services, and so on. It is designed for smaller/medium-size applications.
More info:
http://uniscala.net/
http://sourceforge.net/projects/uniscala/
Popular tags: db4o, Scala
-
Posted by Sam on 7/12/2010 1:20 AM
Thanks for the mention. I wouldn't say "flawlessly" just yet,as this is unreleased software. In fact we are reworking the our query API currently. There are a few reasons why we are creating a DB4O layer in Scala:
1. DB4O queries are not serialisable - perhaps they are linked to the database internally. Queries make great models in frameworks like Wicket, but Wicket needs models to be serialisable, so we need our own query type.
2. I haven't checked this with the Scala 2.8 release candidates, but native query optimisation doesn't appear to work with Scala. This isn't that surprising, but it would be interesting to know if other developers have different experiences, or work-arounds, or whether the DB4O dev team is considering Scala issues. It would be nice to have the option to avoid SODA, which requires you to know the names of private fields of the classes you are querying and such - which is undesirable.
3, Likewise, instrumentation for TA or TP didn't work when I last tried it.
Loading, please waiting...