I recently watched AngularJS and lamented its strength. At the same time, questions are raised. Does the traditional backend MVC not need the View layer. For example, laravel is used. You only need to upload data to the page. The template is no longer written. Or does the View in the backend still need it? I recently watched AngularJS and lamented its strength. At the same time, questions are raised. Does the traditional backend MVC not need the View layer.
For example, laravel is used. You only need to upload data to the page. The template is no longer written.
Or does the View in the backend still need it? Reply content: to discuss such issues, we should start from the actual situation and scenario.
The answer is necessary.
- Not all requirements and scenarios can be solved using AngularJS; AngularJS has its own advantages, but its disadvantages are also obvious, heavy and not refined; Lack of SEO support, etc;
- Team composition, no one will use AngularJS, or a large number of non-front-end developers, supporting various O & M facilities, and even the entire company's technical architecture isJavaWhen binding (from developers, architecture, and O & M), what should I do? AngularJS has some advantages in this regard and is friendly to such developers;
In some scenarios, the backend only needs to perform API operations, and other View-related tasks can be handled by AngularJS. But this is not omnipotent! It depends on the precise definition of your so-called view! In a spa system, although there are no large number of pages, for the backend, the real view part of the code exists, but the output method and range are different: the variables originally shared to the page were changed to the json service form; the original server-side rendering was changed to the client (ajax) request and then rendered.
However, in the backend design architecture, the mvc pattern vis like this, and there is no substantial change because angularjs is introduced at the front end! Now it's all a set of backend, and there are several UIs that adapt to display. In this way, wearing data is definitely the best angularjs that can basically help you complete all page-based things. In a sense, it can be said that some view functions are replaced. Generally, the APIs are called directly using angularjs at the frontend in the background.