From: alex b. <en...@tu...> - 2001-07-16 02:29:40
|
> Justin, > > I have tried only briefly to go beyond normal "wow the hello world > works" test on BC. I found it very hard to do what you just mentioned. > For example I wanted to use a 'database' module to perform the query but > you guessed it, it's hard to refer to the module without reverting to > using a global variable. Remember that modules are _only_ intended for presentation - they _are_not_ libraries. If you need general functionality for your applications, make libraries and put them in user/lib/, and include them in your modules as normal. Modules are _only_ for getting output to a page. Modules can include header redirects, etc - but it's bad form to have a silent logic-only module. And it will be a pain in the ass to work with :) I don't have any "very" complex modules in any of my projects, including large projects. There is never a reason to put that much code in a module. Of course you can, if you want. > So I have decided to leave BC for now, and wait till Alex has sorted out > the "Manager" classes and integrated a more complete working system > before I shall spend my time looking at it again. I suggest you read the above. Modules are not the be-all-and-end-all. > I particularly find that it ridiculous and tedious to have to write 4 > different files to create one simple page. (the htdocs, the layout > template, the module, and module specific layout). You don't need a layout template per page. As opposed to? How would you suggest cutting down that number, but retaining all the abilities of the system? Also, remember that doing page definitions will be made a hell of a lot easier by a page editor, and by the fact that pages will be done in XML. Each module will have a declaration file (probably similar to pear's package declaration format) which will allow a page editor to provide the user with a list of modules. best, _alex |