What is the difference between the framework and smarty? How can this problem be solved?

Source: Internet
Author: User
What is the difference between the framework and smarty? Some people say that smarty is a framework, and I think it's a strange thing .. Thank you for your help. Thank you !, Smarty is not a PHP framework, but a template. This type of CI belongs to the framework ., Smarty is a template. The framework is like the foundation of a building. no matter how the building is built, the method for building the foundation is always similar. what is the difference between the framework and smarty?
Some people say that smarty is a framework, and I think it's a strange thing ..

Thank you for your help. Thank you!

------ Solution --------------------
Smarty is not a PHP framework, but a template. This type of CI belongs to the framework.
------ Solution --------------------
Smarty is a template
------ Solution --------------------
The framework is like the foundation of a building. no matter how the building is built, the method of building the foundation is always similar.
During program development, you will find that there are many similar and reusable items between each program, if you accumulate these similar things after each project, the code can be called a library. when the library becomes more and more powerful and even the program structure can be reused, you can call the framework.
Template engine, you can understand that the construction team paint, they are professional paint, the building does not need to worry about how paint brush, paint brush does not pay attention to how the building is built.

In fact, the main role of the template engine is to separate the logic and display. it may initially be to allow programmers and the artist to better cooperate, I think you often write php code and html code together. you can understand it yourself, but artists may not necessarily understand it. they may only understand html and css, furthermore, if the artist adds complex css or js to the mixed code, you will not understand it, which brings great difficulties to program development. therefore, the template engine separates the logic from the display. the programmer only needs to focus on the logic, prepare the data at the end of the program, and then pass the data to the template, as long as the artist modifies the template without considering the program logic, the template technology is often used in team development.

------ Solution --------------------
The template engine translates a template into a php file.
At present, it is better to use the php label directly.

My framework is to use the php original tag.

Alternative process control syntax
PHP provides alternative syntaxes for process control, including if, while, for, foreach, and switch. The basic form of the alternative syntax is to replace left curly braces ({) with colons (:) and right curly braces (}) with endif;, endwhile;, endfor;, endforeach; and endswitch ;.


Queryphp simple mvc orm framework
---------------------------------------------
Http://topic.csdn.net/u/20100310/11/62a60067-b3da-4dee-9d6a-f1baeb2f3f33.html
------ Solution --------------------
What is the definition of the framework?

-- Wikipedia --
A framework is a basic conceptual structure used to solve or address complex issues, usually a set of tools, materials or components.

If you say this, smarty can also calculate
------ Solution --------------------
The framework is like a cornerstone, and smarty is like building decoration.
------ Solution --------------------
Discussion
The framework is like the foundation of a building. no matter how the building is built, the method of building the foundation is always similar.
During program development, you will find that there are many similar and reusable items between each program, if you accumulate these similar things after each project, the code can be called a library. when the library becomes more and more powerful and even the program structure can be reused, you can call the framework.
Template engine, you can understand that the construction team paint, they are professional paint, the building does not need to worry about how paint brush, paint brush does not pay attention to how the building is built.

In fact, the main role of the template engine is to separate the logic and display. it may initially be to allow programmers and the artist to better cooperate, I think you often write php code and html code together. you can understand it yourself, but artists may not necessarily understand it. they may only understand html and css, furthermore, if the artist adds complex css or js to the mixed code, you will not understand it, which brings great difficulties to program development. therefore, the template engine separates the logic from the display. the programmer only needs to focus on the logic, prepare the data at the end of the program, and then pass the data to the template, as long as the artist modifies the template without considering the program logic, the template technology is often used in team development.


------ Solution --------------------
Actually, smarty is also a framework, but it is not pure!
------ Solution --------------------
Smarty is a pure template. many frameworks use the smarty template, but it is not a template.
------ Solution --------------------
Smarty is a template engine and has never been used ~~~~~~~~~ ·
------ Solution --------------------
Smarty is template zend is Framework
------ Solution --------------------
Smarty is just a template engine !!
------ Solution --------------------
Smarty separates programs and templates,
The framework not only provides the MVC environment, but also brings a lot of convenience to programmers. my idea is this.
------ Solution --------------------
Smarty is just a template system. if you do not understand anything in the future, go to the wiki.
------ Solution --------------------
Discussion
Some people say that smarty is a framework, and I think it's a strange thing ..

Thank you for your help. Thank you!

------ Solution --------------------
I don't know...
------ Solution --------------------
Discussion
Smarty separates programs and templates,
The framework not only provides the MVC environment, but also brings a lot of convenience to programmers. my idea is this.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.