Chapter 1. Getting Started with JavaScriptMVC

In this chapter, get an overview of the JavaScriptMVC framework. We will install it, go through the architecture, and learn it in the best possible way. Finally, we will build a simple application. There is nothing that works better than an example. Some say this is the only thing that works.

What is JavaScriptMVC?

JavaScriptMVC (JMVC) is a JavaScript open source model-view-controller (MVC) framework build, on top of the jQuery library.

It is the backend agnostic client-side framework that can be used with any backend solution, such as Node.js, Ruby on Rails, Django, and so on.

The idea behind JavaScriptMVC is to provide a set of tools to build high quality and maintainable applications in the shortest amount of time possible.

JavaScriptMVC contains the following independent components:

  • StealJS: This is the dependency manager and production build
  • FuncUnit: This is the unit and functional test component
  • jQueryMX: This contains a set of plugins that provide the functionality to implement and organize large JavaScript codebases into a well-structured and organized form, provide a model-view-controller abstraction layer
  • DocumentJS: This is the documentation

The first version was published in May 2008. Current Version 3.2 was released in December 2010. The latest version at the time of writing this book is 3.2.2.

In the next Version 3.3 of JavaScriptMVC, which should be released soon, jQueryMX project will be replaced by CanJS. Projects using current version of JMVC should work after small refactoring with JMVC 3.3 thanks to the names fallback.

JavaScriptMVC 4.0 will be renamed to DoneJS and contain significant changes to StealJS which will be fully AMD compatible work with CommonJS and run with Node.js. FuncUnit will be split into 3 parts: Syn - Synthetic event library, ShouldJS - Asynchronous test driving using Jasmine or QUnit and DidJS - Automated test runner bindings for Jasmine or QUnit for Selenium, PhantomJS, and so on.

License

JavaScriptMVC is licensed under the MIT license with the following exceptions:

  • Rhino: This is the JavaScript command line (MPL 1.1)
  • Selenium browser automation (Apache 2)

Links

You can refer to the following URLs to learn more about JavaScriptMVC:

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.138.195