Cover image for Enterprise Web Development

Book description

If you want to build your organization’s next web application with HTML5, this practical book will help you sort through the various frameworks, libraries, and development options that populate this stack. You’ll learn several of these approaches hands-on by writing multiple versions of a sample web app throughout the book, so you can determine the right strategy for your enterprise.

Table of Contents

  1. Introduction
    1. What’s an Enterprise Web Application?
    2. From DHTML to HTML5
    3. Should we develop in HTML5 if its standard is not finalized yet?
    4. Summary
  2. 1. Advanced Introduction to JavaScript
    1. JavaScript: A Brief History
    2. Why Declaring JavaScript Variables
    3. Which IDE to Use
    4. Getting Familiar with Aptana IDE
    5. Adding JavaScript to HTML
    6. Debugging JavaScript in Web Browsers
    7. JavaScript Functions. Gentle Introduction
    8. JavaScript Objects. Gentle Introduction
      1. Object Literals
        1. Methods in Object Literals
      2. Constructor Functions
    9. Debugging JavaScript in Firebug
    10. Prototypal Inheritance
      1. Where to Declare Methods
      2. Method overriding
    11. Scope or who’s this?
      1. Call and Apply
      2. Callbacks
      3. Hoisting
      4. Function properties
    12. Closures
      1. Closures as callbacks
    13. Mixins
    14. JavaScript in the Web Browser
      1. Working with DOM
      2. DOM Events
    15. Summary
  3. 2. Selected HTML5 APIs
    1. HTML5 Web Messaging
    2. Web Workers
      1. Creating and Communicating with Workers
      2. Dedicated and Shared Workers
    3. WebSockets
    4. Offline Web Applications
      1. Prerequisites for developing Offline Web Applications
      2. Application Cache
      3. Is Your Application Offline?
      4. Options for Storing Data Locally
      5. localStorage and sessionStorage
      6. Introduction to IndexedDB
        1. Object Stores and Versioning
        2. Transactions
        3. Modyfying the Object Store Data
        4. Retrieving the Data
        5. Runninng the Sample code
    5. History API
      1. Modifying the Browser’s History with pushState()
      2. Processing the popstate Event
    6. Summary
  4. 3. Mocking Up the Application Save Sick Child
    1. Mobile First?
    2. Introducing Balsamiq Mockups
    3. The Project Owner Talks to a Web Designer
    4. First Mockups
    5. From Mockups to a Prototype
      1. Basic Page Layout and Login
      2. The Footer section
      3. The Donate Section
    6. Adding Video
      1. Adding the HTML5 Video Element
      2. Embedding YouTube Videos
    7. Adding Geolocation Support
      1. Geolocation Basics
      2. Integrating with Google Maps
      3. Browser Features Detection With Modernizr
      4. Search and Multi-Markers With Google Maps
    8. Summary
  5. 4. Using AJAX and JSON
    1. Why AJAX
    2. Why JSON
    3. How AJAX Works
      1. Retrieving Data From the Server
      2. AJAX: Good and Bad
      3. Populating States and Countries from HTML Files
    4. Using JSON
      1. Populating States and Countries from JSON Files
      2. Arrays in JSON
      3. Loading Charity Events using AJAX and JSON
    5. JSON in Java
    6. Compressing JSON
    7. Adding Charts to Save Sick Child
    8. What is JSONP
      1. Beer and JSONP
    9. Summary
  6. 5. Redesign with JQuery Library
    1. jQuery Intro
      1. Hello World
    2. Selectors and Filters
    3. Events
      1. Binding Events With The Method on()
      2. Delegated Events
    4. AJAX with jQuery
      1. Handy Shorthand Methods
    5. Save Sick Child With jQuery
      1. Login and Donate
      2. HTML States and Countries With jQuery AJAX
      3. JSON States and Countries With jQuery AJAX
      4. Submitting Donate Form
    6. Plugins
      1. Validating the Donate Form With Plugin
      2. Adding Image Slider
    7. Summary
  7. 6. Developing Web Applications With Ext JS Framework
    1. Why Ext JS?
    2. Downloading and Installing Ext JS
    3. Getting Familiar with Ext JS and Tooling
      1. The First Version of Hello World
      2. Using Sencha CMD Tool
      3. Configuring Eclipse IDE, Apache Tomcat, and Ext JS
        1. Apache Tomcat
        2. Dynamic Web Projects and Ext JS
      4. Which Ext JS Framework to use?
      5. Declaring, Loading and Instantiating Classes
        1. What’s xtype
        2. Ext JS Mixins
      6. MVC in Ext JS
        1. Models and Stores
        2. Controllers and Views
      7. Component’s Lifecycle
      8. Events
      9. Layouts
        1. The flex Property
    4. Developing Save Sick Child With Ext JS
      1. Save Sick Child: The Top Portion
      2. Completing Save Sick Child
        1. Login, Video, and Maps
        2. Chart and Table Panels
        3. Building Production Version of Save Sick Child
    5. Productive Enterprise Web Development with Ext JS and CDB
      1. Part One: Ext JS MVC Application Scaffolding
      2. Part Two: Generating a CRUD application
      3. Part Three: Data Pagination
    6. Summary
  8. 7. Large-Scale JavaScript Projects
    1. Modularization basics
    2. The Paths To Modularization
      1. Module Pattern
      2. CommonJS
        1. Browserify
      3. Asynchronous Module Definition
        1. AMD Pros and Cons
        2. RequireJS
      4. Universal Module Definition (UMD)
      5. ECMAScript 6 Modules
    3. Advanced Modularization
    4. Summary
  9. 8. Test-Driven Development with JavaScript
    1. Why Testing
    2. Testing Basics
      1. Unit Testing
      2. Integration Testing
      3. Functional Testing
      4. Load Testing
    3. Test Driven Development
      1. Automate Everything
        1. The Simplest Grunt File
      2. Test-Driven Development With QUnit
        1. Setup Grunt With Qunit
      3. Behavior-Driven Development With Jasmine
        1. Setup Grunt with Jasmine
        2. Jasmine Basics
        3. Specification Setup
        4. Custom Matchers
        5. Spies
      4. Multi-Browser Testing
        1. Installation
        2. Testem Configuration file
        3. Running Tests
      5. Testing DOM
    4. Save Sick Child With TDD
      1. The Test-Driven ExtJS version of
        1. Harnessing ExtJS application
        2. Testing The Models
        3. Testing The Controllers
        4. Testing The Views
      2. Setting up the IDE for TDD
        1. Integrate the Grunt Tool with WebStorm
    5. Summary
  10. 9. Upgrading HTTP to WebSocket
    1. Near Real Time Applications With HTTP
      1. Polling
      2. Long Polling
      3. HTTP Streaming
    2. Server-Sent Events
    3. Introducing WebSocket API
      1. WebSocket Interface
        1. The Client-Side API
        2. WebSocket Handshake
        3. The WebSocket Frame Anatomy
        4. The Heartbeats
        5. Data Frames
        6. Closing The Connection
    4. WebSocket Frameworks
      1. The Portal
      2. Atmosphere
    5. When Use WebSocket
      1. CSV
      2. XML
      3. JSON
      4. Google Protocol Buffers
    6. WebSockets and Proxies
    7. Adding an Auction to Save Sick Child
      1. Monitor the WebSocket traffic with Chrome Developers Tools
      2. Sniffing WebSocket frames with Wireshark
      3. Save Sick Child Auction Protocol
    8. Summary
  11. 10. Responsive Design: One Site Fits All
    1. One or Two Versions of Code?
      1. How Many User Agents Are There
    2. Back to Mockups
    3. CSS Media Queries
      1. How Many Breakpoints?
    4. Fluid Grids
      1. Moving Away From Absolute Sizing
      2. Window as a Grid
    5. Making Save Sick Child Responsive
      1. Fluid Media
    6. Summary
  12. 11. jQuery Mobile
    1. Where to get jQuery Mobile
    2. Organizing the Code
    3. How it’ll Look on Mobile Devices?
      1. Styling in jQuery Mobile
      2. Adding Page Navigation
        1. Multi-Page Template
        2. Single-Page Template
        3. Multi or Singe-Page Template
      3. Persistent Toolbars
        1. Programmatic Navigation
    4. Save Sick Child with jQuery Mobile
      1. Prototyping Mobile Version
      2. The Project Structure and Navigation
      3. Selected Code Fragments
        1. Grid Layouts
        2. Control Groups
        3. Dropdowns and Collapsibles
        4. Listviews
        5. Adding JavaScript
    5. Summary
  13. 12. Sencha Touch
    1. Sencha Touch Overview
      1. Code Generation and Distribution
        1. Microloader and Configurations
        2. The Code of Hello World
      2. Constructing UI
        1. Containers
        2. Layouts
        3. Events
    2. Save Sick Child With Sencha Touch
      1. The Application Object
      2. The Main View
      3. Controller
      4. The Other Views
        1. LoginForm
        2. DonateForm
        3. Charts
        4. Media
        5. Maps
      5. Stores and Models
    3. Summary
  14. About the Authors
  15. Copyright