what's the difference between PHP Framewor and PHP Template Engine?
Are Template engines included as part of a framework???
please help me,
thanks a lot !
PHP Framewor and PHP Template Engine
Moderator: General Moderators
A template engine usually renders HTML-Templates, e.g. it writes values from a database into a predefined, static layout (the template).
A framework is usually a set of developer tools to facilitate and speed up application production. Whether or not template engines are part of a framework is entirely optional.
A framework is usually a set of developer tools to facilitate and speed up application production. Whether or not template engines are part of a framework is entirely optional.
As Patrik mentioned, a template engine is solely concerned with presentation. A script defines a bunch of data and passes it to the template engine for display.
A framework is maybe best understood in comparison with a library. A library is a bunch of simple tools which you can use in any way you like. A framework solves some of the design problems of application building and you must fit your application into this structure. Framework components will have been designed to work smoothly together and may or may not work outside the framework environment.
Which parts of your own code are "library" or "framework" is kind of an interesting design issue. As a rule I try to refactor any framework stuff out of classes as much as possible. The fewer assumptions objects make about the environment in which they are called the better.
A framework is maybe best understood in comparison with a library. A library is a bunch of simple tools which you can use in any way you like. A framework solves some of the design problems of application building and you must fit your application into this structure. Framework components will have been designed to work smoothly together and may or may not work outside the framework environment.
Which parts of your own code are "library" or "framework" is kind of an interesting design issue. As a rule I try to refactor any framework stuff out of classes as much as possible. The fewer assumptions objects make about the environment in which they are called the better.
Thank you your answers.
But I also can't understand it exactly,
could you please give me more detail.
A framework is an integrated set of components that collaborate to provide a reusable architecture for a family of related applications. An MVC Framework helps us build applications using the MVC pattern.
for example: PHP.mvc, Mojavi, PRADO ...
Template Engine is used to separate presentation layout and style from view logic.
for example: Smarty or WYSIWYG HTML editors???
But I also can't understand it exactly,
could you please give me more detail.
A framework is an integrated set of components that collaborate to provide a reusable architecture for a family of related applications. An MVC Framework helps us build applications using the MVC pattern.
for example: PHP.mvc, Mojavi, PRADO ...
Template Engine is used to separate presentation layout and style from view logic.
for example: Smarty or WYSIWYG HTML editors???