------------------------------------
NOTES on Catalyst-Enzyme-0.12
------------------------------------
### Diferences from Catalyst-Enzyme-0.11
###
./lib/Catalyst/Helper/Model/Enzyme/DBIC.pm
./lib/Catalyst/Helper/View/Enzyme/TT/root/base/header_macros.tt
./lib/Catalyst/Helper/View/Enzyme/TT/root/base/login.tt
./lib/Catalyst/Enzyme/CRUD/Model/DBIC.pm
------------------------------------
How to create a new CRUD app.
------------------------------------
IMPORTANT
- Remove Catalyst-Enzyme-0.11
- Install Catalyst-Enzyme-0.12
- Create Catalyst App file structure
- Make some edits
- Edit lib/<app>.pm
Add DefaultEnd FormValidator
- Edit lib/<app>/Controller/Root.pm
Replace message line with: $c->res->redirect("/<main_table_name>");
- Edit t/01_App.t
Reflect change in Root.pm: ok(request("/")->is_redirect, "Redirect ok");
- Create TT View
- script/<app>_create.pl view TT Enzyme::TT
- Create the Database
dbish dbi:SQLite:dbname=<app>.db < <app>.sql
- Create the DBIC Model
- script/<app>_create.pl model <app>DB Enzyme::DBIC dbi:SQLite:dbname=db/<app>.db
- Configure the Model classes ( One for each table )
- lib/<app>/Model/<app>DB/<tablename>.pm
- Create the CRUD Controllers ( One for each table )
- script/<app>_create.pl controller <tablename> Enzyme::CRUD <app>DB::<Tablename>
- Add links between the tables
- Edit the root/base/header.tt and add this inside the content div so we can jump between the tables:
<a href="/<Table1>"><Table1></a> |
<a href="/<Table2>"><Table2></a> |
<a href="/<Table3>"><Table3></a> |
<a href="/<Table4>"><Table4></a>
<br />
- Finished