Book Image

Learning JavaScriptMVC

By : Wojciech Bednarski
Book Image

Learning JavaScriptMVC

By: Wojciech Bednarski

Overview of this book

<p>JavaScriptMVC is a client-side, JavaScript framework that builds maintainable, error-free, lightweight applications as quickly as possible. As it does not depend on server components, it can be combined with any web service interface and server-side language.<br /><br />"Learning JavaScriptMVC" will guide you through all the framework aspects and show you how to build small- to mid-size well-structured and documented client-side applications you will love to work on.<br /><br />This book starts from JavaScriptMVC installation and all its components are explained with practical examples. It finishes with an example of building a web application. You will learn what the JavaScriptMVC framework is, how to install it, and how to use it efficiently.<br /><br />This book will guide you on how to build a sample application from scratch, test its codebase using unit testing, as well as test the whole application using functional testing, document it, and deploy the same. After reading Learning JavaScriptMVC you will learn how to install the framework and create a well-structured, documented and maintainable client-side application.</p>
Table of Contents (13 chapters)

The architecture of JavaScriptMVC


The architecture of JavaScriptMVC is modular. The powerful stack contains everything we need to build a well organized, tested, and documented application.

Here is a list of the JavaScriptMVC key components as well as topics covered in the next chapters.

DocumentJS

DocumentJS is an independent JavaScript documentation application and provides the following:

  • Inline demos with source code and HTML panels

  • Adds tags to the documentation

  • Adds documentation as favorite

  • Auto suggest search

  • Test result page

  • Comments

  • Extends the JSDoc syntax

  • Adds undocumented code because it understands JavaScript

FuncUnit

FuncUnit is an independent web testing framework and provides the following:

  • Test clicking, typing, moving mouse cursor, and drag-and-drop utility

  • Follows users between pages

  • Multi browser and operating system support

  • Continuous integration solution

  • Writes and debugs tests in the web browser

  • Chainable API that parallels jQuery

jQueryMX

jQueryMX is the MVC part of JavaScriptMVC and provides the following:

  • Encourages logically separated, deterministic code

  • MVC layer

  • Uniform client-side template interface (supports jq-tmpl, EJS, JAML, Micro, and Mustache)

  • Ajax fixtures

  • Useful DOM utilities

  • Language helpers

  • JSON utilities

  • Class system

  • Custom events

StealJS

StealJS is an independent code manager and build tool and provides the following powerful features:

Dependency management

  • Loads JavaScript and CoffeeScript

  • Loads CSS, Less, and Sass files

  • Loads client-side templates such as TODO

  • Loasd individual files only once

  • Loads files from a different domain

Concatenation and compression

  • Google Closure compressor

  • Makes multi-page build

  • Pre processes TODO

  • Can conditionally remove specified code from the production build

  • Builds standalone jQuery plugins

Logger

  • Logs messages in a development mode

Code generator

  • Generates an application skeleton

  • Adds the possibility to create your own generator

Package management

  • Downloads and install plugins from SVN and Git repositories

  • Installs the dependencies

  • Runs install scripts

  • Loads individual files only once

  • Loads files from a different domain

Code cleaner

  • Runs JavaScript beautifier against your codebase

  • Runs JSLint against your codebase