Thax - Wiki Development
EnoughRope
EnoughRope is my attempt at a MVC framework.
Current thinking
- Model - EnoughRope::Record
- Controller - ( CGI::Application::MasterController, CGI::Application::Controller)
- View - (./templates implemented using HTML::Template .. but could be anything )
Let's not make any new function directories
./lib/
./templates/CONTROLLER/
As an example:
./app-name/.htaccess
./app-name/controller.cgi (should just executer $obj->run() )
./app-name/lib (Directory for all Perl Libs)
./app-name/templates (view stuff, by default HTML::Template )
./lib/ specific things
For EnoughRope use a base namespace to describe the "datasource"
e.g.
./lib/AppNameDB/DB.pm
./lib/AppNameDB/User.pm
./lib/AppNameDB/Things.pm
or App name could be a source .. it's supposed to be separate from your controller.
You should name your application and use this in the namespace
./lib/AppName/MasterController.pm (inherits from CGI::Application::MasterController)
./lib/AppName/SearchController.pm (inherits from CGI::Application::Controller)
Runmodes and Routes
Possibly want to configure/regiter a name for a controllers. E.g.
{
"user" => "MyApp::UserController",
"admin" => "MyApp::AdministrationController",
}
[
'' => { app => 'Welcome', rm => 'start' },
':app/:rm' => { },
'admin/:app/:rm' => { prefix => 'MyApp::Admin' },
]
In this case, :app would have to refer one of the configured/registered controllers.