SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Wizard
    Join Date
    Dec 2004
    Location
    USA
    Posts
    1,407
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    confusion between framework v. IDE v. templating

    I have been coding apps with PHP for several years. But I am getting more involved in larger and more complicated PHP applications and want to use best practices.

    I use Eclipse's PHP IDE. I doubt I am using it to its full extent but I want to learn more about, and compare and contrast, frameworks versus IDE versus templating systems.

    I know technically the IDE is the tool in which you code but there are frameworks associated with IDE - for example the PHP IDE for Eclipse.

    Can you use a any framework within any templating system?

    I want to learn now what is going to save time later.

    Please help straighten me out. Many thanks!

  2. #2
    . shoooo... silver trophy logic_earth's Avatar
    Join Date
    Oct 2005
    Location
    CA
    Posts
    9,013
    Mentioned
    8 Post(s)
    Tagged
    0 Thread(s)
    A framework is as defined by wikipedia:
    In software development, a Framework is a defined support structure in which another software project can be organized and developed. Typically, a framework may include support programs, code libraries and a scripting language amongst other software to help develop and glue together the different components of your project.

    So basicly it is a library of reuseable code.

    An IDE,
    Integrated Development Environment is just where you code.

    Templeting is separation of business logic from presentation.
    Logic without the fatal effects.
    All code snippets are licensed under WTFPL.


  3. #3
    SitePoint Wizard silver trophy kyberfabrikken's Avatar
    Join Date
    Jun 2004
    Location
    Copenhagen, Denmark
    Posts
    6,157
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    An IDE (Integrated Development Environment) is a desktop-application. At it's core is a text editor, but to call it an IDE, it will usually have some additional features for working with a programming language. It varies which these features will be, but syntax highlighting, file browser, version control and debugging are examples of often supplied features. Some languages are shipped with an IDE; .NET languages for example, are rarely used without Visual Studio. For most languages however, there are multiple IDE's to chose from. Some IDE's are tailored to suit a specific language, while other IDE's are generic, and can be used with many languages. Eclipse is an example of the latter, while Zend Studio is an example of the former (For PHP).

    A templating engine, is normally a library, implemented in PHP. The templating engine is a transformer, which takes one kind of input (the template), and generates HTML (Usually). The template has it's own mini-language, which describes how the transformation should happen. As such, the templating engine is a form of mini-interpreter, with a domain specific language. While most people agree that separating HTML generation into a component on its own is good practice, it has been argued that there is no need to invent a new language for something which PHP already is quite adept in.

    Framework is a vague term. It usually contains a programming library, but unlike libraries -- which are passive -- a framework tries to actively guide your applications architecture to greater or lesser extend. So the framework works on a more abstract level, than a library. All frameworks limit your possibilities. This is a two-edged sword really; In some respect, limitation is good, since it frees you from dealing with stuff, which you shouldn't. On the other hand, you may have specific needs, which doesn't fit well with the framework. The more the framework tries to govern you, the more pronounced will this problem becomes. To a certain degree, the framework can remedy this by applying a loosely coupled design.

    A lot of frameworks have a templating engine as part of their library-part. Most frameworks will allow you to replace the templating engine with a different templating engine.


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
  •