CanJS - Plugins

canjs

  1. define
  2. super - allows you to easily call base methods by making this._super available in inherited methods - http://canjs.com/docs/can.Construct.super.html
  3. proxy - creates a static callback function that sets the value of this to an instance of the constructor function - http://canjs.com/docs/can.Construct.proxy.html
  4. http://canjs.com/docs/can.Control.route.html
  5. bacon - can.bacon is a CanJS plugin that lets you create Bacon.js EventStreams and Propertys from CanJS event handlers, as well as feed Bacon observable streams back into CanJS observables. The result is a delicious, canned-bacon-flavored mix of FRP and CanJS-style declarative MVC. Bacon.js is small functional reactive programming lib for JavaScript.
  6. https://github.com/stevenvachon/can-boilerplate - A scaffolding solution
  7. https://github.com/canjs/can-compile
  8. https://github.com/stevenvachon/can-transition
  9. https://github.com/canjs/canjs/tree/master/model/queue

Does CanJS support a plugin architecture?

Yes. On the http://canjs.com web site, it displays a link with the number of plugins submitted. If you click on this link, it takes you to a page that doesn't display anything. If you just mouse over this link, it will display an in-page popup that list the submitted plugins, and you can click on the individual plugin. At the bottom of the popup, the is a "more" link, and that seems to work as well.

CanJS is extracted from JavaScriptMVC, but currently supports almost all of its MVC functionality through plugins. Start small, with its basic functionality, and extend it with plugins that handle things like:

  • setters
  • serialization / deserialization
  • jQuery plugin generation
  • validations
  • calling super methods
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License