User:Matrika Rohatgi

CanJS is a client side MVC library for building web applications. It simplifies the development of complex programs. It provides all the structure of the MVC (Model-View-Control) pattern along with templates with live binding and routing support. One of it's advantages is that it has a rich set of extensions and plugins and supports jQuery, Zepto, Mootools, YUI and Dojo. It was introduced in 2012 by Bitovi.[1]

Features of Can JS

  • Can JS is flexible[2]. This is possible because Can JS supports multiple libraries and frameworks. For example, if we would like to share our code between disparate platforms such as a Zepto mobile app and a jQuery desktop app, we can do so using Can JS. Although CanJS is extracted from JavaScriptMVC it can support almost all of its MVC functionality through plugins.
  • Can JS occupies very little size, compared to other Javascript frameworks such as Angular or Ember.[3] Hence, it has very high speed. This high speed is also achieved by live-binding, which updates only when required.

Packages that are included in Can JS:

  • can.Construct – A Package for inheritable constructor functions
  • can.Observe – A package for key-value binding
  • can.Model – A package that observes connected to a RESTful JSON interface
  • can.view – A package for template loading, caching, rendering
  • can.EJS – A package for live binding of templates
  • can.Control – A package for declarative event bindings
  • can.route – A package for back button and bookmarking

Migrating Can JS 2.0

Although Can JS 2.0 is very backward compatible with Can JS 1.1, yet there needs to be some changes when migrating from Can JS 1.1 to Can JS 2.0.[4] Can JS 2.0 introduced new features

  • 2 way bindings
  • custom elements with can.Component
  • mustache event bindings

References

  1. ^ "Introducing CanJS - Blog • Bitovi.com". Retrieved 2015-09-12.
  2. ^ "CanJS - Why CanJS?". canjs.com. Retrieved 2015-09-12.
  3. ^ "CanJS - Why CanJS?". canjs.com. Retrieved 2015-09-12.
  4. ^ "CanJS - Migrating to 2.0". canjs.com. Retrieved 2015-09-12.

Content Disclaimer

Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.

  1. The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
  2. There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
  3. It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
  4. Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.