WebObjects and Squeryl

Version 159.1 by Ravi Mendis on 2010/11/10 00:06

Squeryl = SQL-like DSL for Scala

Advantages of Squeryl over EOF:

  • Concurrent
    • Spawns multiple database connections
    • Issues database transactions concurrently
  • Scala Actor compatible
  • Immutable object model/graph
  • Strongly-typed
    • Better suited for business "logic".
             E.g: Exploiting the compiler and IDE to catch exceptions at compile time rather than at run-time.
  • Uses Scala (functional) collection classes

Migrating EOF -> Squeryl

In keeping with the strong-typed philosophy of Scala, Squeryl has no dynamic component like EOF (i.e an EO model file).

EOF though has the ability to generate classes in Java (and in Objective-C prior to WebObjects 4.5) enforcing type as has become customary in enterprise environments. We may exploit this feature of EOF to generate a Squeryl schema.

Create a .eogen file for your EO model as normal. Only set the File Names extension