WebSocket Essentials – Building Apps with HTML5 WebSockets
eBook - ePub

WebSocket Essentials – Building Apps with HTML5 WebSockets

Varun Chopra

Share book
  1. 110 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

WebSocket Essentials – Building Apps with HTML5 WebSockets

Varun Chopra

Book details
Book preview
Table of contents
Citations

About This Book

About This Book

  • Learn to build your real-time collaborative application for mobiles and tablets using WebSockets
  • Set up your own WebSocket server and familiarize yourself with the combined power of WebSockets with HTML5
  • A practical guide, accompanied by examples, which will help you to understand the working of the Node.js WebSocket server

Who This Book Is For

This book is for web developers who want to learn and implement WebSocket to create interesting apps for modern browsers, leveraging the capabilities of HTML5 with WebSockets.

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is WebSocket Essentials – Building Apps with HTML5 WebSockets an online PDF/ePUB?
Yes, you can access WebSocket Essentials – Building Apps with HTML5 WebSockets by Varun Chopra in PDF and/or ePUB format, as well as other popular books in Ciencia de la computación & Programación en HTML. We have over one million books available in our catalogue for you to explore.

Information

WebSocket Essentials – Building Apps with HTML5 WebSockets


Table of Contents

WebSocket Essentials – Building Apps with HTML5 WebSockets
Credits
About the Author
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers, and more
Why subscribe?
Free access for Packt account holders
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Introducing the World of Web App
What is the Web?
Web applications
Where does WebSockets fit?
WebSockets over other methods
Modern browsers
HTML
HTML5 – the modern Web standard
Media – audio/video
Canvas
Form elements
Semantics
Mobile first
Offline storage
Geolocation
Drag and drop
Web workers
JavaScript
Modern servers
WebSockets
Summary
2. Getting Started with WebSockets
Why WebSockets?
Importance of WebSockets
When to use?
How it works?
WebSocket API
Ready states
Events
Echo Test
The WebSockets client app
Instantiation
Adding events
Sending messages
Receiving messages
Closing the connection
The WebSocket server
The Node.js server
Summary
3. Configuring the Server and Transferring Real-time Data
Full-duplex real-time data transfer
Foundation of real-time applications
Collaborative presentation application
The presentation library
Setting up the library
Adding collaboration
Code implementation
The client code
Code explanation
The server code
Code explanation
Do it yourself
Input username
The list of users
User-based authorization to change the presentation
Making the user the presenter
Tips and tricks
Summary
4. Using WebSockets in Real Scenario
The real scenario
The JavaScript framework
AngularJS
Learn by doing
The collaborative drawing application
Requirements
The drawing library
The client application
Integrating with the server
The client code
Code explanation
The server code
Code explanation
Do it yourself
User registration
The list of users
Share with specific users
Save drawings
The application structure
Restructure the application
Model
View
Controller
Service
Summary
5. WebSockets for Mobile and Tablet
Mobile devices and the WebSocket
Pusher
Socket.IO
Running server on mobile
Local server on mobile
Mobile output
Browser support
Do it yourself
Scenario 1
Scenario 2
Scenario 3
Summary
6. Enhancing HTML5 Web Application Development Using Modern Tools
Modern tools and techniques
Code editors
Boilerplates
Packaging tools
Build tools
Application frameworks
Modern servers
Responsive web design
The MEAN stack
Summary
Index

WebSocket Essentials – Building Apps with HTML5 WebSockets

Copyright © 2015 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: April 2015
Production reference: 1270415
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-78439-675-6
www.packtpub.com

Credits

Author
Varun Chopra
Reviewers
Adir Amsalem
Sann-Remy Chea
Commissioning Editor
Amarabha Banerjee
Acquisition Editor
Sonali Vernekar
Content Development Editor
Mamata Walkar
Technical Editor
Siddhesh Patil
Copy Editors
Puja Lalwani
Vikrant Phadke
Project Coordinator
Shipra Chawhan
Proofreaders
Safis Editing
Paul Hindle
Indexer
Monica Mehta
Production Coordinator
Aparna Bhagat
Cover Work
Aparna Bhagat

About the Author

Varun Chopra has a lot of experience in the design and development of enterprise applications. He has worked as a consultant and has extensive experience in integrating different technologies. Besides his love of technology, he is also a singer and a guitarist and loves gadgets.

About the Reviewers

Adir Amsalem is a software engineer from Israel. Since the age of 16, he has loved developing websites and web apps, reading about technology, and solving technological challenges. He currently works for a major financial institution, where he leads web and frontend development of several products. Previously, he was a web developer and frontend developer at several Israeli companies and was also a freelancer.
Sann-Remy Chea works as a software engineer at Ubisoft Owlient, a video game company specializing in web and mobile games, based in Paris, France. He has also worked at IBM as an application architect intern. Fond of web application development, he specializes in JavaScript and Node.js.

www.PacktPub.com

Support files, eBooks, discount offers, and more

For support files and downloads related to your book, please visit www.PacktPub.com.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at for more details.
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
Support files, eBooks, discount offers, and more
https://www2.packtpub.com/books/subscription/packtlib
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can search, access, and read Packt's entire library of books.

Why ...

Table of contents