You are here: Re: Extending classes at runtime « PHP Programming Language « IT news, forums, messages
Re: Extending classes at runtime

Posted by ptdorf on 09/06/07 14:40

yes but its way more than just wait for certain event to happen and
respond to it. maybe the audit module was not the best example (the
observer pattern fits perfect for the audit).

a more complex example: some sites dont need to manage user roles and
permissions. one admin takes care of all. but in others, this is
essential. when editing the objects, they need to set the roles you
want to grant some kind of access. in these case, the html and table
fields must be created on demand and then when running the list/show
action, the code to check your access it must decide to display to
this object or not must be called.

the tricky part is that all should be self contained. i dont want the
other modules (pages, documents) to be aware or to bother with this
stuff. i want them to be as lean as possible. their only concern is
manage and display their own basic data. so all the responsability
rest upon the roles module. its up to it to manage all this alone and
mess with the editing/display process. and if it isnt installed,
perfect. the site runs faster.

drupal amazing architecture allow this kind of behavior in a
procedural enviroment. but im using oop and mvc and i'd prefer a
cleaner code.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация