MVC On The Client In Javascript

by Jon Davis 1. April 2008 04:30

I stumbled across this over the weekend.

http://javascriptmvc.com/

I was actually very surprised by how closely it resembles what we've been working on at the office. Ours uses a controller to manage and control events and event propogation, track "view objects" (we call 'em "client controls" for drag-and-drop support in Visual Web Developer) and manage AJAX calls. And we've spec'd out to use RESTful URIs to manage data model retrieval and callbacks, and these are cacheable using Google Gears, Flash storage, or *shrug* cookies.

Theirs has a few additional features, though, some of which I think we can glean from, like:

  • script librarian ("Include"), which we don't need but I think we could accomplish using something like JSLoader
  • a complete ActiveRecord-like modeling pattern
  • a complete ASP-like templating system that executes on the client
  • "everything is a plug-in" philosophy

I like what I see, although our own framework goes further as it is built with ASP.NET, ASP.NET MVC, Visual Studio, and Expression Web all in mind. With ours, we enable our web designer, who is not an engineer, to create a complete, non-Flash RIA web pages without coding. Using Expression Web or Visual Web Developer, he can click on one of our controls in the Toolbox, drag it out to the page, absolutely position it, stylize it, give it a data source URI, and have it subscribe to other controls' events (think Flash video player, responding to the events of media playback controls). The entire multi-page web site will support executing in the rich execution environment of a single-page RIA application with a seamless user experience. And since the framework is not done in Flash (although Flash "client controls" are supported), it will support continuous extensions using the wonderfully universal languages of HTML and Javascript, both at design-time (creating new controls, customizing existing controls) and at runtime (RESTful fetches of web content, dynamic execution of JSON models, etc).

In some ways, ours is looking like http://www.wavemaker.com/, except that WaveMaker is based on Java and dojo, and the designer experience is in-page (which is way too much support overhead--why reinvent the designer when Visual Studio / Expression Web can do the job on its own?).

But I'd certainly recommend Javascript MVC (JavascriptMVC.com) as a skeleton foundation framework for someone to roll their own framework. We were thinking about open-sourcing our client bits once we are done with our prototype, but I think Javascript MVC comes close enough that it would do just as well to recommend that one instead. Mind you, I have never used it, I'm only suggesting it based on what I'm seeing at their web site.

kick it on DotNetKicks.com

 

Powered by BlogEngine.NET 1.4.5.0
Theme by Mads Kristensen

About the author

Jon Davis (aka "stimpy77") has been a programmer, developer, and consultant for web and Windows software solutions professionally since 1997, with experience ranging from OS and hardware support to DHTML programming to IIS/ASP web apps to Java network programming to Visual Basic applications to C# desktop apps.
 
Software in all forms is also his sole hobby, whether playing PC games or tinkering with programming them. "I was playing Defender on the Commodore 64," he reminisces, "when I decided at the age of 12 or so that I want to be a computer programmer when I grow up."

Jon was previously employed as a senior .NET developer at a very well-known Internet services company whom you're more likely than not to have directly done business with. However, this blog and all of jondavis.net have no affiliation with, and are not representative of, his former employer in any way.

Contact Me 


Tag cloud

Calendar

<<  August 2014  >>
MoTuWeThFrSaSu
28293031123
45678910
11121314151617
18192021222324
25262728293031
1234567

View posts in large calendar