The Little Real-time Web Development Book

Similar documents
The Jumplead Manual. Setting Up and Using Marketing Automation. Matt Fenn. This book is for sale at

N Ways To Be A Better Developer

Build it with Drupal 8

Beginning Web Development with Node.js

Write a Web Application for Free Edition 2

Using OwnCloud. OwnCloud is a very easy to use file storage and sharing system that you can access anywhere you have an internet connection.

OneDrive in Office 365

What is OneDrive for Business at University of Greenwich? Accessing OneDrive from Office 365

SuiteCRM for Developers

Kotlin for Android Developers

Dropbox for Business. Secure file sharing, collaboration and cloud storage. G-Cloud Service Description

Work Together Tools Social Collaboration with Novell Vibe Cloud

Choosing the Best Mobile Backend

Reference Guide TEAM. Pogoplug Team. Reference Guide Cloud Engines Inc., All Rights Reserved.

UNCSA Office In The Cloud

Save and share files in the cloud by using

Building Phone Applications

Copyright 2013 Splunk Inc. Introducing Splunk 6

Save and share files in the cloud by using OneDrive for Business

Agile Planet. A Travel Guide to the Agile Universe Fabian Schiller. This book is for sale at

Encryption Guide version 1.2, by Thomas Reed

Getting Started with your Chromebook

Save and share documents in the cloud with OneDrive

Sharing files to allow for collaboration

How to Use JCWHosting Reseller Cloud Storage Solution

Agile ICT Website Starter Guides

Agenda. Success Stories with OpenShift. 11:15-11:45 am. OpenShift Tech Overview 9:40-10:30 am. Red Hat Mobile on OpenShift 10:45-11:15 am

How To Build An Intranet In Sensesnet.Com

SURPASS HOSTING SERVICE GETTING STARTED AND OPERATIONS GUIDE

Hands-On Mobile App Testing

owncloud Architecture Overview

Important Information

Guide to Automating Workflows Quickly and Easily

HOW TO SETUP SITE-TO-SITE REPLICATION

eyeos Web System User Manual

Developing Offline Web Application

Social Media Monitoring: Engage121

Deer Park ISD Desktop Files & One Drive Cloud

mydlink DCS-930L/932L Cloud Cam Advanced Settings Setup Guide

Cloud Elements! Marketing Hub Provisioning and Usage Guide!

Document From MAXIMUM BUSINESS INFORMATION TECHNOLOGY ON A. OwnCloud User Manual. TO I Cafe`

Getting started with OneDrive

Build a Multilingual Website with Joomla! 2.5

Creating a Facebook Page for your classroom is super easy! Here s how to get started!

BULK SMS APPLICATION USER MANUAL

PhoneGap Build Starter

Magento Best Practices Handbook

White Paper. Anywhere, Any Device File Access with IT in Control. Enterprise File Serving 2.0

Guide 3 - SkyDrive Pro

ADMINISTRATOR GUIDE VERSION

Fifty Enterprise Architect Tricks

OneDrive for Business

SAS. Cloud. Account Administrator s Guide. SAS Documentation

Building Website with Drupal 7

LYNC 2010 USER GUIDE

Smartphone Enterprise Application Integration

EMPLOYEE LOCATION TRACKING SERVICE

Features of AnyShare

Gladinet Cloud Backup V3.0 User Guide

Managing Existing Mobile Apps

The Learn-Verified Full Stack Web Development Program

SavvyDox Publishing Augmenting SharePoint and Office 365 Document Content Management Systems

How to Add Users 1. 2.

Installation Guide. Research Computing Team V1.9 RESTRICTED

Utilizing SASED OneDrive Cloud Storage

AUT OneDrive for Business. Instructions for Using OneDrive on Windows Platform

Good Share Client User Guide for ios Devices

Your events are about to get smarter

Salesforce.com Integration Guide

Microsoft Office 365 includes the entire Office Suite (Word, Excel, PowerPoint, Access, Publisher, Lync, Outlook, etc ) and an OneDrive account.

October, Install/Uninstall Xerox Print Drivers & Apps Best Practices for Windows 8, 8.1, and 10 Customer Tip

welcome to my Randstad web timesheets!

Military Community and Family Policy Social Media. Guide. Staying Connected

Microsoft Office 365 from Vodafone. Administrator s Guide for Midsize Businesses and Enterprises

PLATFORM. Web Content Management and Digital Marketing for Higher Education. Everything You Need from a Great Enterprise CMS CONTENT MANAGEMENT

How to Set Up Website Hosting at Hostgator and Install a WordPress Blog

Marketing Automation Request for Proposal

GLOBALMEET FOR DESKTOP GLOBALMEET FOR DESKTOP USER GUIDE

Platform Architecture & Integration with OpenShift

Welcome to EMP Monitor (Employee monitoring system):

In the Cloud: File Storage Collaboration and Communication with Office 365. Teacher Academy

How To Set Up Dataprotect

Empowering Teams and Departments with Agile Visualizations

ICON UK 2015 node.js for Domino developers. Presenter: Matt White Company: LDC Via

tibbr Now, the Information Finds You.

Business and enterprise cloud sync, backup and sharing solutions

How Much Space? New SkyDrive accounts offer 7GB of cloud storage. Older users of the service were able to reclaim more free space (25 GB).

Storage Made Easy. Cloud File Server Overview

Download Google Drive to windows 7

The Social Accelerator Setup Guide

How to use Dropbox. What is Dropbox. Please read the University of Melbourne Guidelines on Dropbox and University Information prior to use.

Livezilla How to Install on Shared Hosting By: Jon Manning

CoderDojo Community Platform Requirements Specification

Transcription:

The Little Real-time Web Development Book Learn to apply real-time web development practices in your apps Roger Stringer This book is for sale at http://leanpub.com/real-time-web This version was published on 2015-08-18 This is a Leanpub book. Leanpub empowers authors and publishers with the Lean Publishing process. Lean Publishing is the act of publishing an in-progress ebook using lightweight tools and many iterations to get reader feedback, pivot until you have the right book and build traction once you do. 2015 Roger Stringer

Contents 1. Introduction........................................... 1 1.1 Welcome to The Little Real-time Web Development Book............... 2

1. Introduction I ve been building websites and web apps of various sizes since 1998. Websites were generally described as pamphlet types of websites that sometimes had catalogs attached to them, then with the advent of languages like PHP, Ruby, Perl and other early CGI forerunners, we started making our web sites more interactive. They started doing things both client and server side. Building things for the web had become a lot more powerful but also more complex, as you started to need to add servers, and databases. The web has come a long way since then, but not a lot has changed until recently. Recently, the real-time web came along. To learn about how real-time works, let s do a little mental experiment. 1. Imagine you re opening the same folder in two different windows on your computer. 2. Now click inside one of the two windows and delete a file. Did the file disappear from the other window as well? You don t need to actually do these steps to know that it did. When we modify something on our local filesystems, the change is applied everywhere without the need for refreshes or callbacks. It just happens. However, let s think about how the same scenario would play out on the web. For example, let s say you opened the same WordPress site admin in two browser windows and then created a new post in one of them. Unlike on the desktop, no matter how long you wait, the other window won t reflect the change unless you refresh it. Or on that same WordPress blog, if you created a new post, would that post automatically be available to your readers who happened to be on the site at that moment without refreshing the page? With the real-time web, and specifically with Flybase by Data McFly, you would see these changes happen in real-time, no refresh needed! For a bit of background as to what Flybase is, let s revisit the story of how Flybase came to be: The first API that would eventually grow into what Flybase is now was originally developed in 2013, when after making yet another mobile app and API for a client, we realized that we were basically making the same API for each client, the difference

1. Introduction 2 was the data. We were building the same API for each app, and changing the data being used to match what was needed. From there, grew a large, almost overwhelming desire to build a universal, flexible API that could be used on any type of app to handle data storage and synchronize in realtime across multiple devices. Now, fast forward to 2015, and Flybase helps developers quickly and easily build apps in less time than it used to take, with the Flybase cloud servers acting as your app s backend. Real-time web development means all connected clients instantly sync with each other to reflect changes to data. A blog could instantly show the most recent post, or a chat app could show the most recent chat messages. Call centers would reflect incoming calls or messages, and no page refresh needed. This also extends to mobile apps, change something on a mobile app and it reflects the change on the desktop app. Here s a brief example of a real-time web app: 1 // First, create a Flybase reference object 2 var Ref = new Flybase("74k8064f-cd6f-4c07-8baf-b1d241496ec", "sample", "chat"); 3 4 // Second, save some data 5 Ref.set({ name: "Roger Stringer" }); 6 7 // Third, listen for real-time changes to our data 8 Ref.on("added", function(data) { 9 var name = data.value().name; 10 alert("my name is " + name); 11 }); This small example will pop up an alert with the person s name when ever someone saved their name to the Flybase datastore. 1.1 Welcome to The Little Real-time Web Development Book This book has been written to give you a good understanding of using Flybase to build real-time web apps. It was written by Roger Stringer, the founder and lead developer of Flybase, so no one understands using Flybase to build real-time web apps like Roger does. This book will be divided into three sections:

1. Introduction 3 1. Getting started with Flybase and real-time web development Setting up your Flybase account Building your first basic real-time web app Finally, we ll cover queries and custom events to learn how to control what data you display. 2. Building your Flybase app without a server. We ll build a social news app in Angular.JS with Flybase. Learn how to add user login and registration Learn how to accept comments, and update the home page to show the changes Deploying your app to the web, you ll learn how to upload your Social news app to GitHub pages and host it for everyone to use. 3. Integrating your Flybase app into a node.js app We ll take the app we built in section 2, and integrate it into a node.js app to give us extra server-side power such as: RSS feeds, and sitemap.xml generation Auto-tweeting to Twitter when new links are added to your news site. When we re done, you ll have a clear understanding of how real-time web development works, and be able to build whatever you need using Flybase. Ok, we ve covered what real-time web development is, and why you want to incorporate it into your workflow. So let s move onto Chapter 2 and build our first real-time web app.