OO Programming in CMSMS

Talk about writing modules and plugins for CMS Made Simple, or about specific core functionality. This board is for PHP programmers that are contributing to CMSMS not for site developers
Post Reply
totophe
Forum Members
Forum Members
Posts: 63
Joined: Wed Feb 21, 2007 9:30 am

Re: OO Programming in CMSMS

Post by totophe »

It would be a great idea :-)
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: OO Programming in CMSMS

Post by calguy1000 »

Look at CGExtensions and any module that extends cgextensions.
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
gerry
New Member
New Member
Posts: 2
Joined: Fri Jan 22, 2010 12:15 pm

Re: OO Programming in CMSMS

Post by gerry »

Can you be a bit more precise what to look at?
totophe
Forum Members
Forum Members
Posts: 63
Joined: Wed Feb 21, 2007 9:30 am

Re: OO Programming in CMSMS

Post by totophe »

Could be a CORE feature, and not a hack...
gerry
New Member
New Member
Posts: 2
Joined: Fri Jan 22, 2010 12:15 pm

Re: OO Programming in CMSMS

Post by gerry »

After further investigation I realize why it's working for you but isn't for me. I am in fact trying to create an abstract class (one that isnt a full-fledged module itself) and have my modules extend from that. Current mechanics only allow me to create fat classes which implement everything, not really what I had in mind.

Anyway, I believe the way CMSMS loads modules needs to be addressed, if not only because looping through every parent for every declared class scales very badly (exponentially even) and is a hugely inefficient way of doing what you are trying to do. On top of that, it will make modules and their classes behave like any PHP developer would expect them to behave.
Last edited by gerry on Mon Jan 25, 2010 10:26 am, edited 1 time in total.
calguy1000
Support Guru
Support Guru
Posts: 8169
Joined: Tue Oct 19, 2004 6:44 pm
Location: Fernie British Columbia, Canada

Re: OO Programming in CMSMS

Post by calguy1000 »

CMS 1.7.1 will have a class autoloader...
Follow me on twitter
Please post system information from "Extensions >> System Information" (there is a bbcode option) on all posts asking for assistance.
--------------------
If you can't bother explaining your problem well, you shouldn't expect much in the way of assistance.
Post Reply

Return to “Developers Discussion”