Use of factory objects and object extension

News and discussion about beta versions and CVS changes
User avatar
matt_t_hat
Posts: 1123
Joined: Sun Aug 21, 2005 4:45 pm
Location: UK
Contact:

Use of factory objects and object extension

Postby matt_t_hat » Wed Aug 31, 2011 4:03 pm

I'd like to put a slightly out-side-of-the-box idea out there for consideration.

Currently the only factory object we use is MANAGER which builds plugin objects and returns the ref. This is because NP_MyPlugin extends plugin. This is cool.

I'd like to suggest a process whereby an advanced developer could radically alter the behavior of some item/user objects. The assumption would be that a user is of type USER which would complimentary the USER-Interface. However it would be very useful if I (or other users) could make users of type CUSTOM and then CUSTOM would extend USER and implement USER-Interface and allow radical alteration of how a user object might behave.

Now it might be possible for features that could be made this way using the plugin system but this would be a more powerful and pure OOD way of managing things. Likewise I'd like to see this model used for BLOG and ITEM.

The changes once in would mean that the standard install behaves in exactly the same way as before but the core behaviour could be changed without core hacks.

The way this would work would be an additional entry in the table for each object stating object type (if notset or null then default behaviour).

It might sound a bit radical but it will enable me to take Nucleus places that I hope would make people smile.

Return to “Core Development”