Quantcast
Channel: JavaScript – Jonathan Jeter
Viewing all articles
Browse latest Browse all 14

You Got your MVC into my Components: Adding Bindings to Enyo

$
0
0

by Ben Combee at the HTML5 Texas Conference in Austin, TX

Enyo (http://enyojs.com) started as an web application framework, focusing on the problem of effectively building reusable UI components.  However, many app developers view problems through a Model-View-Controller (MVC) point-of-view where the UI is seen as a templating problem.  This talk looks at how the Enyo framework evolved in late 2012 to take on aspects of MVC, integrating support for Backbone models and data binding into our component & message passing architecture.  In doing so, it reveals what these two worlds can learn from each other, and how they both play into future work on the “web platform”.

Adding bindings to EnyoEnyo help build html apps with the feel of native apps.

A new way of thinking

How do you keep application state?

Templates are not enough. Interactive controls are hard to put into templates.

UI Plugins are not enough because in application development you have to maintain state and other things that aren’t necessary on the desktop.

The huge advantage of enyo is that it is a fully encapsulated object and can be re-used throughout the application. markup, event handling, logic/state, user state, etc.

You can easily combine and reuse views.

The goal is to never have to touch the HTML and just use components with css applied.

Complexity Alert

  • Components can lead to complexity
  • Data isn’t centralizes
  • Lots of broilerplate code repeated over and over

MVC

Other Patterns

  • MVP (mode view presenter)
  • MVVM (model view modelview)
  • MD (model delegate)
  • MI
  • HMVC
  • PAC
  • MPVC
  • FLA
  • TIP

EMV (Enyo-model-view-something)

  • Allows tight or lose coupling of views and controllers
  • Allows view-owned-controllers and controller-owned-views
  • Introduces the observer pattern, computed properties, the mixin pattern and bindings
  • A ton of other cool features, improvements and added versatility

Integration with Backbone

  • a controller that knows how to interact with backbone.collection
  • a controller that knows how to work with backbone.model

At this point, the talk went into details of how you actually program in Enyo.

Here's what I think about , ,

What people are looking for when they find this page: Jonathan Jeter, adding bindings to enyo, enyo up and running download, enyojs mvc, maintain the data across vertical tabs in mvc 2012, mvc ui components, svn insert broilerplate code, you got your component


Viewing all articles
Browse latest Browse all 14

Trending Articles