SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Addict
    Join Date
    Jun 2008
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    FrameWork & Template Engine Pros/Cons

    Hiya,

    What are the Pros/Cons of using a FrameWork & a Template Engine?
    Also, what are the main roles for/of a FrameWork?

  2. #2
    SitePoint Wizard triexa's Avatar
    Join Date
    Dec 2002
    Location
    Canada
    Posts
    2,476
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The main thing I like about a template engine is that it sort of forces you to separate display and logic by its very nature. It also means that I can Create what I need to create and then someone with no programming experience can go ahead and make changes much more easily.
    AskItOnline.com - Need answers? Ask it online.
    Create powerful online surveys with ease in minutes!
    Sign up for your FREE account today!
    Follow us on Twitter

  3. #3
    Use The Cloud
    Join Date
    Jan 2006
    Location
    Boise, ID
    Posts
    556
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Advantages of using a framework for any modern project:

    1. Significantly increased development efficiency
    2. Easier to get new developers up to speed because of standards


    Disadvantages:

    1. Might be marginally slower than custom app for large volume


    Since it costs $50,000/yr to employ one reasonably competent person, but that amount could get you a very powerful server setup, it makes sense to choose the former.
    Brad Hanson, Web Applications & Scalability Specialist
    ► Is your website outgrowing its current hosting solution?
    ► PM me for a FREE scalability consult!
    ► USA Based: Available by Phone, Skype, AIM, and E-mail.

  4. #4
    SitePoint Addict
    Join Date
    Jun 2008
    Posts
    279
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by triexa View Post
    The main thing I like about a template engine is that it sort of forces you to separate display and logic by its very nature. It also means that I can Create what I need to create and then someone with no programming experience can go ahead and make changes much more easily.
    Can't the FrameWork/PHP alone do that, without using a Template Engine? - Using the require or Require_Once functions?

    I'm still getting my head around these two techniques, and still wonder whether or not it is a good root to go down, whilst developer my app that will eventually feature many features.

  5. #5
    SitePoint Wizard Hammer65's Avatar
    Join Date
    Nov 2004
    Location
    Lincoln Nebraska
    Posts
    1,161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I suppose it depends on what you mean by a template engine. If that means a system like Smarty, then in my experience, the ONLY advantage, is if some non-creative office jockey is given the job of updating the web site through a CMS, it keeps them out of trouble. They won't be running exec or deleting files quite as easily.

    However, views in a framework system are essentially templates. They're just mixed HTML/php instead of being "compiled" first by a Smarty like template engine. You still dump variables into them and display them. You might have a few loops or conditionals, but all the logic is separate. They're output cant also be cached. Within my framework, I ended up essentially copying the basics of the Smarty API (assign(), fetch(), display() with caching) but no "compiling", just using run of the mill mixed HTML and PHP.
    Visit my blog
    PHP && Life
    for technology articles and musings.


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
  •