Hi
I've been given the task to wrap my head around postnuke and write some code. While I can appreciate the nature of the project and it's broad scope, I feel the learning curve has been more steep than necessary. I have a few questions related to this:
1) why was postnuke not written in object oriented fashion? hunting down an elusive function in dozens of included files and included-in-included files is an unnecessary tedium ... not to mention the global variables ...
2) has anyone published some PhpDocs for postnuke? (like javaDoc) this would help....
thanks
-FRizzo
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- craigh responded to »Using PageUtil::addVar() to load script code« 03:29 PM
- michiel responded to »password problem« 10:01 AM
- mazdev responded to »Hide "Register new account" and change template to 3 col« 07:50 AM
- mesteele101 created topic »Zikula 1.3.3 - Site Search 1.5.2 - Unable to turn off plug-ins« 07:48 AM
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
Spaghetti-o Code???
-
**unknown user**
- Rank: Softmore
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 195
PN has evolved and gone through many design changes. Unfortunately each stage was never quite completed before the next was started. That is why it looks so complex.
There are two main module types: old and API-compliant.
The former type (News, Downloads, etc) uses many includes and duplicated code to work. These also use globals for many of their functions.
The new module type (htmlpages, FormExpress, Blocks, etc) leave the includes to the API. These modules are called up by the module API and in turn may call up their own and other module APIs without a single 'include'. The also do not need to use globals.
The old style modules interact with the theme using globals. The new style modules don't interact with the theme at all.
This will bring us on to the next style of module. The latest versions will interact with the templating engine being developed now (I know nothing about its progress though). This will require another rewrite to fix the modules up for that theming/templating engine. I fully expect many modules to be left behind though, as they are so complex to change. However, using just the third-generation modules should result in simpler code within the modules.
-- Jason
PS The API-compliance was meant to ring-fence the core code so that a module does not have to worry about what is or is not included - everything it should need would be available by default.
- Moderated by:
- Support
