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.
In the video below I demonstrate how to create CRUD forms (Create, Read, Update, and Delete) for the Play Framework 2 using my Cato CRUD Generator. As mentioned at the end of the video, I was able to create all the forms in seven minutes and eighteen seconds (7:18), including the handling of a date field, which slowed me down the most. (This is fixable, but I haven't had enough free time yet to fix the problems.)
I forgot to mention it in the video, but the code for the List, Add, Delete, and Edit processes is generated from the following
contacts database table:
create table contacts ( id int auto_increment not null, first_name varchar(32) not null, last_name varchar(32) not null, email_address varchar(256), last_contacted date, street1 varchar(32), street2 varchar(32), city varchar(32), state varchar(32), zip varchar(12), primary key (id) );
Given that brief introduction, the following video shows how to generate all the source code needed to create CRUD forms for the Play Framework 2:
The Cato CRUD Generator
The source code for the Cato CRUD Generator -- including the new Play Framework 2 templates -- is now available at the following link on Github:
It’s important to note that if you don't like the Play Framework source code that I'm currently generating, you can modify the templates to generate the source code you want. Cato is based on templates, so if you don't like the Play Framework templates I've created, just create your own. (For instance, you may want to generate controllers methods that use an Async approach.)
There’s just one person behind this website; if this article was helpful (or interesting), I’d appreciate it if you’d share it. Thanks, Al.