MVC/CMS/PEAR
| From: | Sylvain > Com-Océan | Date: | Mon, 03 Oct 2005 14:04:56 +0000 |
| Subject: | MVC/CMS/PEAR | ||
| Groups: | php.pear.general | ||
| Request: | Send a blank email to pear-general+get-21207@lists.php.net to get a copy of this message | ||
Hello,
In order to improv my CMS based on Pear & MVC design pattern, I ask you what are the best pear package to integrate in this kind of architecture and what do you think about it :
This is the MVC schema :
Framework : (englobe all MVC execution environnement : log, config, debug, ...) :
PEAR Packages : PEAR::Config (?)
Controler :
1- FrontController : receive the HTTP Request (script with GET/POST parameters)
2- InterceptingFilter : Manage & check : 1 Session, 2 Auth, 3 Permission (each are optionnal)
3- Action : perform action like adding, modify, select, delete, preview record ; change order, page, filter on the Model
Action are big controller : create DataObject, perform business method, call the renderer method, etc...)
PEAR Packages : PEAR::Auth
Model :
Business method included in sub-class of DB_Dataobject
If SQL query are required to do advanced query : get DB object from DB_Dataobject
PEAR Packages : PEAR::DB_Dataobject, PEAR::DB
View (here for HTML output) :
1- TransfertObject : Object which are used to contain the data from the model in a "usefull" strucure : HTML_Quickform Object (maybe HTML_Quickform_Element Object), Structure_Datagrid (or HTML_Pager & HTML_Table), HTML_TreeMenu (?), Structure_Tree (???), ...
2- RendererObject : Transform TransfertObject into HTML, Manage template, Generate/Record HTML Page, ... (Maybe this have to be divided into 2 : "RendererObject" for rendering TransfertObject to HTML & "PageRenderer" for HTML Page generation)
PEAR Packages : HTML_Quickform, Structure_Datagrid, HTML_TreeMenu
An other question :
Where and How do you store the structure of the table and website pages ? XML or Database or other ?
I store the website structure in database (Treestructure, Meta, Title, ...)
I store the business table description in XML : ListingOptions (title fileds, order fileds), Fields labels, field Type (number, text, image, file, date, ...), Table Link, FormOptions (validation rules, postProcessOptions like generate thumbsnail, encrypt password)
Thanks a lot,
[Sylvain PAPET]
Développeur Web
www.com-ocean.com
+33 4 90 66 48 82
Agence de communication visuelle