MVC On The Client In Javascript

by Jon 4/1/2008 4:30:00 AM

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

Related posts

Comments

3/31/2008 6:54:22 PM

Anna Ullrich

Hi Jon,

I'm glad to hear Expression Web is fitting well within your designer / developer workflow. Has anyone on your team tried out the BETA of Expression Web 2 yet? It's available at:

www.microsoft.com/.../download.aspx?key=web2beta

I'd love to know more about the work your team is doing with Expression Web. If you'd like to chat with a handful of us from the Expression Web team, please email me!

Anna

Anna Ullrich us

3/31/2008 7:35:11 PM

Justin

Jon,
Thanks for the post! Maybe we could have JavaScriptMVC be another option for your rich development tools. We take care of the JavaScript, you build the tools?

In many ways, JavaScriptMVC's end goal is supporting these tools. It's how we got started, but we couldn't find a framework that could produce readable code.

Justin us

3/31/2008 8:11:14 PM

Jon

@Anna: I've installed it. Thanks so much for throwing in PHP support, btw! I haven't had a chance to play with it a whole lot yet, though, but thanks for the note!

@Justin: Smile I have been thinking a bit about adding a refactoring of our project to use your framework as a later initiative. Otherwise, I definitely have plans to get up to speed on your framework ... and perhaps also to add to it.

Jon us

3/31/2008 9:48:43 PM

Justin

@Jon: Sounds great. Let me know what you think of it. It's kinda rough right now. But I'm pretty much spending the next three weeks testing and hardening it.

Justin us

4/1/2008 1:26:55 PM

Dave

You might want to check out Steve Yen's Trimpath Junction (http://trimpath.com).

Dave us

4/1/2008 9:22:45 PM

c keene

Jon - glad you like WaveMaker's MVC architecture. The reason we put the studio in a browser was simple - we want to be able to have the studio be available on demand (e.g., don't have to spend a half day with a dozen MSDN CDs to get started building web apps).

There was one other cool thing about our decision to make the WaveMaker studio a web app allowed us to build WaveMaker in WaveMaker (just try that with Visual Studio or Eclipse). At the end of the day, this allowed us to create a lightweight studio that runs over the web very quicky.

c keene us

Add comment


(Will show your Gravatar icon)  

  Country flag





Live preview

11/21/2008 7:20:54 AM


 

Powered by BlogEngine.NET 1.2.0.0
Theme by Mads Kristensen

About the author

Jon Davis 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 is currently in a temp-to-perm contract with a media corporation that primarily produces B2B magazines. The insanely complete and powerful Content Management System that they are switching to is SiteCore CMS, which is arguably the richest and most complete ASP.NET 3.5 based CMS on the planet.
E-mail me Send mail

Most Recent of Many Library Investments

Calendar

<<  November 2008  >>
MoTuWeThFrSaSu
272829303112
346789
10111213141516
17181920212223
24252627282930
1234567

View posts in large calendar

Pages

    Recent comments

    Authors

    Tags

    Disclaimer

    The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

    © Copyright 2008

    Sign in