Ajax is still around and still relevant, but now it’s joined by direct and immediate bidirectional communication—no more having to fake server-client communication, because we have it, for real. We can connect to Twitter and Dropbox, create apps for Android devices, and open ePub files directly in the browser for reading. The libraries and modules available in both the client and server take care of so much of the complex, tedious bits, that we can focus on creating what’s unique to our applications. Ten years ago, we’d be surprised at finding a library that met our needs. Now, we’re surprised when we don’t.
Just to make it even more interesting and rich is the increasing number of APIs provided by both standards organizations and sevice providers.
Now that video and audio, as well as the Canvas element and SVG, are supported in all modern browsers, a basic understanding of these rich media elements is fundamental.
A break down of the chapters follows in the next sections.
A few asides about this chapter before moving on: I wanted to include a demonstration of at least one of the popular client-side MV* framework tools in the book, but couldn’t decide which one. They do differ enough that covering one results in recipes that aren’t helpful for folks not using that specific framework. That’s when I decided on deconstructing the ToDoMVC web application, and diving into how it’s implemented using three of the more popular framework tools: Angular, Ember.js, and Backbone. Hopefully, the process I used can be used with the other frameworks.
I did go into much more depth with the OAuth framework, because of its increasing use authorizing access for data and services at the many APIs we’re interested in using. OAuth is also used with the Twitter API, covered in Chapter 13, as well as the Dropbox Datastores, covered in Chapter 17.
I also covered Web Components, but without reliance on a polyfill (e.g. Google’s Polymer), as I’m wary of replying on roprietary technology when learning about something new.
Some of the graphical applications we had fun with when the Canvas element and SVG first received broader support are giving way to more serious data visualizations, most of which use data provided directly from the server. This chapter takes a closer look at data visualization tools, including one that partners with a WebSocket server application.
Speaking of the server, we now have access to the same rich visualization and graphics tools in the server that we’ve had in the client, and we’ll explore some of the more interesting possibilities.
The following typographical conventions are used in this book:
Constant width italic
This icon signifies a tip, suggestion, or general note.
This icon indicates a warning or caution.
Websites and pages are mentioned in this book to help you locate online information that might be useful. Normally both the address (URL) and the name (title, heading) of a page are mentioned. Some addresses are relatively complicated, but you can probably locate the pages easier using your favorite search engine to find a page by its name, typically by writing it inside quotation marks. This may also help if the page cannot be found by its address; it may have moved elsewhere, but the name may still work.
This book is here to help you get your job done. In general, you may use the code in this book in your programs and documentation. You do not need to contact us for permission unless you’re reproducing a significant portion of the code. For example, writing a program that uses several chunks of code from this book does not require permission. Selling or distributing a CD-ROM of examples from O’Reilly books does require permission. Answering a question by citing this book and quoting example code does not require permission. Incorporating a significant amount of example code from this book into your product’s documentation does require permission.
If you feel your use of code examples falls outside fair use or the permission given here, feel free to contact us at firstname.lastname@example.org.
Technology professionals, software developers, web designers, and business and creative professionals use Safari Books Online as their primary resource for research, problem solving, learning, and certification training.
Members have access to thousands of books, training videos, and prepublication manuscripts in one fully searchable database from publishers like O’Reilly Media, Prentice Hall Professional, Addison-Wesley Professional, Microsoft Press, Sams, Que, Peachpit Press, Focal Press, Cisco Press, John Wiley & Sons, Syngress, Morgan Kaufmann, IBM Redbooks, Packt, Adobe Press, FT Press, Apress, Manning, New Riders, McGraw-Hill, Jones & Bartlett, Course Technology, and hundreds more. For more information about Safari Books Online, please visit us online.
Please address comments and questions concerning this book to the publisher:
|O’Reilly Media, Inc.|
|1005 Gravenstein Highway North|
|Sebastopol, CA 95472|
|800-998-9938 (in the United States or Canada)|
|707-829-0515 (international or local)|
We have a web page for this book, where we list errata, examples, and any additional information. You can access this page at http://bit.ly/js-cookbook-2e.
To comment or ask technical questions about this book, send email to email@example.com.
For more information about our books, courses, conferences, and news, see our website at http://www.oreilly.com.
Find us on Facebook: http://facebook.com/oreilly
Follow us on Twitter: http://twitter.com/oreillymedia
Watch us on YouTube: http://www.youtube.com/oreillymedia
My appreciation to my editors, Simon St. Laurent and Brian McDonald, as well as all of the rest of the O’Reilly production staff.
I also want to extend a thank you to my tech reviewers, Dr. Axel Rauschmayer and Semmy Purewal, with the caveat that any errors or gotchas still in the finished work are my responsibility.