Friday, December 21, 2007

MVC

MVC - Model View Controller.
This is the architecture we used before SOA in our web application.

CPAN Modules which helps more to implement : CGI::Application and HTML::Template

View :
To view the html output page in our web application, we used to design our html designs in .tmpl extension. Javascript functions also includes with in this .tmpl. We included .css files also with in this .tmpl.

CGI :
Through CGI runmodes this HTML::Template .tmpl file will be parsed and corresponding data will fetch from the DB, using Model and pass the values to template and the html output will be return from this runmode.

Model :
This will contain methods having db operations. Like save(), find(), delete().

For assessor(getter) and mutator(setter) we used Class::MethodMaker module.
Denali::Model::Factory:

Denali::Model::Factory a generic base class for the existing Model class.
The existing model class a constant called TABLE_NAME will be declared,
so that can be used by the Denali::Model::Factory to build the getter and setter
method based upon all the fields for the given TABLE_NAME and the save,
delete and find method will make a call to Denali::DB and Denali::Find.

No comments :

// Below script tag for SyntaxHighLighter