SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Thread: PHP & Beans??

  1. #1
    SitePoint Addict crabby80's Avatar
    Join Date
    May 2007
    Posts
    387
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    PHP & Beans??

    Hi guys,

    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??

    Any thoughts

  2. #2
    SitePoint Evangelist
    Join Date
    Aug 2005
    Location
    Winnipeg
    Posts
    498
    Mentioned
    0 Post(s)
    Tagged
    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?

    Cheers,
    Alex
    The only constant in software is change itself


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •