Index

images A

Ajax requests, 129

adding Ajax GET request, 130131

adding Ajax URL to main manifest, 135

adding Ajax URL to manifest NETWORK section, 135

error handling, 133134

POST request behavior, 135

products.json File, 131

restructuring, 131133

Application cache entries, 122

Application cache specification, 126

Asynchronous module definition (AMD)

callback arguments, 248250

definition, 245

dependency declaration, 247248

dependency issues, 246247

factory function, 245

inline dependencies, 250252

images B

Bidirectional bindings, 5860

images C

Cache-control header, 122

CheeseLux, 912

adding routing, 101105

browser, 105

enhancing view model, 106

managing application state, 107108

mapProducts function, 106

Click event, 2526

Code

fragment, 6

HTML document, 5

Content distribution network (CDN), 16

CSS class, 2224

images D

Data Storage, browser. See HTML5 local storage feature

Default actions management, 2729

Design patterns, 4

Desktop web browser, 7

Dynamic basket, 29

images E

Empty basket, 7174

Event, definition, 24

images F

Fallback entries, 122126

Flow control bindings, 5253

$ function, 1819

images G

Graphic design and layouts, 4

images H

Hover method, jQuery, 26

HTML editor, 7

HTML5 History API

preserving view model state, 9697

restoring application state, 99101

storing application state, 9899

HTML5 local storage feature, 137139

complex data storage (see IndexedDB)

with form elements, 143144

for JSON data, 139141

with objects, 141142

with offline web applications

adding buttons, 154155

cached CheeseLux web app, 150153

createDialog function, 156157

enhanceViewModel function, 153154

script element changes, 155156

persistent forms, 142143

session storage

benefits, 148149

semi-persistent observable data item, 149

synchronizing view models, 144

KO subscribe method, 146

main document modification, 147148

persistentObservable function, 144, 146147

StorageEvent object, 145

HTMLElement properties, 35

images I

IndexedDB, 156

DBO object, 158160

locating objects

using cursor, 166

using Index, 167

by key, 165166

onupgradeneeded property, 160161

success outcomes, 161

to web application, 162165

WebSQL, 157

working principle, 157

images J

JavaScript

dependencies in libraries, 238

AMD module (see Asynchronous module definition (AMD))

assumed dependency, 238239

directly resolved dependency, 240

double-loading problem, 243244

issues, 240243

global namespaces, 229230

global variables, 230

namespaces

configuration, 233234

definition, 230231

nested, 231232

nested, using a function, 232233

self-executing function, 234235

naming collision, 229

property, method and function, 235238

unit testing, 253

adding tests, 254256

jQuery, 257258

QUnit, 253254

JavaScript libraries, 7

JavaScript polyfill libraries, 129

jQuery

addClass method, 23

bind method, change and keyup events, 3233

custom selectors, 20

hover method, 26

importing, 1518

method chaining, 23

methods for inserting elements in document, 22

statement, 19

UI button, 4344

UI toolkit, 4243

jQuery Mobile

content changes, 214215

event sequence, 211212

disabling automatic processing, 212213

pageinit event, 213214

pages, 201202

widgets, 202

images K

Knockout (KO)

data bindings, 51

definition, 49

library, 4953

ko object, 50

images L

Latent content, 29, 3132

images M

Method chaining, 23

Method pairs, 23

Mobile browser emulator, 7

Mobile Web Apps, 195

CheeseLux Mobile Web App

basic implementation, 209

formatText data binding, 210211

initial version, 206209

duplicating elements using templates, 215

with custom data, 218

data-bind attribute, 218220

using two-pass data bindings, 215218

getIndexOfCategory function, 226

goals, 205

jQuery Mobile

askmobile.html document, 198

CheeseLux web app, 204

data attributes, 201

events, 203

installation, 201

setCookie, 203

mobile device detection

capabilities, 197198

user agent, 195196

multipage model

adding support, 220223

changePage method, 225

mapping page names to routes, 224225

navigation, 223

replacing radio buttons with anchors, 223

Mouseenter and mouseleave events, 2627

images N

Node.js, 8

images O

Offline web apps, 109

Ajax requests

adding Ajax GET request, 129131

adding Ajax URL to main manifest, 135

adding Ajax URL to manifest NETWORK section, 135

error handling, 133134

POST request behavior, 135

products.json file, 131

restructuring, 131133

HTML5 application cache

accepting changes to manifest, 115116

adding manifest to HTML document, 112113

adding network and fallback entries, 122126

cached content, 113114

control of cache update process, 116122

manifest file, 111112

monitoring

adding elements and bindings, 128

detecting state of network, 126128

POST request behavior, 135

revised document, 109111

images P, Q

Polyfill, 98

POST request behavior, 135

images R

Recurring Ajax requests polyfills, 129

Responsive Web Apps, 169

screen orientation, 184188

screen size

adapting source data, 183

adapting web app layout, 179183

conditional jQuery UI styling, 183184

CSS media queries, 173174

detectDeviceFeatures function, 177178

image loading, 178179

JavaScript media queries, 174175

matchMedia feature, 176177

polyfill, 175176

removing elements, 184

touch interaction

application routes, 193

detecting touch support, 189190

navigation, 191193

touchSwipe library, 190191

viewport, 169172

images S, T

Single handler function, 27

Submit button upgradation

CSS class, 2224

$ function, 1819

input element selection and hiding, 1921

jQuery, 1518

new element insertion, 2122

images U

URL routing

CheeseLux

adding routing, 101104

browser, 104

enhancing view model, 106

managing application state, 107108

mapProducts function, 106

consolidating routes

adding default route, 8990

optional segments, 8889

unexpected segment values, 8688

variable segments, 8586

event-driven controls to navigation

bridging events and routing, 9294

bridging URL routing and JavaScript events, 9092

selected data binding, 94

using HTML5 History API

history.replaceState method, 95

preserving view model state, 9697

restoring application state, 99101

steps demonstrating the issue, 95

storing application state, 9899

simple routed web application, 7778

adding navigation markup, 8183

adding routing library, 79

adding view model and content markup, 7981

applying controls and elements, 8385

images V

Value bindings, 5152

View model, 47

adding more products, 5354

dynamic basket

adding basket line items, 6669

adding basket structure and template, 7071

adding subtotals, 6466

empty basket, 7174

removing items, 71

generating content, 6163

model creation

adding data to document, 48

adopting view model library, 49

bidirectional bindings, 5860

extending the model. 6061

generating content, 4953

observable data items, 5558

resetting, 4748

reviewing, 6364

URL routing, 7980

images W, X, Y, Z

Web app development principles, 15

dynamic basket data

adding basket elements, 2931

bind method, change and keyup events, 3233

changing form target, 3739

latent content, 3132

overall total calculation, 3537

subtotal calculation, 3334

subtotal display, 3435

event handling

click event, 2526

default actions, 2829

using event object, 27

mouseenter and mouseleave, 2627

single handler function, 27

JavaScript disabled and enabled, 3940

JavaScript-only policy, 41

non-JavaScript users, 40

submit button upgradation

CSS class, 2224

$ function, 1819

input element selection and hiding, 1921

jQuery, 1519

new element insertion, 2122

UI toolkit

creating jQuery UI button, 4344

setting up jQuery UI, 42

Web server, 7

whitelist entries, 122

WURFL database, 195

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.17.162.26