MDV for Web Applications

November 1st, 2011 – Max Motovilov

In the last few years, we’ve been seeing a rebirth of client-server architecture as applied to Web applications, where browser-based JavaScript frontend encapsulates all of the UI functionality and interacts with the backend over a well defined service API. A recently emerged approach to designing such frontends is “model-driven views”: it eschews the concept of widgets in favor of template-based views constantly updated to reflect changes in the data model and lightweight behavior classes that encapsulate event processing alone. This presentation will describe a production quality framework built to support this architectural paradigm and demonstrate its use on a simple example.

1. Domain area
– Frontend and backend: designed together, implemented separately
– The new client-server: clear separation of roles between frontend and backend, well defined service APIs
– Integrated Web applications as opposed to public Web services

2. The paradigm
– The new client-server from the standpoint of MVC model
– Model-driven views vs. connected widgets
– Model: shared object hierarchies and REST
– View: the template engine
– Controller: behavior classes as opposed to widgets

3. The libraries
– Project history and background info
– Template engine
– Compiler framework
– AST/data transformation primitives
– HTML template language
– Runtime capabilities: localization, asynchronous rendering, loader, animations
– Virtual object layer
– Urlspace and REST mapping
– Protocol
– Schema and in-memory representation
– Promises vs. watchers
– Containers: filtering and paging
– Server-side bindings
– Coordination with Dojo parser & widgets; writing behavior classes.

4. Putting it all together
– Code-along workshop implementing a simple one-page application with pre-existing backend (in Python/Django). I was thinking of creating a Web forum page but will consider alternative suggestions.

Be Sociable, Share!

Leave a Reply

You must be logged in to post a comment.