How to realize the separation and development of the front and back
Source: Internet
Author: User
Why to do the separation development:
Now many companies ' web development models are using JSP, PHP, ASP, etc. development, by the service side rendering, and the front-end engineer's job is to complete the Chettu and static pages of the building, their energy is placed in assisting others to complete the project work, back pot is not pleasing, the division of responsibility is not clear. Therefore, the topic to be discussed today is the development of the front and back end separation, so that the front-end engineers work more full, more valuable.
how to achieve back and forth separation:
In order to realize the separation and development of the front and back end is not difficult, predecessors have a lot of experience, such as: Angular, Vue (1x 2x) and so on.
First of all, Angular.js, the first reason is that the framework is too heavy, now all pay attention to lightweight development, not to mention the framework is too old.
Again, Vue 1x, this framework is actually similar to angular, the local no server, client rendering more convenient, easy to use, directly through the script src= "" into the library file can be deployed in the static service can be run, In fact, this is still very recommended to use, easy to use, with simple, local no server, very practical method of separating the front and back ends.
Again, Vue 2x (CLI), this is relatively tall, a bit of the front-end project meaning, combined with the node.js, with the local server routing and configuration files, but also to achieve the component development, improve the reuse rate, novice directly to use the words or a bit can not find a clue, suggest the Vue 1x figured it out, Ajax figured out how to learn in the hands-on. North wide and so on the first big cities use also more, in the future may become the mainstream web development framework, suggest learning.
jquery to achieve the front and rear separation, in fact, Jq+ajax can be implemented before and after the separation, that is, there is no route ... Very embarrassed, there is a very high cost of development, the front-end rendering method is very simple and cumbersome, nothing more than Appen (), HTML (), text () and so on some methods, but the online jquery plug-ins particularly much more special, with jquery words also very striking, also recommended to use
The last thing to say is the node+express+ejs/jade of the front and back end of the development, this is the mainstream development approach, node Framework Express can provide local services and routes, with the Magic Board engine JADE+EJS can achieve rapid development, Some complex data structure processing can also be completed in the node program, in fact, Node played a role in the middle layer, back-end docking java/php interface, front-end docking Ejs/jade Magic Board engine, to achieve front-end service-side page rendering, very tall. The disadvantage is that you write the node program once the error will be completely collapsed you will not be able to block the wrong words would die very miserably, be cautious.
Well, the above is purely my personal opinion, if there are different views please give me a message
(This article belongs to original works, reproduced please indicate the source)
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.