Posted on: 2014/11/18 0:25
Re: i'm working an a standard module skeleton
The use of a dynamic system (class, variable, function) above allows me to quickly create a module in the shortest lines.
In terms of resources, the module is not very greedy (except some parts which demand to be optimized). The biggest module I wrote for a client, contains 42 MySQL tables, it is a module of ERP for automotive dealerships. And in addition I can easily clone the module. The only real job is to change the language files, the file instaalation MySQL and add the files to add the necessary options.
I'll try to explain how the basic module:
in the file for the web page called:
"$entree" table contains all the fields for the page.
"$class" table contains all the class to load
In the "class" matching file:
$table_item, MySQL columns
The idea is:
- To create a fully clonable module (without further manipulation as copy / paste / rename the module directory)
- Creation of "class" generic for basic functions (read / write BDD form, security ...)
- Quick Add feature (by copy / paste) so each function, class must be completely modular.
- Cache system for dynamic class already generated.
- Quickly Adding fields in a file.
- The page loads only what it needs for its operation.
I am to create simple modules, secure, requires very little hardware resources, fast, functional and easy to modify (even for a novice)
If I understand, you want to use smarty to generate (or simulate) a module.
I haven't explored this track, I don't know if it's a good idea.
We don't have the same approach, I try to keep a (speed RAM, PIC, size,) hardware and ergonomic approach to the user. To estimate a module, I look at the lines of code (graphics rendering happens at the end)
It's good to have multiple approaches.