JavaScript Rd2. -Kyle Simpson, You Don t Know JS

Similar documents
DECOUPLING PATTERNS, SERVICES AND CREATING AN ENTERPRISE LEVEL EDITORIAL EXPERIENCE

Frontend UI Training. Whats App :

Angular 2 Programming

JavaScript CS 4640 Programming Languages for Web Applications

Treating Framework Fatigue With JavaScript

Learn Web Development CodersTrust Polska course outline. Hello CodersTrust! Unit 1. HTML Structuring the Web Prerequisites Learning pathway.

Advanced React JS + Redux Development

Modern and Responsive Mobile-enabled Web Applications

a Very Short Introduction to AngularJS

THE PRAGMATIC INTRO TO REACT. Clayton Anderson thebhwgroup.com WEB AND MOBILE APP DEVELOPMENT AUSTIN, TX

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

JavaScript CS 4640 Programming Languages for Web Applications

Comprehensive AngularJS Programming (5 Days)

Angular 4 Training Course Content

Catbook Workshop 1: Client Side JS. Danny Tang

Stencil: The Time for Vanilla Web Components has Arrived

RequireJS Javascript Modules for the Browser. By Ben Keith Quoin, Inc.

Lab 1 - Introduction to Angular

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

JavaScript and MVC Frameworks FRONT-END ENGINEERING

Advance Mobile& Web Application development using Angular and Native Script

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

ANGULAR2 OVERVIEW. The Big Picture. Getting Started. Modules and Components. Declarative Template Syntax. Forms

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

XML. Jonathan Geisler. April 18, 2008

JavaScript Lecture 1

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

JAVASCRIPT AND JQUERY: AN INTRODUCTION (WEB PROGRAMMING, X452.1)

One language to rule them all: TypeScript. Gil Fink CEO and Senior Consultant, sparxys

Catbook Workshop: Intro to NodeJS. Monde Duinkharjav

Wakanda Architecture. Wakanda is made up of three main components: Wakanda Server Wakanda Studio Wakanda Client Framework

Quick.JS Documentation

JavaScript. History. Adding JavaScript to a page. CS144: Web Applications

Front End Programming

jquery with Fundamentals of JavaScript Training

AngularJS Fundamentals

CIS 3308 Web Application Programming Syllabus

welcome to BOILERCAMP HOW TO WEB DEV

PHP + ANGULAR4 CURRICULUM 6 WEEKS

ANGULAR 2.X,4.X + TYPESRCIPT by Sindhu

FRONT END WEB. {< Course Details >}

Today. Continue our very basic intro to JavaScript. Lambda calculus

Software Development & Education Center PHP 5

AngularJS. Beginner's guide - part 1

Sample Copy. Not For Distribution.

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

Frontend II: Javascript and DOM Programming. Wednesday, January 7, 15

20480C: Programming in HTML5 with JavaScript and CSS3. Course Code: 20480C; Duration: 5 days; Instructor-led. JavaScript code.

Front End Nanodegree Syllabus

High Performance Single Page Application with Vue.js

Frontend guide. Everything you need to know about HTML, CSS, JavaScript and DOM. Dejan V Čančarević

Tuesday, January 13, Backend III: Node.js with Databases

Future Web App Technologies

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

JavaScript Fundamentals_

Front-End Web Developer Nanodegree Syllabus

FULL STACK FLEX PROGRAM

5/19/2015. Objectives. JavaScript, Sixth Edition. Introduction to the World Wide Web (cont d.) Introduction to the World Wide Web

Front End Nanodegree Syllabus

Javascript. Many examples from Kyle Simpson: Scope and Closures

Profound.js. Future of open source development on IBM i. Alex Roytman Profound Logic

Arjen de Blok. Senior Technical Consultant bij ICT Groep ( sinds 1995 Programmeren sinds 1990 Technologiën. Links

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

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

Web API Lab. The next two deliverables you shall write yourself.

Course Outline. ProTech Professional Technical Services, Inc. Comprehensive Angular 7 Course Summary. Description

,

Chapter Two Bonus Lesson: JavaDoc

Full Stack boot camp

Full Stack Developer with Java

HTML 5 and CSS 3, Illustrated Complete. Unit L: Programming Web Pages with JavaScript

Lecture 8. ReactJS 1 / 24

Pre Order Magento Extension User Guide Official extension page: Pre Order

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

IN4MATX 133: User Interface Software

August, HPE Propel Microservices & Jumpstart

HTML Fundamentals. Code Institute Modular Outline for each Subject in the Program. Quizzes %

An Introduction to TypeScript. Personal Info

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

TigerConnect. Product Guide. Tajreen Ahmed Jessica Edouard Kevin Finch Lillian Meng

WEB DEVELOPER BLUEPRINT

One Framework. Angular

Choosing the web s future. Peter-Paul Koch Van Lanschot, 9 February 2017

Human-Computer Interaction Design

Web Development for Dinosaurs An Introduction to Modern Web Development

Building Your own Widget with ArcGIS API for JavaScript

Introduction to Sencha Ext JS

Introduction to AngularJS

JavaScript Programming

Introduction to the SharePoint Framework Bob German Principal Architect - BlueMetal. An Insight company

Cisco Spark Widgets Technical drill down

SAMPLE CHAPTER. Using Electron and NW.js. Paul B. Jensen. FOREWORD BY Cheng Zhao MANNING

Angular 2 and TypeScript Web Application Development

Mavrig. a Tcl application construction kit. Jean-Claude Wippler Equi 4 Software, NL. EuroTcl 2008, Strasbourg, FR

MANNING. Universal development with React SAMPLE CHAPTER. Elyse Kolker Gordon

JavaScript: Sort of a Big Deal,

FULL STACK FLEX PROGRAM

Web Site Development with HTML/JavaScrip

Cleveland State University Department of Electrical and Computer Engineering. CIS 408: Internet Computing

WebStorm, intelligent IDE for JavaScript development

Transcription:

JavaScript Rd2 [JavaScript] is simultaneously a simple, easy-to-use language that has broad appeal, and a complex and nuanced collection of language mechanics which without careful study will elude the true understanding of even the most seasoned JavaScript developers. -Kyle Simpson, You Don t Know JS

Overview 1. ES6 quality of life features a. Modules b. Rest/Spread c. Template literals 2. Functional Programming in JS 3. A brief overview of the Document Object Model (DOM) a. HTML parsing and script loading b. Basic DOM manipulation 4. Assignment #2

ES6 or ECMAScript 2015 Introduced a bunch of language features. Comprehensive list and demo is here: http://es6-features.org/ Most useful to get used to in this course a. Templates using `` syntax b. Modules - Import/Export c. Rest, Destructuring, Spread Syntax, Object rename d. Arrow functions

ES6 Templates Uses backticks to make string manipulation simpler `Hello World` // As per normal Hello World Say we ve set name here as js variable as Alex `Hello ${name}` // Hello Alex // Can go a step further and even do evaluation `Hello ${20 * 8}` // `Hello 160`

ES6 Modules Importantly solve some pretty classic headaches for JS beginners. Script load timing agnostic Avoids namespace pollution Makes code modular! yay.

ES6 Modules Introduced the keywords import, export. import { namedvar } from./a-relative-path ; import defaultexport from./a-relative-path ; And the otherside of the equation: export { namedvar }; export default somedefaultexport;

ES6 Destructuring, Rest, Spread Syntax - Timesaving, intuitive syntax - Saves repetitive renaming - Allows much cleaner Object and Array manipulation

ES6 Rest/Spread/Destructure (Demo) // destructuring. Can be done in function args too! const { x, y } = obj // extracts key-values x, y // Array destructure pretty much the same const [ x, y ] = list // extracts key-values x, y Spread syntax (rest in Demo) const somelist = [1, 2, 3, 4, 5] const evenlongerlist = [...somelist, 6, 7]

Thinking Functionally in JS Functions in JavaScript are first class objects; that is they can be more or less treated in the same way as variables, passed around, and even returned by other functions. This isn't a unique trait of JavaScript but it does allow you to think and program differently than you might otherwise be used to.

Thinking Functionally in JS Imperative Like a recipe. An instruction set for achieving a result focused on the process. Declarative (Functional) Description of the logic of a program rather than the way the logic is implemented.

.map,.filter,.reduce and arrows. Key things: Get rid of global variables, state. Get rid of side effects Aim for function purity - we can reason easily about what a function does because it always does the same thing with the same input. Much more expressive way to code.

Functional Example.

Browser Object Model (BOM) Abstraction over the browser. Browser provides a normalised API which allows JS to do I/O calls like writing, reading to the document from the interface (we ll get to this). Window is also populated with: Browser specific API globals (location, navigation, fetch, localstorage...). JavaScript globals Provides the context environment for your scripts to run in.

Document Object Model (DOM) Abstraction over the document. Provides the page interface that we can update our html with and create dynamic pages. DOM is a tree-like structure. There is a root node which has children HTML elements/nodes. More on this in future weeks.

Document Object Model (DOM) EXAMPLE!

The Assignment - Instacram AIM: Build an image driven social media Single Page Application (SPA) using all your sweet frontend web development skills. We don t expect you to know how to do that by any means yet. We ll provide a bit of code and hopefully enough guidance to get through it okay. There will be progressively more difficult milestones, but the base project will be very achievable We will provide an API which you ll need to interact with; more info on this soon. This is very real world.

The Assignment Things to consider: Think about how to separate your API logic from your DOM manipulation/render logic Think about how to manage the state of a user (simple and more complex solutions) Read up on how the API works (when it s released), and think about what data you ll need where, and how to combine relevant bits of data together.

The Assignment Finally, some rules... This is very much an individual assignment! You must use nothing but vanilla JavaScript, HTML and CSS. Please do not submit bundles or precompiled JavaScript. Do not use a framework like React, Vue, Angular.. etc! Despite us providing a little bit of node.js knowledge in this course we don t want you using npm packages to supplement your code. You can if you like you snippets of code as long as attributed correctly. Mostly though, try and have fun.