JavaScriptMVC – JavaScript Framework

20 June, 2008 at 12:14 Leave a comment

Developers generally neglect JavaScript testing because there’s really nothing out there that let’s you simulate user interactions easily. Here comes the Test plugin (Thanks to Brian Moschel from JavaScriptMVC for suggesting this resource).

It lets you simulate every major DOM event, as well as some combination events like Write and Drag, and then run functional and unit tests in a separate console window.

To enable JavaScriptMVC’s high level goals, JavaScriptMVC contains the basic language and browser abstractions of other libraries.

  • Ajax – Updates content without refreshing the page.
  • Class – An easy to use, lightweight class system.
  • Event – Register events without worrying about memory issues.
  • Inflector – Handy string helpers for pluralizing and singularizing strings.
  • Helpers – String, Array, Function and Object extensions.
  • Query – CSS DOM element selection.

And JavaScriptMVC has few advanced features such as:

  • History – provides back, forward, and refresh functionality.
  • Remote – perform cross domain reads and writes.


Maintainability is a sore spot of JavaScript development. It is an extremely dynamic language and lacks some of the familiar structures of other Object-Oriented Languages. This often results in rather unsavory spaghetti code.

JavaScriptMVC straightens out code in two ways. It provides a Model-View-Controller (MVC) pattern and forces logically separated files.


The MVC architectural pattern isolates business logic from user interface concerns, resulting in an application where it is easier to modify the appearance of the application or the underlying business rules without affecting the other. This pattern is highly applicable to JavaScript.

Models manage the application’s underlying business rules. In JavaScript, models add business rules to underlying Ajax requests.

Views render data into a form suitable for interaction. In JavaScript, these are client side templates that help avoid mixing HTML and JavaScript.

Controllers respond to events. JavaScriptMVC’s controllers organize event handlers deterministically by the HTML they reflect.


Testing sucks! JavaScriptMVC has a testing library that you can actually use, complete with: event simulation, unit testing, Ajax fixtures, and a console. Learn More…


Your application will break. It’s only a matter of time. JavaScriptMVC emails you a detailed report when it happens, helping you rapidly find and fix bugs. Learn More…



Entry filed under: Java, JavaScript. Tags: , .

Ruby and RoR Overview TDD – Test Driven Development

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Trackback this post  |  Subscribe to the comments via RSS Feed

IT Passion’s Store



Get the Source
OSGi supporter
JUG Milano

Upcoming Events


Blog Stats

  • 371,507 hits

My PageRank

What's My Google PageRank?

%d bloggers like this: