Facebook Profile : http://www.facebook.com/ersin.guvenc
Twitter: http://twitter.com/develturk
Email: eguvenc@gmail.com
Facebook Profile : http://www.facebook.com/ersin.guvenc
Twitter: http://twitter.com/develturk
Email: eguvenc@gmail.com
1:40 am
Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.
Quick question. Is a registry really necessary or good practice? If so for what items? Controllers? Views?
For example if you’ve heard of Flourish(www.flourishlib.com) they use autoloading static functions. Is that a better solution then a registry? or worse? Or maybe have both work together?
Just a question cause i cant find any pros and cons regarding registry class nor autoloading static classes. You seem to, pardon my french, “know your shit”
so I figured your my best source for answers heh
I think using __autoload functionality in a php5 framework uneccessary , isn’t good idea beacuse its not flexible for centralized jobs. When your codes grow up you will see you can’t control them easily. (also this same for __get , __set functionalities ).
It just include files automatically this is very basic functionality.It does not make sense anything for memory performance of our framework.
You know configurable and intelligible codes heart of a framework.You should use __autoload functionality for standalone scripts.
And Registry functionality not same with __autoload , registry is a automation tool for Singleton Pattern. Look at. (http://develturk.com/2009/04/17/prevent-duplication-of-memory-with-php5-singleton-design-pattern/)
Thanks for your good questions.