You are previewing Learning JavaScriptMVC.
O'Reilly logo
Learning JavaScriptMVC

Book Description

Learn to build well-structured JavaScript web applications using JavaScriptMVC

  • Install JavaScriptMVC in three different ways, including installing using Vagrant and Chef

  • Document your JavaScript codebase and generate searchable API documentation

  • Test your codebase and application as well as learning how to integrate tests with the continuous integration tool, Jenkins

In Detail

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.

"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.

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.

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.

Table of Contents

  1. Learning JavaScriptMVC
    1. Table of Contents
    2. Learning JavaScriptMVC
    3. Credits
    4. About the Author
    5. About the Reviewer
    6. www.PacktPub.com
      1. Support files, eBooks, discount offers and more
        1. Why Subscribe?
        2. Free Access for Packt account holders
    7. Preface
      1. What this book covers
      2. What you need for this book
      3. Who this book is for
      4. Conventions
      5. Reader feedback
      6. Customer support
        1. Downloading the example code
        2. Errata
        3. Piracy
        4. Questions
    8. 1. Getting Started with JavaScriptMVC
      1. What is JavaScriptMVC?
        1. License
        2. Links
      2. Why JavaScriptMVC?
      3. System architecture approach
        1. JavaScriptMVC single-page application
          1. Advantages
          2. Downsides
      4. Real-world examples
      5. Installing JavaScriptMVC
        1. Choosing your method
          1. Which method is right for me?
          2. The first method – download the package
          3. The second method – pull the code from Git repositories
            1. Verifying Installation
          4. The third method – Vagrant
      6. Documentation and API
      7. The architecture of JavaScriptMVC
        1. DocumentJS
        2. FuncUnit
        3. jQueryMX
        4. StealJS
          1. Dependency management
          2. Concatenation and compression
          3. Logger
          4. Code generator
          5. Package management
          6. Code cleaner
      8. Building simple applications
        1. Todo list
          1. Loader
          2. Model
          3. Fixtures
          4. View
          5. Controller
          6. Routing
          7. Complete application code
      9. Summary
    9. 2. DocumentJS
      1. How does DocumentJS work?
      2. Writing the documentation
        1. Type directives
        2. Tag directives
      3. Generating the documentation
      4. Summary
    10. 3. FuncUnit
      1. Creating tests
        1. Module
          1. Open
        2. Test
          1. Ok
          2. S
      2. Running tests
        1. Web browser
        2. Selenium
        3. PhantomJS
        4. EnvJS
      3. Integration
      4. Summary
    11. 4. jQueryMX
      1. $.Class
        1. The first parameter
        2. The second parameter
        3. The third parameter
        4. Method override
        5. Life cycle
      2. $.Model
      3. $.View
        1. Embedded
        2. External
        3. Sub-templates
      4. $.Controller
      5. DOM helpers
        1. $.cookie
        2. $.fn.compare
        3. $.fn.selection
        4. $.fn.within
        5. $.Range
        6. $.route
      6. Special events
        1. $.Drag and $.Drop
      7. Language helpers
        1. $.Object
          1. same
        2. $.Observe
        3. $.String
          1. deparam
        4. $.toJSON
        5. $.Vector
      8. Summary
    12. 5. StealJS
      1. Dependency management
      2. Logger
      3. Code cleaner
      4. Concatenation and compression
      5. Summary
    13. 6. Building the App
      1. Time tracking and invoicing for freelancers
        1. Planning
        2. Preparing wireframes
        3. Setup project
          1. Tracking changes under VCS
          2. Application structure
        4. IndexedDB
        5. Creating models
        6. Creating controllers
        7. Creating views
        8. Creating a bootstrap
        9. Running the application
      2. Summary
    14. Index