Results 1 to 2 of 2
Thread: PHP & Beans??
Mar 23, 2011, 12:20 #1
PHP & Beans??
Our PHP framework uses "Beans", a bean is a "structured unit of code that encapsulates a single logical entity", the idea is that this forces developers away from thinking about database tables and allows them to design classes based on logic rather than physical requirements.
All beans are loaded and accessed using a singleton "bean server" which is responsible for accessing beans from the db which are stored for the current user, this allows the user to work on an instance of an entity without saving but over a series of different requests.
There are 4 main types of beans, but essentially you have the main entity which is accessed via a facade.
Sorry for the long explaination, but has anyone ever used this type of paradigm in PHP? I assume this comes from the Java world??
Mar 23, 2011, 12:45 #2
- Join Date
- Aug 2005
- 0 Post(s)
- 0 Thread(s)
I've seen attempts made at emulating Java in PHP using the same terminology perhaps and maybe even the same paradigm.
What you call a bean, drupal calls a module and joomla calls a component and wordpress calls a plugin. Hence the mass confusion for newly introduced developers.
What was your question, again?
AlexThe only constant in software is change itself