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)

Preface

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 that you will love working on.

What this book covers

Chapter 1, Getting Started with JavaScriptMVC, provides an overview of the JavaScriptMVC framework. Install it, go over the architecture, and learn how to do it in the best possible way—by building a simple application.

Chapter 2, DocumentJS, shows how, despite being powerful, DocumentJS is a simple tool designed to easily create searchable documentation of any JavaScript codebase.

Chapter 3, FuncUnit, explains how FuncUnit is a functional testing framework with jQuery-like syntax. Using FuncUnit, we can run tests in all modern web browsers. Writing test is really easy and fast.

Chapter 4, jQueryMX, shows how jQueryMX is a collection of jQuery libraries that provides the functionality necessary to implement and organize large JavaScript applications. It provides classical inheritance simulation and a model-view-controller layer to provide logically separated codebase.

Chapter 5, StealJS, shows that StealJS is an independent code manager and build tool.

Chapter 6, Building the App, shows how to build real-world applications from concept through design, implementation, documentation, and testing.

What you need for this book

To run the examples in this book the following software will be required:

Who this book is for

This book is for anyone who is interested in developing small- and mid-size web applications with the JavaScriptMVC framework, which is based on the most popular JavaScript library – jQuery.

Readers should be familiar with JavaScript, browser APIs, jQuery, HTML5, and CSS.

Conventions

In this book, you will find different styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

Code words in text are shown as follows: "Easy switch to another version by the checkout tag."

A block of code is set as follows:

<!doctype html>

<html>
    <head>
        <title>Todo List</title>
        <meta charset="UTF-8" />
    </head>
    <body>
        <ul id="todos">
            <li>all done!</li>
        </ul>

        <script src="../steal/steal.js?todo"></script>
    </body>
</html>

When we wish to draw your attention to a particular part of a code block, the relevant lines or items are set in bold:

steal(
    'jquery/class',
    'jquery/model',
    'jquery/dom/fixture',
    'jquery/view/ejs',
    'jquery/controller',
    'jquery/controller/route',
    
    function ($) {

    }
);

Any command-line input or output is written as follows:

$ git submodule add git://github.com/bitovi/steal.git
$ git submodule add git://github.com/bitovi/documentjs.git
$ git submodule add git://github.com/bitovi/funcunit.git
$ git submodule add git://github.com/jupiterjs/jquerymx jquery

New terms and important words are shown in bold. Words that you see on the screen, in menus or dialog boxes for example, appear in the text like this: "Archive button is visible when task is hovered."

Note

Warnings or important notes appear in a box like this.

Tip

Tips and tricks appear like this.

Reader feedback

Feedback from our readers is always welcome. Let us know what you think about this book—what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply send an e-mail to , and mention the book title via the subject of your message.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the example code

You can download the example code files for all Packt books you have purchased from your account at http://www.packtpub.com. If you purchased this book elsewhere, you can visit http://www.packtpub.com/support and register to have the files e-mailed directly to you.

Errata

Although we have taken every care to ensure the accuracy of our content, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in the text or the code—we would be grateful if you would report this to us. By doing so, you can save other readers from frustration and help us improve subsequent versions of this book. If you find any errata, please report them by visiting http://www.packtpub.com/submit-errata, selecting your book, clicking on the errata submission form link, and entering the details of your errata. Once your errata are verified, your submission will be accepted and the errata will be uploaded on our website, or added to any list of existing errata, under the Errata section of that title. Any existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Piracy

Piracy of copyright material on the Internet is an ongoing problem across all media. At Packt, we take the protection of our copyright and licenses very seriously. If you come across any illegal copies of our works, in any form, on the Internet, please provide us with the location address or website name immediately so that we can pursue a remedy.

Please contact us at with a link to the suspected pirated material.

We appreciate your help in protecting our authors, and our ability to bring you valuable content.

Questions

You can contact us at if you are having a problem with any aspect of the book, and we will do our best to address it.