Pro single page application development : using Backbone.js and ASP.NET / Gil Fink, Ido Flatow.
This book discusses using single page applications (SPA) in Web development. The use of SPA allows the user to load a Web site once and all the interactivity is handled fluidly by a rich JavaScript front end. Part I lays the groundwork for SPA development, including SPA architecture, JavaScript deve...
Saved in:
Online Access: |
Full Text (via Skillsoft) |
---|---|
Main Authors: | , |
Format: | Electronic eBook |
Language: | English |
Published: |
Berkeley, CA :
Apress,
2014.
|
Series: | Expert's voice in Web development.
|
Subjects: |
Table of Contents:
- Machine generated contents note: pt. I Road to Single Page Application Development
- ch. 1 Introducing Single Page Applications
- How the Web Has Evolved
- Ajax Revolution
- HTML5 and JavaScript
- Mobile Web and JavaScript
- JavaScript Preprocessors
- Comparing Application Types
- Traditional Web Applications
- Native Applications
- So What Is an SPA?
- Why SPA Development?
- Summary
- ch. 2 JavaScript for SPAs
- Little JavaScript History
- Functions in JavaScript
- arguments Object
- Anonymous Functions
- Nested Functions
- JavaScript Scope
- Global Scope
- Function Scope
- Immediate Function Execution Expressions
- Working with Object-Oriented JavaScript
- Literal Object Notation
- new Notation and Constructor Functions
- Object Base Type
- Object.create Function
- JavaScript Prototype Inheritance
- this Keyword
- Creating JavaScript Namespaces
- Closures and Encapsulation
- JSON
- ECMAScript and Its Impact on Future Code
- ECMAScript 5 Highlighted Features
- ECMAScript 6
- Summary
- ch. 3 Modular JavaScript Development
- Facade Pattern in JavaScript
- Modules to the Rescue
- Different Options to Create JavaScript Modules
- Prototype Pattern
- Module Pattern
- Revealing Module Pattern
- Revealing Prototype Pattern
- What Is the Asynchronous Module Definition?
- async and defer Attributes
- AMD
- RequireJS Library
- data-main Attribute
- config Function
- Defining Modules Using RequireJS
- Using the require Function
- Summary
- ch. 4 SPA Concepts and Architecture
- Main SPA Building Blocks
- JavaScript Libraries
- MV* in the Front End
- MVC
- MWM
- Roles of MV* Frameworks in SPAs
- Routing in an SPA
- # Sign Role in Routing
- Leveraging HTML5 JavaScript APIs
- Offline Web Applications and Storages
- Connectivity
- Performance
- Client-Side Template Engines
- Underscore as a Template Engine Example
- Server Back End API and REST
- SPA Architecture
- Summary
- pt. II Building the Front End
- ch. 5 Getting Started with Backbone.js
- What Is Backbone.js?
- Models
- Defining a Model
- Model APIs
- Model Validation
- Model Events
- Views
- Defining a View
- Rendering the View
- Collections
- Collection APIs
- Underscore.js Collection Functions
- Collection Events
- Events
- Events API
- listen To and stopListening
- View Events
- Routing
- Configuring Routes
- Router APIs
- Backbone History
- Routing and Views
- Backbone.js and RequireJS
- Summary
- ch. 6 Creating a Single Page Application Step by Step
- Choosing an IDE
- Preparing the Solution Folders
- Adding the JavaScript Libraries
- Adding the HTML Page, Application Main Script, Styles, and Images
- Crafting the Models
- Agent Model Implementation
- Task Model Implementation
- Adding Collections
- Agent Collection
- Task Collection
- Creating a Data Service and Generating Mock Data
- Adding Front-End Routing
- Router
- Application Controller
- Creating Views
- AgentTileView
- HomeView
- TaskView and EditModalView
- DetailsView
- CreateView
- Summary
- pt. III Building the Back End
- ch. 7 Creating a Back-End Service with ASP.NET Web API
- Introduction to HTTP-Based Services
- URIs
- HTTP Verbs
- Status Codes
- Content Negotiation
- RESTful Services
- ASP.NET Web API Basics: Routing, API Controllers, and Actions
- Creating an ASP.NET Web API Project
- Routes and Controllers
- Routing Requests to Controller Actions
- Responses and Content Negotiation
- Attribute-Based Routing
- HttpResponseMessage Class
- Handling Exceptions
- Handling Unhandled Exceptions
- Validating the Input
- Data Annotations
- Validating Input with ASP.NET Web API
- Validation Filters
- Summary
- ch. 8 Implementing HTTP Concepts with ASP.NET Web API
- Content Negotiation
- Caching
- Cache-Related Headers
- Cache Headers and Content Negotiation
- Cache Headers and Actions Methods
- Resource Versioning with ETags
- Uploads and Downloads
- Downloading Files from a Service
- Uploading a File to an Action Method
- Summary
- ch. 9 Communication Between Front and Back End
- Using Ajax to Communicate with the Server
- Promises Pattern
- Backbone.js Ajax Support
- Updating TheAgency
- Working with Other Communication Options
- Server-Sent Events (SSE)
- WebSockets
- Socket. IO
- ASP.NET SignaIR
- Web Real-Time Communication (WebRTC)
- Choosing Your Communication Option
- Summary
- pt. IV Advanced SPA Topics
- ch. 10 JavaScript Unit Testing
- Unit Testing in the Front End
- What Is TDD?
- What Is BDD?
- Jasmine Library
- Setting the Environment
- Creating Suites and Specs
- Specs
- Suites
- Expectations and Matchers
- Creating a Custom Matcher
- Setup and Teardown
- Nesting Suites
- Using Spies
- Testing Asynchronous Code
- Writing Tests for TheAgency Project Using Jasmine
- Creating and Setting Up the Environment
- Models
- Collections
- Views
- Summary
- ch. 11 SPA Performance Tuning
- Optimizing the Front End
- Browser Rendering Process
- Profiling the Front End Using Chrome DevTools
- Static Page Analysis
- JavaScript Optimization Tips
- Optimizing the Server (Back End and Network)
- Tools of the Trade
- Optimization Tips
- Summary
- ch. 12 Search Engine Optimization for SPAs
- Search Engine Crawler
- Using a White List: XML Sitemap
- Using a Blacklist: robots.txt File
- Problem with SPAs and SEO
- Options to Optimize Your SPA for SEO
- Hijax
- Escaped Fragments
- Static Web Site/Application Representation
- Summary
- ch. 13 SPA Deployment
- Deployment Techniques
- Xcopy
- FTP
- Version Control
- Web Deploy Tool
- Continuous Deployment
- Deploying to the Cloud
- Web Hosting and Platform as a Service
- Static-File Hosting
- Summary.