Generating Play Framework 2 CRUD forms with Cato

Summary: Cato is the name of a language-independent, template-based, database driven “CRUD Generator” I created, and in the video below I show how to use it to create a complete set of Play Framework 2 CRUD forms, including model, controller, view, and Anorm database code.

Cato - A database CRUD assistant

I'm getting closer to releasing my "programming language independent" CRUD generator application. I'm now calling it Cato. My previous code names for it were Db2App and SideKick, but when I thought about the name SideKick, I couldn't help but think about Inspector Clousseau's trusty sidekick Cato Fong, and thus the application name was born. :)

Cato - A database CRUD assistant

Cato is a language-independent "CRUD generator" software application. While tools like Ruby on Rails and CakePHP provide their own CRUD approaches, Cato is independent of the programming language and framework that you want to work with.

Because Cato's CRUD generator is based on the concept of templates, if you can create templates for your programming language (Java, PHP, Python, Ruby, whatever) and framework (Struts, WebWork, JSF, Spring, Hibernate, whatever), you can generate CRUD source code from your database table definitions.

A Java CRUD generator example

I'm still spending a couple of hours a day working on my Java CRUD generator. Technically, because this is all driven by templates, this is also a PHP CRUD generator, and a Python CRUD generator, and in general a programming-language independent CRUD generator, but at the moment it seems easiest to refer to it as a "Java CRUD generator", so I'll call it that for the moment.

How my CRUD generator works

In today's update I'd like to show you how this works. In short, you start with a database table like this one:

A Java CRUD generator (and PHP, and Ruby, and ...)

Way back in the late 1990s, I wrote a Java CRUD generator, which was based on the work of someone else. It was a static code generator, but like future dynamic frameworks like Ruby on Rails, CakePHP, and others, it scanned the database and generated source code from the database table definitions.