![]() |
Advices on a framework
Currently I'm developing my own lightweight framework for simpler apps..
I want your advice on some aspect if it - mostly on the database backend, controller functioning and template processing. First things first: Controller Controllers are defined in a config file, you could call them routes. If an non exsistent controller is entered the default controller is called. It is a copy of an idea you can find in Zend/Kohana etc. Database Backend For every aspect of database operations there is a single class for it - connect to the database, select, insert etc.. Here is a sample how to get a data from the table: PHP Code:
Templates are in a pure-php style. Class used for it can parse and output or "compile", or sub-process the single part, a module, and return the processed part to the main template, the main design. Can you suggest some ideas to the whole concept, or correct me where I'm going wrong. Thank you!! |
Quote:
__constructor, like so:PHP Code:
|
That's a great idea, thank you :)
|
| All times are GMT. The time now is 09:43 AM. |
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0