#16
  1. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: PhpLib vs. FastTemplate


    If I'm understanding correctly, PhpLib templating allows nesting templates, where FastTemplate does not. I've also been led to believe that FastTemplates was ported over to php from perl, where PhpLib is written in native php, and therefore runs more efficiently, I.E. FastTemplates uses ereg_replace, PHPLIb uses preg_replace which is touted to be faster.
    If anyone knows these points to be false, please say so.
    THNX
  2. #17
  3. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Is this wisdom generally accepted


    For our web app I decided to go ahead and try Leon Atkinsons "FreeEnergy" approach.
    It was more work up front, but is saving me time in the long run as the site grows. I think the overall methodology at least deserves a look if your considering a web app in php that has the potential to grow over time. (IMHO). Sure it uses more "includes" than other approaches, but fast hardware is cheap, developement/maintenance time is not.
    Cheers.
  4. #18
  5. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: PhpLib vs. FastTemplate


    Libraries and classes don't hit performance that much. Even though a large library script may need to be loaded on the server-side, not all that data needs to make it's way to the client's browser (which could be in Zimbabwe over a 14.4k modem).
  6. #19
  7. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: Any advantage when ...?


    Interesting question. I have no answer, but why do you ask?
  8. #20
  9. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: PhpLib vs. FastTemplate


    But PhpLib has a preappend on each page. You have to edit the php config file. Does that preappend really only load the libraries? or is it actually loading some code that is run too. I thought it was the later.
  10. #21
  11. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    What about TemplatePower?


    Recently i developed a PHP4 class for templates. Its called TemplatePower and its about 6 times faster than FastTemplate. You can read more about it at:
    <br />
    <br />
    http://templatepower.codocad.com
    <br />
    <br />
    please let me know what you think of it.
    <br />
    <br />
    tnx
  12. #22
  13. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Etc...


    While many comments have brought very good issues such as caching templates, using different methods to separate presentation from logic, the main issue in the comments is whether or not to even separate presentation from logic.

    Here is a real world example where being able to separate presentation from logic won me a contract on a project:

    A potential client wanted to move his site from static HTML pages to a database centered site. He didn't know anything about HTML and wanted to be able to update the site himself and have his friend who knew graphic design, update the look every now and then.

    The client certainly didn't know HTML let alone PHP and his friend only used Dreamweaver. If I could set up the solution so that every page could be generated dynamically but also isolate the presentation and the PHP code, he would not have done it.

    Being able to do this gave me money and experience. I hope this helps people figure out if the need to knbow about it or not. Keep in mind, this tutorial was intended to demonstrate separating presentation from logic, not advocating strictly FastTemplate. Some people use PHPLib or create their own such as the gentleman who posted recently. Find out what works given the circumstances.
    Ian Felton
  14. #23
  15. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    XTemplate


    try http://xtpl.sourceforge.net much improvements, better and faster than FastTemplate,PHPLib Template and EasyTemplate together (i've tried all)

    ciao dennis (from germany)
  16. #24
  17. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: XTemplate


    I would like to know what you think of TemplatePower where I wrote about.

    http://templatepower.codocad.com

  18. #25
  19. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    FastTemplate is not really Object Oriented


    Hm, someone says, that FastTemplate is Object Oriented. OKi it is but wait a minute! You need only *ONE* object for doing whole stuff.

    The one of the main points of object oriented architectore is that objects are created (derived from classes) as they are in normal life. So than tell me, why FastTemplate don't use one-to-one model? One object will belong to one template and you will not need to use some specials keyqords like in FastTemplate.

    In fact I can't find any one-to-one template system and I don't know why. I wrote my own, but I'm so confused. People don't know the basics of OO modeling or am I thinking in wrong way?

    So the question at the end. Why is FastTemplate object oriented since you need only one object for whole stuff?!
  20. #26
  21. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    full examples please


    I really this idea nomatter if you call it OO or not. If this works and it seems to do so then it is great. I am new to all this and I am trying to get it to work for me, but I can't seem to do it. I would like a real full example including the database with it. I would like to separate the content from the database (tables) from the presentation of the output of the database but I can't seem to do it as of yet. Can anyone send me a full detailed example of how to do it? I can do the first example show in this article but not the MySQL database driven example (the last one).
    So if anyone can tell me how to do this please I would be very grateful.

    Thanks in advance.

    Co.
  22. #27
  23. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    !!!


    !!!
  24. #28
  25. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    Re: What about TemplatePower?


    tdf
  26. #29
  27. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    They go hand in hand


    Logic and Graphic Design go hand in hand. The rules of web design is that the site should be both visually stimulating and easy to navigate. In order to achive both of these goals you must think of both the design but think of it in a logical order. If the site is confusing such as using things like &quot;magic meat&quot; (buttons that you are not sure of where you are going untill you roll over them) then the users can become confused as to what they are suppose to do with the site.
    <br />
    Think logically about you design.
    <br />
    Glen
    <br />
    www.PhotoShopFive.com
    <br />
  28. #30
  29. No Profile Picture
    guest
    Guest
    Devshed Newbie (0 - 499 posts)

    PHP script inside a template?


    Hi,

    I have implemented the FastTemplateClass, but i was very surprised to see that it couldnt parse any php script inside a template. it doesnt take it as a PHP tag.

    Any ideas or fix please??

IMN logo majestic logo threadwatch logo seochat tools logo