JavaScript-what is the choice between single-page and back-end template rendering?

Source: Internet
Author: User
Tags comparison table
There are 2 types of development methods now in vogue:
1, single page
Front end through Angularjs, Emberjs or REACTJS, such as write single-page application, back end only provide data interface, on the back end appears front page and mobile app no difference, front and rear end completely separate. Example: Impression notes

2, back-end template rendering
Front-end to the back end to provide a written page, so that the back-end write template engine rendering page, this is a more traditional method, in addition to the writing Template engine rendering page work, the backend also to the mobile app to provide interface, the front-end is generally more relaxed, write static page can be, example: most of the site, such as Segmentfault

The problem is, if the site before the traditional back-end template rendering, and later on the mobile phone, back end also to provide the interface to the phone, then for consistency, back-end maintenance costs, I need to change the site to a single page application of the way?

Reply content:

There are 2 types of development methods now in vogue:
1, single page
Front end through Angularjs, Emberjs or REACTJS, such as write single-page application, back end only provide data interface, on the back end appears front page and mobile app no difference, front and rear end completely separate. Example: Impression notes

2, back-end template rendering
Front-end to the back end to provide a written page, so that the back-end write template engine rendering page, this is a more traditional method, in addition to the writing Template engine rendering page work, the backend also to the mobile app to provide interface, the front-end is generally more relaxed, write static page can be, example: most of the site, such as Segmentfault

The problem is, if the site before the traditional back-end template rendering, and later on the mobile phone, back end also to provide the interface to the phone, then for consistency, back-end maintenance costs, I need to change the site to a single page application of the way?

Make a comparison table for you:

Recruit a full stack development, the first screen server-side rendering good, behind the interaction, the front-end JS continue to write. We are based on react and front-end unification. The back end is divided into two layers the outer layer is also the front-end is responsible for node writing on the other side is Python write that person part-time DBA Jiangzi.

Before trying to use node to render the view, now in the angular rendering view, summed up, feel the latter more general, because as long as the interface is clear, the backend for anything can be connected, the back end is the same, as long as the API, the front-end for anything can be connected.

Low coupling for two easy development.

Now it's a trend. A lot of things are mobile, web,wap. Should we write a set of interfaces that can be called by three-side. This trend is also popular now. The front-end goes MVC, the server cuts down the view layer, walks the restful style, and focuses on the business logic and processing of the data.

If it's all restful APIs, it doesn't matter. You can also use node. js to do back-end rendering, the work is on your side.

Single-page front-end rendering SEO bad do

  • Related Article

    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.