Backbone.js and Nodejs have something in common that they don't know.

Source: Internet
Author: User

Front-end aspects

I used backbone.js to do the front-end development, the impression is that the backend by the properties of the model object to send the JSON data, I write in the template rendering is good

    • Template loading (underscore.js)
    • Building a model
    • Render View
    • Routing, events, etc.
Back-end aspects

The two days of contact with Nodejs, originally intended to use Backbone to do the front-end structure, and then use the Nodejs for server development (using the Express framework), connect the database to the front end, but in the online search for information in the Nodejs template to write the front end, in the place of rendering such as

function (req, res) {Res.render (' index ', {title: ' Hey ', message: ' Hello there! ') });});

The second parameter of render is very much like the properties of the model in Backbone, and the data can be loaded directly with Mongoose to connect to Mongodb. That is not with Backbone with Nodejs of time Backbone inside of model module and render do not need to use? So I feel Backbone is useless?

Of course, what I said is probably wrong, I just want to know where I understand the problem. My question is as follows:

    • Backbone with Nodejs when the model module and render can be directly replaced by the similar module in Express?
    • Backbone and Nodejs in tune? What is the best way to use it?
    • Why is backbone.js suitable for single page development? Because of its routing?

Backbone.js and Nodejs have something in common that they don't know.

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.