Lecture 8. ReactJS 1 / 24

Size: px
Start display at page:

Download "Lecture 8. ReactJS 1 / 24"

Transcription

1 Lecture 8 ReactJS 1 / 24

2 Agenda 1. JSX 2. React 3. Redux 2 / 24

3 JSX 3 / 24

4 JavaScript + HTML = JSX JSX is a language extension that allows you to write HTML directly into your JavaScript files. Behind the scenes, it converts all the HTML text to React components. This means that we use ReactDOM.render to render JSX. This function takes in a JSX object (which it renders) and a plain DOM element (which it renders the JSX inside of). var mydiv = ( <div class="jsx"> Greetings from JSX world! </div> ); ReactDOM.render(myDiv, getelementbyid('container')); 4 / 24

5 The Transformation JSX maps directly into React syntax, so you never actually have to dig down into the React element-creation API. Here's a side-by-side comparison of the JSX syntax and the equivalent JavaScript: <ul id="list"> <li>one thing</li> <li>another</li> </ul> React.createElement( "ul", { id: "list" }, React.createElement( "li", null, "One thing" ), React.createElement( "li", null, "another" ) ); 5 / 24

6 JSX Syntax It's pretty much HTML, with a few key differences: Some common attribute names (like class and for ) are reserved in JavaScript, so they have different names in JSX ( classname and htmlfor, respectively). Custom attributes (any attribute not in the HTML spec) must have a data- prefix. Inline styles must be specified as objects, not strings. Properties are camelcased instead of kebab-case. Example: <div style={{color: 'white', fontsize:'12px'}}> 6 / 24

7 Computed Expression Values What makes JSX useful is that we don't need to know all the values of the attributes ahead of time. So we can use it as an easy templating engine. For instance, here's an example of a simple login/logout button. <a classname="button" href={window.loggedin? '/logout' : '/login'} > {window.loggedin? 'Log Out' : 'Log In'} </a> In reality, though, these values won't be global - they'll actually come from a React component! 7 / 24

8 Side Note: How JSX is transformed We're going to use Browserify to bring the require syntax from Node to our browser. It generates one big JS file by parsing the syntax of your program for require calls and replacing them with the actual code. As it does this, it also transforms JSX files into plain JS files. Now, instead of including all the <script> tags for our JS files, we only need to include the one that Browserify gives us. <script src="js/build/main.js"></script> 8 / 24

9 Using Browserify With Browserify, we just use the same syntax that we're used to from Node. // require Lodash from node_modules var _ = require('lodash'); // require some local file var utils = require('./utils/index.js'); // export an object to be required elsewhere module.exports = [1, 2, 3, 4]; 9 / 24

10 React 10 / 24

11 Putting the "V" in "MVC" React is often used as the View in a Model-View- Controller architecture. It's a really efficient way to update the DOM in response to state changes because it only re-renders things that have changed, rather than just re-rendering everything. React doesn't really have any utilities for modeling data. It can easily be used with any model framework, including Backbone models. 11 / 24

12 Components Components are the basic building blocks of React. A React application is just a tree of components, each representing a different part of the DOM. 12 / 24

13 Creating Components Components are created using React.createClass. The only required method is render (though we'll discuss many others). This method simply returns a JSX representation of the component. var HelloWorld = React.createClass({ render: function () { // Return a heading to greet the user. // What's this.props.name? See the next slide! return ( <h1>hello {this.props.name}!</h1> ); } }); 13 / 24

14 Rendering Components Once we have a component, we can refer to it as a JSX element using its variable name. Here's an example of rendering a HelloWorld component with a name 'CIS 197'. ReactDOM.render( // Here's the name prop from the previous slide! <HelloWorld name={'cis 197'} />, document.getelementbyid('container') ); 14 / 24

15 State and Props The previous example used this.props to access a value that was defined as a JSX attribute. These values are called properties, and they should be treated as immutable by their components (though, this being JavaScript, they're very mutable). Mutable values are encapsulated as the state of a component. A component is allowed to mutate its state, usually in response to events. 15 / 24

16 Event Listeners Event listeners are set up in JSX. They should refer to functions on the component, which will (almost always) then update the state of the component using setstate. var LikeButton = React.createClass({ getinitialstate: function () { return {liked: false}; }, toggle: function () { this.setstate({liked:!this.state.liked}); }, render: function () { var txt = this.state.liked? 'Unlike' : 'Like'; var color = this.state.liked? '#3b5998' : '#627AAC'; return ( <span onclick={this.toggle} style={{color: color}}> {'\ud83d\udc4d' + txt} // </span> ); } }); 16 / 24

17 Nesting Components A component can have subcomponents, which can have components themselves, and so on. This allows for component re-use, and it's very intuitive, since a component is JSX looks just like any other element. Generally a higher level component will change its subcomponents when it re-renders itself. Since React efficiently recomputes the DOM, this is much more efficient than it sounds! 17 / 24

18 Redux 18 / 24

19 Managing Application State Rather than using traditional models to manage our React application, we're going to do something a little different. Instead of keeping a model for every component, we're just going to keep track of the state of the whole app at once! 19 / 24

20 How Redux Works Redux keeps track of the state of your application behind of the scenes. To change the state, you can dispatch actions (which are just arbitrary JS objects). The event is passed to the reducer, which is a function of type (event, state) -> state. Finally, you can use subscribe to run a function whenever the state changes. This is a lot like an event listener, but the difference is that with Redux, everything depends on the state. Subscribed functions don't have access to the event that caused the change to state. 20 / 24

21 Quick Redux Example var redux = require('redux'); var reducer = function (state, action) { if (action.type === 'INCR') { return state + 1; } else if (action.type === 'DECR') { return state - 1; } return state; }; // create store with initial state 10 var store = redux.createstore(reducer, 10); store.subscribe(function () { console.log(store.getstate()); }); store.dispatch({type: 'INCR'}); store.dispatch({type: 'INCR'}); store.dispatch({type: 'DECR'}); store.dispatch({type: 'DECR'}); 21 / 24

22 Using React with Redux You don't need to use React with Redux - they work fine on their own, or with other frameworks like Backbone. But the combination is really nice. Redux is a way of keeping track of state, and React components efficiently update based on their state. So if we just update the state of the top-level React component when the application state changes, we have a working app! The tricky part is updating state based on events. To dispatch an action in response to event (like click ), a component needs access to the store itself. For small applications, this isn't too bad; for larger ones, we may want to factor out this code into other modules. 22 / 24

23 Example Code Some example code for React is available on the CIS 197 Github. Be sure to reference this when completing the homework assignment! 23 / 24

24 Coming Up Homework 7 due Monday, April 3. This will be a two-week homework assignment split into two parts. Next week: a more in-depth React example. Start thinking up some final project ideas! 24 / 24

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

React.js. a crash course. Jake Zimmerman January 29th, 2016 React.js a crash course Jake Zimmerman January 29th, 2016 Key Features of React.js Easily express user interfaces Richly express the visual elements of a design, as well as the interactions users can

More information

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

Lesson: Web Programming(6) Omid Jafarinezhad Sharif University of Technology Lesson: Web Programming(6) Omid Jafarinezhad Sharif University of Technology React QUICK START QUICK START ADVANCED GUIDES React QUICK START Installation Hello World Introducing JSX Components and Props

More information

Building an OpenLayers 3 map viewer with React

Building an OpenLayers 3 map viewer with React FOSS4G 2015 Building an OpenLayers 3 map viewer with React @PirminKalberer Sourcepole AG, Switzerland www.sourcepole.com About Sourcepole > QGIS > > > > Core dev. & Project Steering Commitee QGIS Server,

More information

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

Templates and Databinding. SWE 432, Fall 2017 Design and Implementation of Software for the Web Templates and Databinding SWE 432, Fall 2017 Design and Implementation of Software for the Web Today What are templates? What are frontend components? How can I use these with React? 2 What s wrong with

More information

CS193X: Web Programming Fundamentals

CS193X: Web Programming Fundamentals CS193X: Web Programming Fundamentals Spring 2017 Victoria Kirst (vrk@stanford.edu) CS193X schedule Today - Middleware and Routes - Single-page web app - More MongoDB examples - Authentication - Victoria

More information

Advanced React JS + Redux Development

Advanced React JS + Redux Development Advanced React JS + Redux Development Course code: IJ - 27 Course domain: Software Engineering Number of modules: 1 Duration of the course: 40 astr. hours / 54 study 1 hours Sofia, 2016 Copyright 2003-2016

More information

High Performance Single Page Application with Vue.js

High Performance Single Page Application with Vue.js High Performance Single Page Application with Vue.js Premise Static HTML and simple web-pages are already a history now. The novel web applications are advanced and do a lots of functionalities. Also,

More information

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

THE PRAGMATIC INTRO TO REACT. Clayton Anderson thebhwgroup.com WEB AND MOBILE APP DEVELOPMENT AUSTIN, TX THE PRAGMATIC INTRO TO REACT Clayton Anderson thebhwgroup.com WEB AND MOBILE APP DEVELOPMENT AUSTIN, TX REACT "A JavaScript library for building user interfaces" But first... HOW WE GOT HERE OR: A BRIEF

More information

Beyond JavaScript Frameworks: Writing Reliable Web Apps With. Elm. Erik Wendel DevDays Vilnius 2018

Beyond JavaScript Frameworks: Writing Reliable Web Apps With. Elm. Erik Wendel DevDays Vilnius 2018 Beyond JavaScript Frameworks: Writing Reliable Web Apps With Elm Erik Wendel DevDays Vilnius 2018 Who is Jonathan Ive? Erik Wendel JavaZone 2017 Elm is like Jonathan Ive would have designed a programming

More information

Future Web App Technologies

Future Web App Technologies 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

More information

React Not Just Hype!

React Not Just Hype! React Not Just Hype! @mjackson Thriller. @ReactJSTraining reactjs-training.com rackt github.com/rackt - 14 members - 5 teams (owners, routing, redux, a11y, docs) - Not exclusive! This is not a core team.

More information

React native. State An overview. See the tutorials at

React native. State An overview. See the tutorials at See the tutorials at https://facebook.github.io/react-native/docs/tutorial React native State An overview We ll at each of these in much more detail later. 1 App To build a static app just need Props Text

More information

React & Redux in Hulu. (Morgan Cheng)

React & Redux in Hulu. (Morgan Cheng) React & Redux in Hulu (Morgan Cheng) About Me @morgancheng About Hulu Challenges System Complexity Legacy code in jquery & Backbone UI non-predictable Lack of component isolation Performance Bottleneck

More information

Xtern BOOTCAMP. Week 2 Day 1 May 22, 2017

Xtern BOOTCAMP. Week 2 Day 1 May 22, 2017 Xtern BOOTCAMP Week 2 Day 1 May 22, 2017 Intro to React What is React? A declarative, efficient, and flexible JavaScript library for building user interfaces. It encourages the creation of reusable UI

More information

Getting Started with ReactJS

Getting Started with ReactJS Getting Started with ReactJS By Juned Laliwala About this ReactJS e-book. Basic Understanding of ReactJS Concept of JSX Use of Refs and Keys Practical Demonstrations Animation in ReactJS @2016 Attune World

More information

Full Stack Developer with Java

Full Stack Developer with Java Full Stack Developer with Java Full Stack Developer (Java) MVC, Databases and ORMs, API Backend Frontend Fundamentals - HTML, CSS, JS Unit Testing Advanced Full Stack Developer (Java) UML, Distributed

More information

Gearing Up for Development CS130(0)

Gearing Up for Development CS130(0) Gearing Up for Development CS130(0) Development Development is a coding heavy assignment! You will need to create application using React.js (a Javascript Library). This application will display a list

More information

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. ReactJS

About the Tutorial. Audience. Prerequisites. Copyright & Disclaimer. ReactJS About the Tutorial React is a front-end library developed by Facebook. It is used for handling the view layer for web and mobile apps. ReactJS allows us to create reusable UI components. It is currently

More information

Client Side JavaScript and AJAX

Client Side JavaScript and AJAX Client Side JavaScript and AJAX Client side javascript is JavaScript that runs in the browsers of people using your site. So far all the JavaScript code we've written runs on our node.js server. This is

More information

JavaScript Fundamentals_

JavaScript Fundamentals_ JavaScript Fundamentals_ HackerYou Course Syllabus CLASS 1 Intro to JavaScript Welcome to JavaScript Fundamentals! Today we ll go over what programming languages are, JavaScript syntax, variables, and

More information

jquery Tutorial for Beginners: Nothing But the Goods

jquery Tutorial for Beginners: Nothing But the Goods jquery Tutorial for Beginners: Nothing But the Goods Not too long ago I wrote an article for Six Revisions called Getting Started with jquery that covered some important things (concept-wise) that beginning

More information

Stencil: The Time for Vanilla Web Components has Arrived

Stencil: The Time for Vanilla Web Components has Arrived Stencil: The Time for Vanilla Web Components has Arrived Gil Fink sparxys CEO @gilfink / www.gilfink.net Typical Application Web Page Design From Design to Implementation Session List Day tabs Component

More information

Lecture 4. Ruby on Rails 1 / 49

Lecture 4. Ruby on Rails 1 / 49 Lecture 4 Ruby on Rails 1 / 49 Client-Server Model 2 / 49 What is it? A client (e.g. web browser, phone, computer, etc.) sends a request to a server Request is an HTTP request Stands for HyperText Transfer

More information

Jquery Manually Set Checkbox Checked Or Not

Jquery Manually Set Checkbox Checked Or Not Jquery Manually Set Checkbox Checked Or Not Working Second Time jquery code to set checkbox element to checked not working. Apr 09 I forced a loop to show checked state after the second menu item in the

More information

CISC 1600 Lecture 2.4 Introduction to JavaScript

CISC 1600 Lecture 2.4 Introduction to JavaScript CISC 1600 Lecture 2.4 Introduction to JavaScript Topics: Javascript overview The DOM Variables and objects Selection and Repetition Functions A simple animation What is JavaScript? JavaScript is not Java

More information

Lab 1 - Introduction to Angular

Lab 1 - Introduction to Angular Lab 1 - Introduction to Angular In this lab we will build a Hello World style Angular component. The key focus is to learn how to install all the required code and use them from the browser. We wont get

More information

Lecture 4. Ruby on Rails 1 / 52

Lecture 4. Ruby on Rails 1 / 52 Lecture 4 Ruby on Rails 1 / 52 Homeworks 2 & 3 Grades were released for homework 2 Homework 3 was due last night Everyone got a style freebie since my default setup ignores spec files and I didn't change

More information

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

RequireJS Javascript Modules for the Browser. By Ben Keith Quoin, Inc. RequireJS Javascript Modules for the Browser By Ben Keith Quoin, Inc. Traditional Browser JS One global namespace Often inline JS code embedded directly in HTML Many tags with hidden ordering

More information

Building Your own Widget with ArcGIS API for JavaScript

Building Your own Widget with ArcGIS API for JavaScript Building Your own Widget with ArcGIS API for JavaScript Matt Driscoll @driskull JC Franco @arfncode Agenda About Widgets Prerequisites Widget framework Theming DO IT! Tips & tricks About Widgets What?

More information

AngularJS Introduction

AngularJS Introduction AngularJS Introduction Mendel Rosenblum AngularJS JavaScript framework for writing web applications Handles: DOM manipulation, input validation, server communication, URL management, etc. Considered opinionated

More information

Cascading Style Sheets for layout II CS7026

Cascading Style Sheets for layout II CS7026 Cascading Style Sheets for layout II CS7026 Understanding CSS float The CSS float property is also a very important property for layout. It allows you to position your Web page designs exactly as you want

More information

Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error

Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error Jquery.ajax Call Returns Status Code Of 200 But Fires Jquery Error The request returns http 200 OK, but the xhr status is 0, error. jquery Ajax Request to get JSON data fires error event to make an ajax

More information

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

Frontend II: Javascript and DOM Programming. Wednesday, January 7, 15 6.148 Frontend II: Javascript and DOM Programming Let s talk about Javascript :) Why Javascript? Designed in ten days in December 1995! How are they similar? Javascript is to Java as hamster is to ham

More information

Understanding Angular Directives By Jeffry Houser

Understanding Angular Directives By Jeffry Houser Understanding Angular Directives By Jeffry Houser A DotComIt Whitepaper Copyright 2016 by DotComIt, LLC Contents A Simple Directive... 4 Our Directive... 4 Create the App Infrastructure... 4 Creating a

More information

Webpack. What is Webpack? APPENDIX A. n n n

Webpack. What is Webpack? APPENDIX A. n n n APPENDIX A n n n Webpack Although Webpack is used throughout the book, the primary focus of the book is on React, so Webpack didn t get a comprehensive treatment. In this Appendix, you will have the chance

More information

MongoDB Web Architecture

MongoDB Web Architecture MongoDB Web Architecture MongoDB MongoDB is an open-source, NoSQL database that uses a JSON-like (BSON) document-oriented model. Data is stored in collections (rather than tables). - Uses dynamic schemas

More information

Michiel DomCode, May 26th 2015

Michiel DomCode, May 26th 2015 ClojureScript ReactJS Michiel Borkent @borkdude DomCode, May 26th 2015 Michiel Borkent (@borkdude) Clojure(Script) developer at Clojure since 2009 Former lecturer, taught Clojure Agenda Part 1: ClojureScript

More information

Manual Html A Href Onclick Submit Form

Manual Html A Href Onclick Submit Form Manual Html A Href Onclick Submit Form JS HTML DOM. DOM Intro DOM Methods HTML form validation can be done by a JavaScript. If a form field _input type="submit" value="submit" /form_. As shown in a previous

More information

React Loadable: Code Splitting with Server Side Rendering

React Loadable: Code Splitting with Server Side Rendering React Loadable: Code Splitting with Server Side Rendering About me Former Senior Frontend Developer at Oppex Tech Lead at Toughbyte Ltd React github.com/northerneyes medium.com/@northerneyes twitter.com/nordfinn

More information

BEGINNER PHP Table of Contents

BEGINNER PHP Table of Contents Table of Contents 4 5 6 7 8 9 0 Introduction Getting Setup Your first PHP webpage Working with text Talking to the user Comparison & If statements If & Else Cleaning up the game Remembering values Finishing

More information

Concepts of programming languages

Concepts of programming languages Concepts of programming languages Something El(m)se Paolo Servillo, Enzo van Kessel, Jesse de Ruijter 1 Contents What is Elm? The language The architecture Transcompiling Elm in practice 2 What is Elm?

More information

Catbook Workshop: Intro to NodeJS. Monde Duinkharjav

Catbook Workshop: Intro to NodeJS. Monde Duinkharjav Catbook Workshop: Intro to NodeJS Monde Duinkharjav What is NodeJS? NodeJS is... A Javascript RUNTIME ENGINE NOT a framework NOT Javascript nor a JS package It is a method for running your code in Javascript.

More information

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5.

6.170 Laboratory in Software Engineering Java Style Guide. Overview. Descriptive names. Consistent indentation and spacing. Page 1 of 5. Page 1 of 5 6.170 Laboratory in Software Engineering Java Style Guide Contents: Overview Descriptive names Consistent indentation and spacing Informative comments Commenting code TODO comments 6.170 Javadocs

More information

ReactJS and Webpack for Rails

ReactJS and Webpack for Rails Modern Web Conf 2015 ReactJS and Webpack for Rails Tse-Ching Ho 2015-05-16 @tsechingho 何澤清 紅寶 石商 人 Rubiest 鐵道 工 人 Rails worker 黃碼科技創辦 人 Goldenio founder 生物資訊 Bioinformatics 資料視覺化 Infographics Javascript

More information

Full Stack boot camp

Full Stack boot camp Name Full Stack boot camp Duration (Hours) JavaScript Programming 56 Git 8 Front End Development Basics 24 Typescript 8 React Basics 40 E2E Testing 8 Build & Setup 8 Advanced JavaScript 48 NodeJS 24 Building

More information

Modern and Responsive Mobile-enabled Web Applications

Modern and Responsive Mobile-enabled Web Applications Available online at www.sciencedirect.com ScienceDirect Procedia Computer Science 110 (2017) 410 415 The 12th International Conference on Future Networks and Communications (FNC-2017) Modern and Responsive

More information

AngularJS Fundamentals

AngularJS Fundamentals AngularJS Fundamentals by Jeremy Zerr Blog: http://www.jeremyzerr.com LinkedIn: http://www.linkedin.com/in/jrzerr Twitter: http://www.twitter.com/jrzerr What is AngularJS Open Source Javascript MVC/MVVM

More information

Node.js. Node.js Overview. CS144: Web Applications

Node.js. Node.js Overview. CS144: Web Applications Node.js Node.js Overview JavaScript runtime environment based on Chrome V8 JavaScript engine Allows JavaScript to run on any computer JavaScript everywhere! On browsers and servers! Intended to run directly

More information

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from

BEFORE CLASS. If you haven t already installed the Firebug extension for Firefox, download it now from BEFORE CLASS If you haven t already installed the Firebug extension for Firefox, download it now from http://getfirebug.com. If you don t already have the Firebug extension for Firefox, Safari, or Google

More information

Frontend Frameworks Part 2. SWE 432, Fall 2017 Design and Implementation of Software for the Web

Frontend Frameworks Part 2. SWE 432, Fall 2017 Design and Implementation of Software for the Web Frontend Frameworks Part 2 SWE 432, Fall 2017 Design and Implementation of Software for the Web Today How to make React apps interactive Handling events, state, nesting components, reconciliation, controlled

More information

Approaches to wrapping React. Thursday 3 September 15

Approaches to wrapping React. Thursday 3 September 15 Approaches to wrapping React Om Reagent Quiescent etc. Call it when anything changes One big update method App Logic In-memory DB Advantages Doesn t touch the network i.e. fast Doesn t touch disk Disadvantages

More information

JSX in Depth. Why JSX? The Transform. JSX is a JavaScript XML syntax transform recommended for use with React.

JSX in Depth. Why JSX? The Transform. JSX is a JavaScript XML syntax transform recommended for use with React. 1 of 7 QUICK START Getting Started Tutorial GUIDES Why? Displaying Data JSX in Depth JSX Gotchas Interactivity and Dynamic UIs Multiple Components Reusable Components Forms Working With the Browser More

More information

"a computer programming language commonly used to create interactive effects within web browsers." If actors and lines are the content/html......

a computer programming language commonly used to create interactive effects within web browsers. If actors and lines are the content/html...... JAVASCRIPT. #5 5.1 Intro 3 "a computer programming language commonly used to create interactive effects within web browsers." If actors and lines are the content/html...... and the director and set are

More information

Drag and Drop Form Builder. Data Verity #2 Erikka Baker James Miller Jordan Schmerge

Drag and Drop Form Builder. Data Verity #2 Erikka Baker James Miller Jordan Schmerge Drag and Drop Form Builder Data Verity #2 Erikka Baker James Miller Jordan Schmerge June 21, 2016 Table of Contents Introduction Requirements System Architecture Technical Design Component Highlighting

More information

Introduction to Web Development

Introduction to Web Development Introduction to Web Development Lecture 1 CGS 3066 Fall 2016 September 8, 2016 Why learn Web Development? Why learn Web Development? Reach Today, we have around 12.5 billion web enabled devices. Visual

More information

JavaScript. What s wrong with JavaScript?

JavaScript. What s wrong with JavaScript? JavaScript 1 What s wrong with JavaScript? A very powerful language, yet Often hated Browser inconsistencies Misunderstood Developers find it painful Lagging tool support Bad name for a language! Java

More information

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

Web API Lab. The next two deliverables you shall write yourself. Web API Lab In this lab, you shall produce four deliverables in folder 07_webAPIs. The first two deliverables should be pretty much done for you in the sample code. 1. A server side Web API (named listusersapi.jsp)

More information

React. SWE 432, Fall Web Application Development

React. SWE 432, Fall Web Application Development React SWE 432, Fall 2018 Web Application Development Review: What is state? All internal component data that, when changed, should trigger UI update Stored as single JSON object this.state What isn t state?

More information

AngularJS. Beginner's guide - part 1

AngularJS. Beginner's guide - part 1 AngularJS Beginner's guide - part 1 AngularJS: 2 AngularJS: Superheroic JavaScript MVW Framework 3 AngularJS: Superheroic JavaScript MVW Framework 4 AngularJS: Superheroic JavaScript MVW Framework Javascript

More information

Announcements. The current topic: Scheme. Review: BST functions. Review: Representing trees in Scheme. Reminder: Lab 2 is due on Monday at 10:30 am.

Announcements. The current topic: Scheme. Review: BST functions. Review: Representing trees in Scheme. Reminder: Lab 2 is due on Monday at 10:30 am. The current topic: Scheme! Introduction! Object-oriented programming: Python Functional programming: Scheme! Introduction! Numeric operators, REPL, quotes, functions, conditionals! Function examples, helper

More information

Anatomy of a SPA: Client-side MVC

Anatomy of a SPA: Client-side MVC 11/12/11 10:35 AM Anatomy of a SPA: Client-side MVC SPA: Single Page Application MVC: Model-View-Controller file:///users/baguirre/downloads/rubyconf-slides/index.html#1 11/12/11 10:36 AM My name is Alvaro

More information

Vue.js Developer friendly, Fast and Versatile

Vue.js Developer friendly, Fast and Versatile .consulting.solutions.partnership Vue.js Developer friendly, Fast and Versatile Alexander Schwartz, Principal IT Consultant Javaland 2018 Brühl (DE) March 2018 Vue.js developer friendly, fast and versatile

More information

Styles, Style Sheets, the Box Model and Liquid Layout

Styles, Style Sheets, the Box Model and Liquid Layout Styles, Style Sheets, the Box Model and Liquid Layout This session will guide you through examples of how styles and Cascading Style Sheets (CSS) may be used in your Web pages to simplify maintenance of

More information

REDUX: FP FOR THE WEB

REDUX: FP FOR THE WEB REDUX: FP FOR THE WEB Pratik Patel ARCHITECTURAL LIB ONE WAY DATA FLOW USED WITH REACT (can also be used with ANGULAR) WE WILL DISCUSS REDUX + REACT ONE WAY DATA FLOW ARCHITECTURAL PATTERN FLUX NO DATA

More information

webpack bundle inner structure and optimization Alexey Ivanov, Evil Martians

webpack bundle inner structure and optimization Alexey Ivanov, Evil Martians webpack bundle inner structure and optimization Alexey Ivanov, Evil Martians Evil Martians Evil Martians What I'm working on Problems Multiple versions of lodash or underscore. Problems Multiple versions

More information

React + React Native. Based on material by Danilo Filgueira

React + React Native. Based on material by Danilo Filgueira React + React Native Based on material by Danilo Filgueira Prerequisites JS and ES6 HTML and CSS NPM/YARN and NODE React A Javascript library for creating reactive and composable UI components Whenever

More information

Interactor Tree. Edith Law & Mike Terry

Interactor Tree. Edith Law & Mike Terry Interactor Tree Edith Law & Mike Terry Today s YouTube Break https://www.youtube.com/watch?v=mqqo-iog4qw Routing Events to Widgets Say I click on the CS349 button, which produces a mouse event that is

More information

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can.

Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. Who am I? Harlan Iverson. Programming enthusiast. Seeker of truth. Imperfect. I'll be wrong about some things. Please correct me if you can. P.S... I hate boring presentations. Please, engage and stay

More information

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

ANGULAR2 OVERVIEW. The Big Picture. Getting Started. Modules and Components. Declarative Template Syntax. Forms FORMS IN ANGULAR Hello Cluj. I m Alex Lakatos, a Mozilla volunteer which helps other people volunteer. I want to talk to you today about Angular forms. What s a form you ask? A form creates a cohesive,

More information

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions.

A lot of people make repeated mistakes of not calling their functions and getting errors. Make sure you're calling your functions. Handout 2 Functions, Lists, For Loops and Tuples [ ] Functions -- parameters/arguments, "calling" functions, return values, etc. Please make sure you understand this example: def square(x): return x *

More information

a Very Short Introduction to AngularJS

a Very Short Introduction to AngularJS a Very Short Introduction to AngularJS Lecture 11 CGS 3066 Fall 2016 November 8, 2016 Frameworks Advanced JavaScript programming (especially the complex handling of browser differences), can often be very

More information

Unobtrusive JavaScript (Sample Chapter)

Unobtrusive JavaScript (Sample Chapter) Unobtrusive JavaScript (Sample Chapter) Written by Christian Heilmann Version 1.0, July 2005-07-05 This document is copyright by Christian Heilmann and may not be fully or partly reproduced without consent

More information

XML. Jonathan Geisler. April 18, 2008

XML. Jonathan Geisler. April 18, 2008 April 18, 2008 What is? IS... What is? IS... Text (portable) What is? IS... Text (portable) Markup (human readable) What is? IS... Text (portable) Markup (human readable) Extensible (valuable for future)

More information

International Research Journal of Engineering and Technology (IRJET) e-issn: Volume: 05 Issue: 06 June p-issn:

International Research Journal of Engineering and Technology (IRJET) e-issn: Volume: 05 Issue: 06 June p-issn: Polymer JavaScript Shabnam Shaikh 1, Lavina Jadhav 2 1Student, Dept. of Institute of Computer Science, MET College, Maharashtra, India 2Professor, Dept. of Institute of Computer Science, MET College, Maharashtra,

More information

Keeping Front-end Development Simple with React

Keeping Front-end Development Simple with React Keeping Front-end Development Simple with React Tony Tsui @tony_tsui React KEEP IT SIMPLE simple /ˈsɪmp(ə)l/ easily understood or done https://flic.kr/p/uyhasx KEEP IT SIMPLE simple /ˈsɪmp(ə)l/ easily

More information

Frontend UI Training. Whats App :

Frontend UI Training. Whats App : Frontend UI Training Whats App : + 916 667 2961 trainer.subbu@gmail.com What Includes? 1. HTML 5 2. CSS 3 3. SASS 4. JavaScript 5. ES 6/7 6. jquery 7. Bootstrap 8. AJAX / JSON 9. Angular JS 1x 10. Node

More information

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

JavaScript Rd2. -Kyle Simpson, You Don t Know JS 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

More information

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit.

Note: This is a miniassignment and the grading is automated. If you do not submit it correctly, you will receive at most half credit. Com S 227 Fall 2017 Miniassignment 1 50 points Due Date: Monday, October 16, 11:59 pm (midnight) Late deadline (25% penalty): Tuesday, October 17, 11:59 pm General information This assignment is to be

More information

MITOCW MIT6_172_F10_lec18_300k-mp4

MITOCW MIT6_172_F10_lec18_300k-mp4 MITOCW MIT6_172_F10_lec18_300k-mp4 The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for

More information

Model-View-Whatever A COMPARISON OF JAVASCRIPT MVC/MVP/MVVM FRAMEWORKS. J. Tower

Model-View-Whatever A COMPARISON OF JAVASCRIPT MVC/MVP/MVVM FRAMEWORKS. J. Tower Model-View-Whatever A COMPARISON OF JAVASCRIPT MVC/MVP/MVVM FRAMEWORKS J. Tower Principal Sponsor http://www.skylinetechnologies.com Thank our Principal Sponsor by tweeting and following @SkylineTweets

More information

mismatch between what is maybe possible today and what is going on in many of today's IDEs.

mismatch between what is maybe possible today and what is going on in many of today's IDEs. What will happen if we do very, very small and lightweight tools instead of heavyweight, integrated big IDEs? Lecturer: Martin Lippert, VMware and Eclispe tooling expert LIPPERT: Welcome, everybody, to

More information

MEAP Edition Manning Early Access Program React Native in Action Developing ios and Android Apps with JavaScript Version 13

MEAP Edition Manning Early Access Program React Native in Action Developing ios and Android Apps with JavaScript Version 13 MEAP Edition Manning Early Access Program React Native in Action Developing ios and Android Apps with JavaScript Version 13 Copyright 2017 Manning Publications For more information on this and other Manning

More information

Patterns Of Enterprise Application Architecture

Patterns Of Enterprise Application Architecture Patterns Of Enterprise Application Architecture Lecture 11-12 - Outlines Overview of patterns Web Presentation Patterns Base Patterns Putting It All Together References Domain Logic Patterns Domain Model

More information

MITOCW watch?v=0jljzrnhwoi

MITOCW watch?v=0jljzrnhwoi MITOCW watch?v=0jljzrnhwoi The following content is provided under a Creative Commons license. Your support will help MIT OpenCourseWare continue to offer high quality educational resources for free. To

More information

AngularJS Intro Homework

AngularJS Intro Homework AngularJS Intro Homework Contents 1. Overview... 2 2. Database Requirements... 2 3. Navigation Requirements... 3 4. Styling Requirements... 4 5. Project Organization Specs (for the Routing Part of this

More information

CSC 121 Computers and Scientific Thinking

CSC 121 Computers and Scientific Thinking CSC 121 Computers and Scientific Thinking Fall 2005 HTML and Web Pages 1 HTML & Web Pages recall: a Web page is a text document that contains additional formatting information in the HyperText Markup Language

More information

CIT 590 Homework 5 HTML Resumes

CIT 590 Homework 5 HTML Resumes CIT 590 Homework 5 HTML Resumes Purposes of this assignment Reading from and writing to files Scraping information from a text file Basic HTML usage General problem specification A website is made up of

More information

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

React(.js) the Domino Way High-Performance Client for Domino. Knut Herrmann React(.js) the Domino Way High-Performance Client for Domino Knut Herrmann CollabSphere 2018 Sponsors Knut Herrmann Senior Software Architect Leonso GmbH Notes Domino developer since version 2 Web application

More information

EWD Custom Tag Development. Built-in Custom Tags for defining and manipulating Javascript

EWD Custom Tag Development. Built-in Custom Tags for defining and manipulating Javascript EWD Custom Tag Development Built-in Custom Tags for defining and manipulating Javascript Build 790 Introduction A number of very powerful custom tags have been added to EWD. Unlike many of the built-in

More information

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh

Web Programming and Design. MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Web Programming and Design MPT Junior Cycle Tutor: Tamara Demonstrators: Aaron, Marion, Hugh Plan for the next 5 weeks: Introduction to HTML tags Recap on HTML and creating our template file Introduction

More information

Tarek Elachkar, VP Customer Solutions - Jahia A real world story of Angular and Apache Unomi integration.

Tarek Elachkar, VP Customer Solutions - Jahia A real world story of Angular and Apache Unomi integration. Tarek Elachkar, VP Customer Solutions - Jahia telachkar@jahia.com A real world story of Angular and Apache Unomi integration #ApacheCon 1 QUICK INTRODUCTIONS Me, myself and I QUICK INTRODUCTIONS Our software

More information

EECS1012. Net-centric Introduction to Computing. Lecture "Putting It All Together" and a little bit of AJAX

EECS1012. Net-centric Introduction to Computing. Lecture Putting It All Together and a little bit of AJAX EECS 1012 Net-centric Introduction to Computing Lecture "Putting It All Together" and a little bit of AJAX Acknowledgements The contents of these slides may be modified and redistributed, please give appropriate

More information

The tech behind a design system that scales

The tech behind a design system that scales The tech behind a design system that scales BrazilJS 2018 Monica Lent Lead Frontend Engineer - SumUp @monicalent Where we re going today What is a design system? What we built Our challenges & solutions

More information

Intro To Javascript. Intro to Web Development

Intro To Javascript. Intro to Web Development Intro To Javascript Intro to Web Development Preamble I don't like JavaScript But with JS your feelings don't matter. Browsers don't work well with any other language so you have to write code that either:

More information

widgetjs Documentation

widgetjs Documentation widgetjs Documentation Release 1.2.3 Nicolas Vanhoren Dec 22, 2017 Contents 1 Tutorial 3 1.1 Presentation of widgetjs......................................... 3 1.2 Quickstart................................................

More information

Nagaraju Bende

Nagaraju Bende AngularJS Nagaraju Bende Blog Twitter @nbende FaceBook nbende http://angularjs.org Agenda Introduction to AngularJS Pre-Requisites Why AngularJS Only Getting Started MV* pattern of AngularJS Directives,

More information

WEBASSETS & DUKPY FREE YOURSELF FROM NODEJS. Alessandro amol

WEBASSETS & DUKPY FREE YOURSELF FROM NODEJS. Alessandro amol WEBASSETS & DUKPY FREE YOURSELF FROM NODEJS Alessandro Molina @ amol amol@turbogears.org Why? NodeJS has a rich toolkit, but using it has some serious drawbacks. People really don t know there are very

More information

Brunch Documentation. Release Brunch team

Brunch Documentation. Release Brunch team Brunch Documentation Release 1.2.2 Brunch team June 22, 2012 CONTENTS i ii Contents: CONTENTS 1 2 CONTENTS CHAPTER ONE FAQ 1.1 I want to start new project with Brunch. What s the workflow? Create new

More information

Quick.JS Documentation

Quick.JS Documentation Quick.JS Documentation Release v0.6.1-beta Michael Krause Jul 22, 2017 Contents 1 Installing and Setting Up 1 1.1 Installation................................................ 1 1.2 Setup...................................................

More information

COMP 2406: Fundamentals of Web Applications. Fall 2013 Mid-Term Exam Solutions

COMP 2406: Fundamentals of Web Applications. Fall 2013 Mid-Term Exam Solutions COMP 2406: Fundamentals of Web Applications Fall 2013 Mid-Term Exam Solutions 1. ( false ) HTTP cookies are only sent to a web server when explicitly requested. 2. ( false ) Cookies are normally parsed

More information