Future Web App Technologies

Similar documents
Front End Programming

Advance Mobile& Web Application development using Angular and Native Script

welcome to BOILERCAMP HOW TO WEB DEV

a Very Short Introduction to AngularJS

Large-Scale Web Applications

Full Stack boot camp

React.js. a crash course. Jake Zimmerman January 29th, 2016

AngularJS Fundamentals

High Performance Single Page Application with Vue.js

Building an OpenLayers 3 map viewer with React

MEAN Stack. 1. Introduction. 2. Foundation a. The Node.js framework b. Installing Node.js c. Using Node.js to execute scripts

Modern SharePoint and Office 365 Development

Advanced React JS + Redux Development

Lecture 8. ReactJS 1 / 24

Modern and Responsive Mobile-enabled Web Applications

React(.js) the Domino Way High-Performance Client for Domino. Knut Herrmann

MongoDB Web Architecture

MAKING WAVES TECHNOLOGY RADAR 2018

Templates and Databinding. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Evaluation Guide for ASP.NET Web CMS and Experience Platforms

Controller/server communication

POWER BI BOOTCAMP. COURSE INCLUDES: 4-days of instructor led discussion, Hands-on Office labs and ebook.

EMPLOYEE LOCATION TRACKING SERVICE

Upper- Intermediate. Senior Front end Developer. First Name Denis V. Birth Date Professional experience (years) 4.5

CS371m - Mobile Computing. Persistence - Web Based Storage CHECK OUT g/sync-adapters/index.

Course 1: Microsoft Professional Orientation: Front-End Web Developer

Manual Html A Href Onclick Submit Form

Develop and test your Mobile App faster on AWS

React Not Just Hype!

Back-end architecture

Adventures with BaseX and web applications. Andy Feb 2013

Review. Fundamentals of Website Development. Web Extensions Server side & Where is your JOB? The Department of Computer Science 11/30/2015

CS 142 Final Examination

Angular 5 vs. React When to Choose Which?

Node.js. Mendel Rosenblum. CS142 Lecture Notes - Node.js

Treating Framework Fatigue With JavaScript

React + React Native. Based on material by Danilo Filgueira

Welcome. Quick Introductions

STARCOUNTER. Technical Overview

AngularJS Introduction

Masters in Web Development

Web Development for Dinosaurs An Introduction to Modern Web Development

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

Building Web Applications

P a g e 1. Danish Technological Institute. Scripting and Web Languages Online Course k Scripting and Web Languages

A WEB BASED OFFICE MARKET. CS 297 Project Report Presented to Dr. Christopher Pollett San José State University

Power BI Developer Bootcamp

Distributed Architectures & Microservices. CS 475, Spring 2018 Concurrent & Distributed Systems

Comprehensive AngularJS Programming (5 Days)

DECOUPLING PATTERNS, SERVICES AND CREATING AN ENTERPRISE LEVEL EDITORIAL EXPERIENCE

Building mobile app using Cordova and AngularJS, common practices. Goran Kopevski

Project: UniD UCSB CS Capstone Product Requirements Document

Developing ASP.NET MVC Web Applications (486)

Angular 2 Programming

TechWatch Report Javascript Libraries and Frameworks

Standard 1 The student will author web pages using the HyperText Markup Language (HTML)

Developing Microsoft Azure Solutions (70-532) Syllabus

"Charting the Course... Comprehensive Angular. Course Summary

AWS Lambda + nodejs Hands-On Training

Single Page Applications

CS193X: Web Programming Fundamentals

FULL STACK FLEX PROGRAM

Tools of the Trade Web Development at Fairfax Media

Full Stack Developer with Java

August, HPE Propel Microservices & Jumpstart

Lesson: Web Programming(6) Omid Jafarinezhad Sharif University of Technology

Homework 8: Ajax, JSON and Responsive Design Travel and Entertainment Search (Bootstrap/Angular/AJAX/JSON/jQuery /Cloud Exercise)

13/03/2017. Author Bartosz Zurawski (C ) Project Coordinator Joseph K. Research

Modern App Architecture

CodeValue. C ollege. Prerequisites: Basic knowledge of web development and especially JavaScript.

CS 498RK FALL RESTFUL APIs

We re working full time this summer alongside 3 UCOSP (project course) students (2 from Waterloo: Mark Rada & Su Zhang, 1 from UofT: Angelo Maralit)

Copyright 2014, Oracle and/or its affiliates. All rights reserved.

JavaScript Fundamentals_

Prototyping a Social Network. AngularJS: Firebase integration with AngularFire

Full Stack Web Developer Nanodegree Syllabus

FULL STACK FLEX PROGRAM

Oracle Mobile Application Framework

FULL STACK FLEX PROGRAM

Getting Started with

Oracle Mobile Cloud, Enterprise

Embedded type method, overriding, Error handling, Full-fledged web framework, 208 Function defer, 31 panic, 32 recover, 32 33

Open Source Library Developer & IT Pro

Controller/server communication

The Essence of Node JavaScript on the Server Asynchronous Programming Module-driven Development Small Core, Vibrant Ecosystem The Frontend Backend

(p t y) lt d. 1995/04149/07. Course List 2018

ITP 342 Mobile App Development. APIs

FULL STACK FLEX PROGRAM

Sessions. Mendel Rosenblum. CS142 Lecture Notes - Sessions

The DOM and jquery functions and selectors. Lesson 3

Connect and Transform Your Digital Business with IBM

Developing Microsoft Azure Solutions (70-532) Syllabus

Single Page Applications using AngularJS

ITP 140 Mobile Technologies. Mobile Topics

NoSQL & Firebase. SWE 432, Fall Web Application Development

Persistence. SWE 432, Fall 2017 Design and Implementation of Software for the Web

CS50 Quiz Review. November 13, 2017

FULL STACK FLEX PROGRAM

Etanova Enterprise Solutions

FULL STACK FLEX PROGRAM

Transcription:

Future Web App Technologies Mendel Rosenblum

MEAN software stack Stack works but not the final say in web app technologies Angular.js Browser-side JavaScript framework HTML Templates with two-way binding Directives and services for modular design Much single page application support - routing, model fetching, etc. Node.js / Express.js web server code Server side JavaScript High "concurrency" with single-thread event-based programming MongoDB "document" storage Store frontend models Storage system support scale out (sharing and replication), queries, indexes

Angular criticisms Digest cycle overheads on pages with large numbers of items Consider the watches on a large data table with multiple columns HTML template with two-way binding DOM access overhead Access to the browser DOM is slow Large size of JavaScript Needs to download, initialize, and digest before anything appears Problematic on mobile Software engineering problems programming at scale Scope inheritance, JavaScript lack of typing, interface definitions, etc. Considered too opinionated by some

Front-end alternative - ReactJS from Facebook JavaScript framework - Does view component only Less opinionated than Angular - Need model fetch, routing, etc. packages to work View declared in JavaScript (more accurately a lang translated to JavaScript) Angular: HTML with JavaScript embedded React: JavaScript with HTML embedded Basic building block: Components Have a function render() that returns HTML-like structure Accepts inputs (this.props) Have an internal state (this.state) Components are reusable pieces composed to form view

React in JavaScript var CommentBox = React.createClass({displayName: 'CommentBox', render: function() { return ( React.createElement('div', {classname: "commentbox"}, "Hello, world! I am a CommentBox." ) ); } }); ReactDOM.render( React.createElement(CommentBox, null), document.getelementbyid('content') );

React using JSX Encourage to use JSX (XML-like language translated to JavaScript) var CommentBox = React.createClass({ render: function() { return ( <div classname="commentbox"> Hello, world! I am a CommentBox. </div> ); } }); ReactDOM.render( <CommentBox />, document.getelementbyid('content') );

this.props input to components var Comment = React.createClass({ render: function() { return ( <div classname="comment"> {this.props.author} {this.props.children} </div> ); } }); <Comment author="mendel Rosenblum">This is one comment</comment>

Virtual DOM React component render() functions results are places in a Virtual DOM Highly optimized one-way binding process Only components whose this.props or this.state change are updated Much faster access than the real DOM React efficiently pushes the Virtual DOM to the Browser's DOM Only the parts of the Browser's DOM that change are updated Key feature of React Decouples React from the browser DOM

ReactJS input Like AngularJS: Components can JavaScript event handlers on clicks and form/textarea changes that update this.state or this.props More efficient that the AngularJS binding to a JavaScript variable and then using watch/digest to detect changes: one vs two way binding. Encourages a more holistic view of web app state. Example: Redux Put all web app browser state in a common abstraction: a state store All inputs (user, network, components, etc.) go into store Components take their inputs from the store More elegant solution that AngularjS with $on/$broadcast

ReactJS benefits over AngularJS High performance for rapidly changing views Less time calling into Browser's DOM Server-side rendering Can run React either on server or browser Faster startup by pushing HTML from server React Native Have native mobile apps for ios and Android that speak React

Angular Version 2 - Renamed Angular Very different from AngularJS Doubled down on the AngularJS Directive abstraction - focus reusable components Components written in extended Typescript (ES6 + Typescript + annotations) Got rid of scopes, controllers, two-way binding Directives are components with a HTML template and corresponding controller code Similar architecture to ReactJS Faster rendering and can support server-side rendering

Node.js criticisms Callback hell - TJ Holowaychuk's why Node sucks: 1. you may get duplicate callbacks 2. you may not get a callback at all (lost in limbo) 3. you may get out-of-band errors 4. emitters may get multiple error events 5. missing error events sends everything to hell 6. often unsure what requires error handlers 7. error handlers are very verbose 8. callbacks suck JavaScript lack of typing checking Concurrency support (e.g. crypto operations) Performance overheads

Go Language System programming language released in 2007 by Google Done by original Unix authors (Reacting to complexity of C++/Java and Python at scale) From Wikipedia: A compiled, statically typed language..., with garbage collection, memory safety features and CSP-style concurrent programming Cross C & scripting languages Productive and readable programs C-like but got rid of unnecessary punctuations Super fast compiler

Go language features Like dynamic languages, types are inferred intvar := 3; stringvar := "Hello World"; Functions can return multiple values func vals() (int, int) { return 3, 7 } a, b := vals() Common pattern: return result, err

Go language features Can declare types and allocate instances type person struct { name string age int } s := person{name: "Sean", age: 50} Automatic memory management using garbage collection

Go concurrency - threads goroutine is a lightweight thread of execution go processrequest(request); Encourages using tons of threads. Example: per request threads Has channels for synchronization messages := make(chan string) go func() { messages <- "ping" }() msg := <-messages Also locks for mutual exclusion

MongoDB criticisms Lots - Pretty lame database Loses data, doesn't scale well Large space overheads for objects and indexes Query language: Not SQL? Limited concurrency control (only single object transactions) Many other databases Cloud storage offerings are getting better Example: Spanner (Globally consistent, scalable, relational database)

Alternatives to building your own full stack Frontend centric: Model storage approach Firebase Develop your web app (MVC) and store models in the cloud services Pushes new models to the web app when things change Example sweet spot: Top scorer list for a game Backend centric: Schema driven approach Describe data of application Auto generate schema and front-end code Limited to form-like interface Various systems that promises to take a specification of your web app and deliver it

Full stack engineering Tall order to fill Make pretty web pages by mastering HTML and CSS Architecture scalable web service Layout storage system system sharding, schema, and indexes Typically people specialize The expert in CSS is different than expert in database schema is different from the ops team

Looking to the future Cloud providers will offer a platform that most web applications can just build off LIke people don't write their own operating system anymore. Technologies and app demands have been changing so much we still in the roll your own phase. Pieces are coming together World-wide scalable, reliability, available storage systems (e.g. Google's spanner) Serverless computing platforms (e.g. Amazon Lambda) Cloud services - Pub/sub, analytics, speech recognition, machine learning, etc.

Example Cloud Offering: Google Firebase Client library for most app platforms (web, ios, android, etc.) Storage App focus - No backend programming Realtime Database - Shared JSON blob (nosql) with watches and protection Client directly queries database (no web servers needed) Cloud Storage - Blob storage for bigger things like files Use for unstructured data you don't want to encode into JSON in the realtime database Authentication - Let users login Supports accounts/passwords, Google, Facebook, OAUTH, etc.

Google Firebase (continued) Hosting Global content distribution network (CDN) Distribute read-only parts (e.g. HTML, CSS, JavaScript) with low-latency Remote Config - Distribute different versions A/B testing, customize versions Cloud Function - Serverless computing - Triggers on network or storage events Allows for backend functionality without needing servers Application monitor - Provides a dashboard Google Analytics - Track application usage (e.g which routes, etc.) Performance Monitoring - Track request timings, etc. Crash reporting - Upload information about failures Crashlytics - Classify crashes and provide alerts

Google Firebase (continued) User Communication Cloud Messaging - Send messages or notifications to app users Invites - Allow users to point other users at your app Dynamic Links - Deep linking support Direct users to native mode apps Google Integration Admob - Show ads in your app Adwords - Advertise your app on Google App Indexing - Have your app show up in Google Search

Google Cloud offerings Everything is an Application Programming Interface (API) REST commonly used Language Translation Information extraction services: Video Analysis Speech Analysis Text Analysis Conversational user interface support (e.g chatbot)

Trending Web App Frameworks - CS142? View - JavaScript/TypeScript/CSS or Native app React.js, Angular (2), Vue.js View-only: Components packaging HTML/Templates State Management Reactive programming Observable pattern Becoming similar to old distributed system consistency issues Backend communication - Graphql vs REST Backend - Serverless, perhaps Go language Storage - SQL query language - relational-like database

Web Apps versus Native Apps Web Apps advantages: Available on all platforms - Smaller, faster development Easy "update" of application Customize application per user Native apps Native look and feel user interface Integrate with host platform Hybrid approach: Embed browser in native app Backend can be largely the same for both - (e.g. REST APIs)