What are the differences between building pages using angularjs and building pages using the php template engine?
Reply content:
What is the difference between building a page using angularjs and building a page using the php template engine?
Pages built by angular can respond to events, bind data in both directions, and display user submissions without refreshing, improving user experience
Angular tags can be customized based on your needs and imagination. php template tags are still limited to a few limited html tags.
Php template rendering involves a large number of client request servers. The pressure on rendering templates is concentrated on the server. The cpu pressure increases linearly with the increase of concurrency, the pressure on angular rendering templates is distributed to each client computer. When the client concurrency increases, there is no pressure on the server.
After rendering, the php template transmits the same html tag for multiple requests, occupying the bandwidth. The angular template is transmitted only when it is loaded for the first time, subsequent requests only transmit data, which consumes less bandwidth and is more suitable for mobile clients.
Html generated by a php template does not involve complex JavaScript code. all browsers must be compatible with angualar templates at least ie8.
Php is the dom generated by the server. Angularjs and other front-end frameworks are front-end dom generation