5
Yep, I totally agree. If the wiki docs included some more info about how to implement objects in the XOOPS framework it would help. As would maybe a good example as reference.
The more I look into how many core modules are implemented the more you see the different implementations different devs take. This can also be confusing because as a module developer with multiple references that differ so much, you can get confused on which to take.
Onokazu himself seems to create a class, and then add a corresponding object handler class to take care of data manipulation between that class and the database. In fact, a majority of the kernel classes (which are written by onokazu) are done this way with an object then the corresponding object handler.
buennagel does the headlines and the poll module, but the implementation here is completely different. There is no handler class at all. The data manipulation methods are within that class. There is, however, a renderer class which has display methods. Some developers might keep some display code in the calling page or some of it in the templates pages, buennagel makes a class for that additional purpose.
These 2 are the original developers of all the core modules (at least it's credited that way, I'm sure bugfixes and upgrades have been done by others). Mith's module doesn't extend the object or object handler class and thus it looks completely different too. If you wanna take the OOP route within XOOPS which way do you go? What do you use as reference. I've only been working with PHP a few months on and off, it isn't clear to me yet why Onokazu separated all database manipulation methods into the handler class. Nor is it clear why you would make a renderer class when you have the template and page calling the class. It seems to me like you're putting presentation into an additional place, which doesn't seem necessary. It can be frustrating developing a module.
P.S. While I was looking at code examples in XOOPS, it looks like edituser.php uses 'if' functions to divide operations, while register.php uses switch/case, which to me, seems like the better option. Although it doesn't affect functionality, I wondered about inconsistency or perhaps there was a specific reason this was done.