SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: FreeEnergy ???

  1. #1
    SitePoint Addict
    Join Date
    Nov 2000
    Location
    London, UK
    Posts
    223
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi All,
    I recently bought a copy of Leon Atkinson's Core PHP Programming. (BTW: Greatest book I've ever read, excluding Dune and the Lord of the Rings) It's a great resource, and I tend to always have it at my side (and even in my backpack at school if the PHP withdrawals come upon me during lunch period). Somewhere towards the end, it mentions something about a system called FreeEnergy, that uses a ton of includes and modules (actions, utilities, screens, layouts, navs, etc.), and just one index.php file, which includes these modules. All of the modules when included add some output to a stack, which is then popped and distributed by the final module to be added, normally a layout one.

    I was just wondering if anyone knew where I could find a tutorial on using this, or if they knew any more about it: it sounds like a very cool system, although processor intensive (but with the GHZ things out now, who even cares??), and makes it easy to update things and manage large amounts of stuff.

    Any info anyone?<pi>

    ... what's the world coming to?

  2. #2
    Dumb PHP codin' cat
    Join Date
    Aug 2000
    Location
    San Diego, CA
    Posts
    5,460
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    FreeEnergy has outlined in the following article
    http://www.zend.com/zend/art/free-energy.php
    is more a conecpt than a system. It is the ability, as you stated in your earlier post, to use a modularized method of coding a site. For instance if you include your mysql connection information, then you already sort of using this concept, at the smallest degree of course. I often use this approach by including classes for doing standard tasks, an object-oriented approach of sorts. Anyways I think that article will shed some light on it for you.
    Please don't PM me with questions.
    Use the forums, that is what they are here for.

  3. #3
    SitePoint Addict
    Join Date
    Nov 2000
    Location
    London, UK
    Posts
    223
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks a lot I'll check it out!
    I'm designing a site using a slightly modified version of this system, where basically all the files are included in the reverse order, with layout coming first and actions last. Each file shoots out whatever it needs to into a predefined variable (usually an array). Layout goes first, its a template with comments in it e.g. <!--leftnav-->
    Then the following ones will look for those and replace them with their stuff, using utils and actions to do so. Finally, the headers that have been outputed are sent, then the output variable is printed, and that's it! U got yourself dee page!

    Its probably less efficient or not as good programming tactics, but that's just what seemed easier to me, so there you have it..

    ... what's the world coming to?


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
  •