From: Michal K. <mi...@wp...> - 2003-04-25 07:19:37
|
Hello, FG> Hi, FG> One problem with creating code that is used by all modules is, that one FG> ends with huge libraries, that every module has to include. So especially Actually, this is the reason why Tiki should be restructured - right now you have to read in huge tikilib.php, which contains all sort of code: handling SQL for each module, WIKI, and other unrelated functions (but "probably needed for most of pages"). It is very difficult to add (and remove later if you wish) your own module to tiki. Another problem with tiki is that it has huge amount of files at the root level (tiki-*.php) - it would be better to separate them in directories. FG> in web scripts, it may be good to have duplicate functions in different FG> modules to speed up parsing time. This is not nice and sometimes hard to FG> handle. Having duplicate functions is never good, especially when it comes to maintaining project for longer time. You would save yourself lots of problems if you had only one place to change. I imagine it would be possible to read in some code "on demand" - using include_once() or similar solution - every time you need specific "module". I belive it is possible to restructure tiki files and to make it more modular. It would be nice if tiki was only a small core framework with lots of modules (and some modules would depend on other modules). I would also separate code according do MVC2 model, then making new module would mean creating new "actions", "datasources", "businness logic" and "views". Sample links (look at applications' source code also): MVC: http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html MVC implemented in PHP (but IMO it is too much "java-like"): http://phrame.sf.net Xaraya - modular CMS in PHP: http://www.xaraya.com Miranda - very modular application (IM for Windows): http://miranda-icq.sourceforge.net/ -- Regards, Michal mailto:mi...@wp... |