Reverse Code Generation

Posted by & filed under Coding.

Background A few days ago my companion Hendy Irawan shared with me his thoughts about accelerating the creation of code generators. The common way of writing a code generator (e.g. based on Xtext) is Writing a prototype of (parts of) your program. Identifying the parts of your code to be generated. This leads to the… Read more »

Url Path Binding w/o Boilerplate

Posted by & filed under Coding.

Update: Just noticed that I forgot to mention, that the following line has to be added to the main method of project/Build.scala: routesImport += “binders._” Regarding the previous post, it makes sense to provide a special Enumeration type which is bindable by the Play framework:

Play with Scala: Url Path Binding

Posted by & filed under Coding.

With Play and Scala, type-safe web development is a breeze. The following example shows how Play parses url paths and derives values of an Scala enumeration. There are two valid url paths: /signup/company and /signup/sales. Other url paths, such as /signup/unknown are properly handled as invalid. Play handles routes with variable parts like /signup/:account. In… Read more »