Is Smarty outdated?

Source: Internet
Author: User
In the past, I never used smarty templates when I was engaged in PHP, but I used php directly. Today, I have nothing to worry about. I flipped through what is said to be the most popular PHP template-Smarty's document. I found that the syntax of Smarty is so weird that it is quite different from that of PHP, I don't want to go further. Today is July 22, July 10, 2015. I have never used the smarty template before when I started PHP. php is used directly. Today, I have nothing to worry about. I flipped through what is said to be the most popular PHP template-Smarty's document. I found that the syntax of Smarty is so weird that it is quite different from that of PHP, I don't want to go further.

Today is July 22,. By the way, I searched on segmentfault. In July of last year, someone asked a similar question-is there anyone using template technologies like Smarty ?, However, it was last year and I don't know what the situation is like this year. I would like to ask another question. I hope the passing PHPer can help me answer this question. I am very grateful.

-- PHP is used directly around the subject without a template. The company used Smarty in the past year, but since switching to the Yii framework, PHP has been used directly.

Reply content:

In the past, I never used smarty templates when I was engaged in PHP, but I used php directly. Today, I have nothing to worry about. I flipped through what is said to be the most popular PHP template-Smarty's document. I found that the syntax of Smarty is so weird that it is quite different from that of PHP, I don't want to go further.

Today is July 22,. By the way, I searched on segmentfault. In July of last year, someone asked a similar question-is there anyone using template technologies like Smarty ?, However, it was last year and I don't know what the situation is like this year. I would like to ask another question. I hope the passing PHPer can help me answer this question. I am very grateful.

-- PHP is used directly around the subject without a template. The company used Smarty in the past year, but since switching to the Yii framework, PHP has been used directly.

We have no smarty, but we also use the template engine.Twig. A well-designed template engine can save development time.

I personally think that the technology is not outdated, but it is inappropriate. If you use native php to write, you can use smarty to separate the front and back ends, but there will still be coupling, the vast majority of php frameworks have integrated the template engine, so smarty is obviously dispensable. Finally, I would like to thank smarty for its first time in the chaotic years of my growth. It really made me understand what mvc is. For Beginners, I can still play with this template engine.

I think that the idea of understanding MVC is more important than using smarty, which is just one of the template tools. In addition, the learning cost of smarty is relatively high, and the implementation is odd. It is more reliable to directly use the native php syntax to write templates.

I have such questions before. This was the case several years ago. Now I have strengthened my opinion. From the technical point of view, he is completely out of date, but from the perspective of packaging marketing, it is completely out of date. Wordpress smarty is not mentioned in the resume of a senior 7-8-year programmer. The salary is 3000 yuan lower than that of the programmer who just joined the interview.

The reason is that the boss has heard something, but does not understand it. He thinks that the talents who will be smarty are real programmers who are awesome programmers.
Real experience.

Smarty's syntax for writing tags with annotations is not as good as {}. However, this syntax can be put anywhere and IDE's syntax check is not allowed to report errors.

The idea of smarty is more or less embodied in every framework.

The idea of smarty is very important. smarty is just a tool. You need to develop a template idea. Our company uses the twig template technology. Other core points are similar. You don't have to worry about whether smarty is outdated, but whether you keep up with the pace.

Because of symfony, twig

A php template is a pseudo-proposition. php is a language born for the template.

No template engine + native PHP
The frameworks have been quite popular in recent years, and some template engines have been integrated.

The important thing is the smarty idea, which is embodied in many frameworks.

If you need static front-end pages to cope with high concurrency, the smarty built-in parameters can be used once configured, saving you time for development. In other aspects, apart from learning ideas, I feel that there is no reason to use smarty.

Tool, if there is no high performance requirements, it can be used, either use, or not, as to what is meaningless to use

You can use it if you want to use it.
We usetwig
If a project needs to be used, read the manual and use it. This is a simple tool and can be used as needed.
There is no need to tangle. It seems that it is of little significance to discuss it.

I'm just about to learn smarty ....

I have learned php by myself. A content publishing system was created in 10 days. I used wordpress ....... Currently, Java web programmer is used.

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.