SlideShare a Scribd company logo
AngularJS vs. 
Facebook React 
David Pohan a Standa Jaša
Today’s Agenda 
1. Obecně Angular vs React 
2. Hello World 
3. Nahrání partialu stránky 
4. Todo aplikace 
5. Literatura a bitka
Motivace 
“Miško Hevery (autor Angularu) se vsadil o $10k, že 
přepíše 
DoubleClick z 19 tis. loc v GWT 
na 1700 loc v angularu za 14 dní.” 
(Nakonec to trvalo tři týdny.)
Angular vs React (obecně) 
● V Googlu ~ 1200 
aplikací 
● HTML tagy 
● Testování ~ docs 
● Two-way 
databinding 
● AngularDart 
● Sublime + Idea OK 
● JSX skript 
● Virtuální dom -> 
update pomocí diffu 
● One-way reactive 
data flow
Hello World 
<html ng-app> 
<head><script src=”angular.js” 
></script> 
</head><body> 
<input ng-model=”name” 
placeholder=”your name”> 
<h1>Hello {{name}}</h1> 
</body></html> 
<script type=”text/jsx”> 
var HelloMessage = React.createClass({ 
render: function() { 
return <div>Hello {this.props.name} 
</div>; 
} 
}); 
React.render(<HelloMessage name=" 
John" />, mountNode); 
</script>
Nahrání partialu - routing v Angularu 
// partial.html------------------------------- 
<div>param: {{params.bookId}}</div> 
// index.html-------------------------------- 
<div ng-controller=”MainController”> 
<a href=”Book/Gatsby”>Gatsby</a> 
<div ng-view></div> 
</div> 
// script.js----------------------------------- 
angular.module(‘ngRouteExample’, 
[‘ngRoute’]) 
.controller(‘MainController’, function 
($scope, $route) { 
$scope.$route = $route; 
}) 
.controller(‘BookController’, function 
($scope, $routeParams) { 
$scope.params = $routeParams;}) 
.config(function($routeProvider) { 
$routeProvider.when(‘/Book/:bookId’, 
{ templateUrl: ‘partial.html’, 
controller: ‘BookController’});
ToDo aplikace 
<div ng-controller=”TodoController”> 
<ul><li ng-repeat=”todo in todos”> 
{{todo}}</li></ul> 
</div> 
<script>angular.module(‘todoApp’, []) 
.controller(‘TodoController’, [‘$scope’, 
function ($scope) { 
$scope.todos = [‘todo1’, ‘todo2’, …]; 
}]);</script> 
<script type=”text/jsx”> 
var TodoList = React.createClass({ 
render: function() { 
var createItem = function(itemText) { 
return <li>{itemText}</li>; 
}; 
return <ul>{this.props.items.map(createItem)}</ul>; 
} 
}); 
var TodoApp = React.createClass({ 
getInitialState: function() { 
return {items: [], text: ''}; 
}, 
onChange: function(e) { 
this.setState({text: e.target.value}); 
}, 
handleSubmit: function(e) { 
e.preventDefault(); 
var nextItems = this.state.items.concat([this.state.text]);
Bonus pro Viktora (a zbytek hate party) 
angular.noop 
- function in module ng 
A function that performs no 
operations. This function can be 
useful when writing code in the 
functional style. 
function foo(callback) { 
var result = calculateResult(); 
(callback || angular.noop)(result); 
} 
WTF?
Literatúra 
● https://www.youtube.com/watch? 
v=tnXO-i7944M 
(Angular in 20 mins) 
● https://www.youtube.com/watch? 
v=M-MuOU3My-Y 
(Vojta Jína v Liberci) 
● http://facebook.github. 
io/react/docs/tutorial.html 
(úvodní tutorial) 
● http://facebook.github. 
io/react/docs/thinking-in-react. 
html 
(filosofie Reactu) 
● http://facebook.github. 
io/flux/docs/overview.html 
(Flux architekura)

More Related Content

What's hot

Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
Armin Vieweg
 
React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈
Wakana Yoshizawa
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
Jussi Pohjolainen
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web Components
Andrew Rota
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
Gary Arora
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
Henry Tao
 
AngularJS Deep Dives (NYC GDG Apr 2013)
AngularJS Deep Dives (NYC GDG Apr 2013)AngularJS Deep Dives (NYC GDG Apr 2013)
AngularJS Deep Dives (NYC GDG Apr 2013)
Nitya Narasimhan
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
Ravi Mone
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
Simon Guest
 
Introduction to AJAX In WordPress
Introduction to AJAX In WordPressIntroduction to AJAX In WordPress
Introduction to AJAX In WordPress
Caldera Labs
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
Sathish VJ
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
Gabriele Falace
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
toddbr
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slidessamhelman
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
Sakthi Bro
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
Sagar Acharya
 
JS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & RoutesJS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & Routes
Nick Dreckshage
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
Elad Hirsch
 
React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016
Simon Sturmer
 

What's hot (20)

Gettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJSGettings started with the superheroic JavaScript library AngularJS
Gettings started with the superheroic JavaScript library AngularJS
 
React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
The Complementarity of React and Web Components
The Complementarity of React and Web ComponentsThe Complementarity of React and Web Components
The Complementarity of React and Web Components
 
AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)AngularJS - What is it & Why is it awesome ? (with demos)
AngularJS - What is it & Why is it awesome ? (with demos)
 
AngularJS best-practices
AngularJS best-practicesAngularJS best-practices
AngularJS best-practices
 
AngularJS Deep Dives (NYC GDG Apr 2013)
AngularJS Deep Dives (NYC GDG Apr 2013)AngularJS Deep Dives (NYC GDG Apr 2013)
AngularJS Deep Dives (NYC GDG Apr 2013)
 
AngularJS Basics
AngularJS BasicsAngularJS Basics
AngularJS Basics
 
Introduction to Angularjs
Introduction to AngularjsIntroduction to Angularjs
Introduction to Angularjs
 
Advanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JSAdvanced Tips & Tricks for using Angular JS
Advanced Tips & Tricks for using Angular JS
 
Introduction to AJAX In WordPress
Introduction to AJAX In WordPressIntroduction to AJAX In WordPress
Introduction to AJAX In WordPress
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners Workshop
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architecture
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenery
 
Angular js tutorial slides
Angular js tutorial slidesAngular js tutorial slides
Angular js tutorial slides
 
Why angular js Framework
Why angular js Framework Why angular js Framework
Why angular js Framework
 
Angular JS - Introduction
Angular JS - IntroductionAngular JS - Introduction
Angular JS - Introduction
 
JS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & RoutesJS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & Routes
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016React Fundamentals - Jakarta JS, Apr 2016
React Fundamentals - Jakarta JS, Apr 2016
 

Viewers also liked

Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?
TechMagic
 
Angular 2 vs React
Angular 2 vs ReactAngular 2 vs React
Angular 2 vs React
Iran Reyes Fleitas
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
500Tech
 
React Vs AnagularJS
React Vs AnagularJSReact Vs AnagularJS
React Vs AnagularJS
deepakpatil84
 
React vs angular
React vs angularReact vs angular
React vs angular
500Tech
 
Web development at Live: Frontend Software Intro + Trade-offs, React, Angular
Web development at Live: Frontend Software Intro + Trade-offs, React, AngularWeb development at Live: Frontend Software Intro + Trade-offs, React, Angular
Web development at Live: Frontend Software Intro + Trade-offs, React, Angular
Amy Hua
 
React vs angular (mobile first battle)
React vs angular (mobile first battle)React vs angular (mobile first battle)
React vs angular (mobile first battle)
Michael Haberman
 
El combate del siglo: AngularJS vs ReactJS
El combate del siglo: AngularJS vs ReactJSEl combate del siglo: AngularJS vs ReactJS
El combate del siglo: AngularJS vs ReactJS
SlashMobility.com
 
ReactJS or Angular
ReactJS or AngularReactJS or Angular
ReactJS or Angular
boyney123
 
AngularJS + React
AngularJS + ReactAngularJS + React
AngularJS + React
justvamp
 
Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in Components
Anton Ivanov
 
Online Spreadsheet for your Web Applications using Kendo UI
Online Spreadsheet for your Web Applications using Kendo UIOnline Spreadsheet for your Web Applications using Kendo UI
Online Spreadsheet for your Web Applications using Kendo UI
Lohith Goudagere Nagaraj
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
Lohith Goudagere Nagaraj
 
Angular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un frameworkAngular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un framework
Giovanni Buffa
 
Springboot and camel
Springboot and camelSpringboot and camel
Springboot and camel
Deepak Kumar
 
Back to the future: Isomorphic javascript applications
Back to the future:  Isomorphic javascript applicationsBack to the future:  Isomorphic javascript applications
Back to the future: Isomorphic javascript applications
Luciano Colosio
 
前端技術大亂鬥
前端技術大亂鬥前端技術大亂鬥
前端技術大亂鬥
Casear Chu
 
Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React
Robert DeLuca
 
Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)
jskvara
 
Succeeding with Agile
Succeeding with AgileSucceeding with Agile
Succeeding with AgileMike Cohn
 

Viewers also liked (20)

Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?Angular 2 vs React. What to chose in 2017?
Angular 2 vs React. What to chose in 2017?
 
Angular 2 vs React
Angular 2 vs ReactAngular 2 vs React
Angular 2 vs React
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
 
React Vs AnagularJS
React Vs AnagularJSReact Vs AnagularJS
React Vs AnagularJS
 
React vs angular
React vs angularReact vs angular
React vs angular
 
Web development at Live: Frontend Software Intro + Trade-offs, React, Angular
Web development at Live: Frontend Software Intro + Trade-offs, React, AngularWeb development at Live: Frontend Software Intro + Trade-offs, React, Angular
Web development at Live: Frontend Software Intro + Trade-offs, React, Angular
 
React vs angular (mobile first battle)
React vs angular (mobile first battle)React vs angular (mobile first battle)
React vs angular (mobile first battle)
 
El combate del siglo: AngularJS vs ReactJS
El combate del siglo: AngularJS vs ReactJSEl combate del siglo: AngularJS vs ReactJS
El combate del siglo: AngularJS vs ReactJS
 
ReactJS or Angular
ReactJS or AngularReactJS or Angular
ReactJS or Angular
 
AngularJS + React
AngularJS + ReactAngularJS + React
AngularJS + React
 
Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in Components
 
Online Spreadsheet for your Web Applications using Kendo UI
Online Spreadsheet for your Web Applications using Kendo UIOnline Spreadsheet for your Web Applications using Kendo UI
Online Spreadsheet for your Web Applications using Kendo UI
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
Angular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un frameworkAngular js o React? Spunti e idee per la scelta di un framework
Angular js o React? Spunti e idee per la scelta di un framework
 
Springboot and camel
Springboot and camelSpringboot and camel
Springboot and camel
 
Back to the future: Isomorphic javascript applications
Back to the future:  Isomorphic javascript applicationsBack to the future:  Isomorphic javascript applications
Back to the future: Isomorphic javascript applications
 
前端技術大亂鬥
前端技術大亂鬥前端技術大亂鬥
前端技術大亂鬥
 
Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React Crossing platforms with JavaScript & React
Crossing platforms with JavaScript & React
 
Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)Toolkit of modern web development (DevFest Košice 7.5.2016)
Toolkit of modern web development (DevFest Košice 7.5.2016)
 
Succeeding with Agile
Succeeding with AgileSucceeding with Agile
Succeeding with Agile
 

Similar to Angular js vs. Facebook react

Understanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scopeUnderstanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scope
Brajesh Yadav
 
Different way to share data between controllers in angular js
Different way to share data between controllers in angular jsDifferent way to share data between controllers in angular js
Different way to share data between controllers in angular js
codeandyou forums
 
Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.
Amar Shukla
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with Karma
ExoLeaders.com
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJS
David Lapsley
 
Dive into AngularJS and directives
Dive into AngularJS and directivesDive into AngularJS and directives
Dive into AngularJS and directives
Tricode (part of Dept)
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosAngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
Learnimtactics
 
MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)
Chris Clarke
 
AngularJS Mobile Warsaw 20-10-2014
AngularJS Mobile Warsaw 20-10-2014AngularJS Mobile Warsaw 20-10-2014
AngularJS Mobile Warsaw 20-10-2014
Dariusz Kalbarczyk
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
Oswald Campesato
 
Angular js - 4developers 12 kwietnia 2013
Angular js - 4developers 12 kwietnia 2013Angular js - 4developers 12 kwietnia 2013
Angular js - 4developers 12 kwietnia 2013
Marcin Wosinek
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJS
buttyx
 
Angular.js Primer in Aalto University
Angular.js Primer in Aalto UniversityAngular.js Primer in Aalto University
Angular.js Primer in Aalto University
SC5.io
 
Hello angular
Hello angularHello angular
Hello angular
Manfred Wuits
 
Dependency Management with RequireJS
Dependency Management with RequireJSDependency Management with RequireJS
Dependency Management with RequireJSAaronius
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
Caldera Labs
 
Angular directive filter and routing
Angular directive filter and routingAngular directive filter and routing
Angular directive filter and routing
jagriti srivastava
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
Wei Ru
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
Andrew Rota
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platforms
Ayush Sharma
 

Similar to Angular js vs. Facebook react (20)

Understanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scopeUnderstanding angular js $rootscope and $scope
Understanding angular js $rootscope and $scope
 
Different way to share data between controllers in angular js
Different way to share data between controllers in angular jsDifferent way to share data between controllers in angular js
Different way to share data between controllers in angular js
 
Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.Sharing Data between controllers in different ways.
Sharing Data between controllers in different ways.
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with Karma
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJS
 
Dive into AngularJS and directives
Dive into AngularJS and directivesDive into AngularJS and directives
Dive into AngularJS and directives
 
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle StudiosAngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
AngularJs Superheroic JavaScript MVW Framework Services by Miracle Studios
 
MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)MEAN - Notes from the field (Full-Stack Development with Javascript)
MEAN - Notes from the field (Full-Stack Development with Javascript)
 
AngularJS Mobile Warsaw 20-10-2014
AngularJS Mobile Warsaw 20-10-2014AngularJS Mobile Warsaw 20-10-2014
AngularJS Mobile Warsaw 20-10-2014
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for Beginners
 
Angular js - 4developers 12 kwietnia 2013
Angular js - 4developers 12 kwietnia 2013Angular js - 4developers 12 kwietnia 2013
Angular js - 4developers 12 kwietnia 2013
 
Opencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJSOpencast Admin UI - Introduction to developing using AngularJS
Opencast Admin UI - Introduction to developing using AngularJS
 
Angular.js Primer in Aalto University
Angular.js Primer in Aalto UniversityAngular.js Primer in Aalto University
Angular.js Primer in Aalto University
 
Hello angular
Hello angularHello angular
Hello angular
 
Dependency Management with RequireJS
Dependency Management with RequireJSDependency Management with RequireJS
Dependency Management with RequireJS
 
Introduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress DevelopersIntroduction to AngularJS For WordPress Developers
Introduction to AngularJS For WordPress Developers
 
Angular directive filter and routing
Angular directive filter and routingAngular directive filter and routing
Angular directive filter and routing
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJS
 
Integrating React.js Into a PHP Application
Integrating React.js Into a PHP ApplicationIntegrating React.js Into a PHP Application
Integrating React.js Into a PHP Application
 
Flask and Angular: An approach to build robust platforms
Flask and Angular:  An approach to build robust platformsFlask and Angular:  An approach to build robust platforms
Flask and Angular: An approach to build robust platforms
 

More from Keyup

Unity
UnityUnity
Unity
Keyup
 
Google AdWords a Google AdSense vs. AdBlock.
Google AdWords a Google AdSense vs. AdBlock.Google AdWords a Google AdSense vs. AdBlock.
Google AdWords a Google AdSense vs. AdBlock.
Keyup
 
WinJS
WinJSWinJS
WinJS
Keyup
 
Redux+React
Redux+ReactRedux+React
Redux+React
Keyup
 
Garbage Collection in Java
Garbage Collection in JavaGarbage Collection in Java
Garbage Collection in Java
Keyup
 
CSS flexbox
CSS flexboxCSS flexbox
CSS flexbox
Keyup
 
Magento 2
Magento 2Magento 2
Magento 2
Keyup
 
Silex
SilexSilex
Silex
Keyup
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
Keyup
 
HHVM & Hack
HHVM & HackHHVM & Hack
HHVM & Hack
Keyup
 
Icinga2
Icinga2Icinga2
Icinga2
Keyup
 
O auth2
O auth2O auth2
O auth2
Keyup
 
Úvod do bezpečnosti na webu
Úvod do bezpečnosti na webuÚvod do bezpečnosti na webu
Úvod do bezpečnosti na webu
Keyup
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
Keyup
 
Easymock
EasymockEasymock
Easymock
Keyup
 
CSS 3
CSS 3CSS 3
CSS 3
Keyup
 
Contract in Java
Contract in JavaContract in Java
Contract in Java
Keyup
 
Jenkins
JenkinsJenkins
Jenkins
Keyup
 
JLint
JLintJLint
JLint
Keyup
 
Optimalizace rychlosti stránek
Optimalizace rychlosti stránekOptimalizace rychlosti stránek
Optimalizace rychlosti stránek
Keyup
 

More from Keyup (20)

Unity
UnityUnity
Unity
 
Google AdWords a Google AdSense vs. AdBlock.
Google AdWords a Google AdSense vs. AdBlock.Google AdWords a Google AdSense vs. AdBlock.
Google AdWords a Google AdSense vs. AdBlock.
 
WinJS
WinJSWinJS
WinJS
 
Redux+React
Redux+ReactRedux+React
Redux+React
 
Garbage Collection in Java
Garbage Collection in JavaGarbage Collection in Java
Garbage Collection in Java
 
CSS flexbox
CSS flexboxCSS flexbox
CSS flexbox
 
Magento 2
Magento 2Magento 2
Magento 2
 
Silex
SilexSilex
Silex
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on rails
 
HHVM & Hack
HHVM & HackHHVM & Hack
HHVM & Hack
 
Icinga2
Icinga2Icinga2
Icinga2
 
O auth2
O auth2O auth2
O auth2
 
Úvod do bezpečnosti na webu
Úvod do bezpečnosti na webuÚvod do bezpečnosti na webu
Úvod do bezpečnosti na webu
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScript
 
Easymock
EasymockEasymock
Easymock
 
CSS 3
CSS 3CSS 3
CSS 3
 
Contract in Java
Contract in JavaContract in Java
Contract in Java
 
Jenkins
JenkinsJenkins
Jenkins
 
JLint
JLintJLint
JLint
 
Optimalizace rychlosti stránek
Optimalizace rychlosti stránekOptimalizace rychlosti stránek
Optimalizace rychlosti stránek
 

Recently uploaded

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
Paco van Beckhoven
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Globus
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
Adele Miller
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
rickgrimesss22
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
IES VE
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
abdulrafaychaudhry
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
Globus
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
Cyanic lab
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
Globus
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
Juraj Vysvader
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Natan Silnitsky
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
e20449
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
Srikant77
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Globus
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Globus
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
Google
 

Recently uploaded (20)

Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024Cracking the code review at SpringIO 2024
Cracking the code review at SpringIO 2024
 
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisProviding Globus Services to Users of JASMIN for Environmental Data Analysis
Providing Globus Services to Users of JASMIN for Environmental Data Analysis
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
May Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdfMay Marketo Masterclass, London MUG May 22 2024.pdf
May Marketo Masterclass, London MUG May 22 2024.pdf
 
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxTop Features to Include in Your Winzo Clone App for Business Growth (4).pptx
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptx
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Using IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New ZealandUsing IESVE for Room Loads Analysis - Australia & New Zealand
Using IESVE for Room Loads Analysis - Australia & New Zealand
 
Lecture 1 Introduction to games development
Lecture 1 Introduction to games developmentLecture 1 Introduction to games development
Lecture 1 Introduction to games development
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
Enhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdfEnhancing Research Orchestration Capabilities at ORNL.pdf
Enhancing Research Orchestration Capabilities at ORNL.pdf
 
Cyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdfCyaniclab : Software Development Agency Portfolio.pdf
Cyaniclab : Software Development Agency Portfolio.pdf
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Understanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSageUnderstanding Globus Data Transfers with NetSage
Understanding Globus Data Transfers with NetSage
 
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...
 
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.ILBeyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
Beyond Event Sourcing - Embracing CRUD for Wix Platform - Java.IL
 
Graphic Design Crash Course for beginners
Graphic Design Crash Course for beginnersGraphic Design Crash Course for beginners
Graphic Design Crash Course for beginners
 
RISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent EnterpriseRISE with SAP and Journey to the Intelligent Enterprise
RISE with SAP and Journey to the Intelligent Enterprise
 
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...
 
Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...Developing Distributed High-performance Computing Capabilities of an Open Sci...
Developing Distributed High-performance Computing Capabilities of an Open Sci...
 
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing SuiteAI Pilot Review: The World’s First Virtual Assistant Marketing Suite
AI Pilot Review: The World’s First Virtual Assistant Marketing Suite
 

Angular js vs. Facebook react

  • 1. AngularJS vs. Facebook React David Pohan a Standa Jaša
  • 2. Today’s Agenda 1. Obecně Angular vs React 2. Hello World 3. Nahrání partialu stránky 4. Todo aplikace 5. Literatura a bitka
  • 3. Motivace “Miško Hevery (autor Angularu) se vsadil o $10k, že přepíše DoubleClick z 19 tis. loc v GWT na 1700 loc v angularu za 14 dní.” (Nakonec to trvalo tři týdny.)
  • 4. Angular vs React (obecně) ● V Googlu ~ 1200 aplikací ● HTML tagy ● Testování ~ docs ● Two-way databinding ● AngularDart ● Sublime + Idea OK ● JSX skript ● Virtuální dom -> update pomocí diffu ● One-way reactive data flow
  • 5. Hello World <html ng-app> <head><script src=”angular.js” ></script> </head><body> <input ng-model=”name” placeholder=”your name”> <h1>Hello {{name}}</h1> </body></html> <script type=”text/jsx”> var HelloMessage = React.createClass({ render: function() { return <div>Hello {this.props.name} </div>; } }); React.render(<HelloMessage name=" John" />, mountNode); </script>
  • 6. Nahrání partialu - routing v Angularu // partial.html------------------------------- <div>param: {{params.bookId}}</div> // index.html-------------------------------- <div ng-controller=”MainController”> <a href=”Book/Gatsby”>Gatsby</a> <div ng-view></div> </div> // script.js----------------------------------- angular.module(‘ngRouteExample’, [‘ngRoute’]) .controller(‘MainController’, function ($scope, $route) { $scope.$route = $route; }) .controller(‘BookController’, function ($scope, $routeParams) { $scope.params = $routeParams;}) .config(function($routeProvider) { $routeProvider.when(‘/Book/:bookId’, { templateUrl: ‘partial.html’, controller: ‘BookController’});
  • 7. ToDo aplikace <div ng-controller=”TodoController”> <ul><li ng-repeat=”todo in todos”> {{todo}}</li></ul> </div> <script>angular.module(‘todoApp’, []) .controller(‘TodoController’, [‘$scope’, function ($scope) { $scope.todos = [‘todo1’, ‘todo2’, …]; }]);</script> <script type=”text/jsx”> var TodoList = React.createClass({ render: function() { var createItem = function(itemText) { return <li>{itemText}</li>; }; return <ul>{this.props.items.map(createItem)}</ul>; } }); var TodoApp = React.createClass({ getInitialState: function() { return {items: [], text: ''}; }, onChange: function(e) { this.setState({text: e.target.value}); }, handleSubmit: function(e) { e.preventDefault(); var nextItems = this.state.items.concat([this.state.text]);
  • 8. Bonus pro Viktora (a zbytek hate party) angular.noop - function in module ng A function that performs no operations. This function can be useful when writing code in the functional style. function foo(callback) { var result = calculateResult(); (callback || angular.noop)(result); } WTF?
  • 9. Literatúra ● https://www.youtube.com/watch? v=tnXO-i7944M (Angular in 20 mins) ● https://www.youtube.com/watch? v=M-MuOU3My-Y (Vojta Jína v Liberci) ● http://facebook.github. io/react/docs/tutorial.html (úvodní tutorial) ● http://facebook.github. io/react/docs/thinking-in-react. html (filosofie Reactu) ● http://facebook.github. io/flux/docs/overview.html (Flux architekura)