Extend of backbone Learning and Its summary

Source: Internet
Author: User

Backbone provides a convenient extend method to create child classes. That is to say, class inheritance is implemented in JS. The source code is easy to understand and will not be listed here. I believe everyone can understand it.

Model. extend = Collection. extend = Router. extend = View. extend = History. extend = extend;

By providing the on-site code, we can know that all the Model View Collection Router History objects in Backbone have extend methods. Therefore, the subclass they create also has the extend method.

 

Summary

Backbone can be said to be a lightweight JavaScript framework. The source code contains more than 1600 lines, but the function is indeed very powerful. At present, the more users there are, especially in the web app era, I believe that you will surely get an unexpected coding pleasure. Thanks to the authors of Backbone for offering us such a good thing!

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.