SlideShare una empresa de Scribd logo
1 de 9
Descargar para leer sin conexión
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)

Más contenido relacionado

La actualidad más candente

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 AngularJSArmin Vieweg
 
React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈React.js触ってみた 吉澤和香奈
React.js触ってみた 吉澤和香奈Wakana Yoshizawa
 
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 ComponentsAndrew 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-practicesHenry 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 BasicsRavi 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 JSSimon Guest
 
Introduction to AJAX In WordPress
Introduction to AJAX In WordPressIntroduction to AJAX In WordPress
Introduction to AJAX In WordPressCaldera Labs
 
AngularJS Beginners Workshop
AngularJS Beginners WorkshopAngularJS Beginners Workshop
AngularJS Beginners WorkshopSathish VJ
 
AngularJS application architecture
AngularJS application architectureAngularJS application architecture
AngularJS application architectureGabriele Falace
 
Javascript first-class citizenery
Javascript first-class citizeneryJavascript first-class citizenery
Javascript first-class citizenerytoddbr
 
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 - IntroductionSagar 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 & RoutesNick 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 2016Simon Sturmer
 

La actualidad más candente (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
 

Destacado

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
 
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 comparison500Tech
 
React vs angular
React vs angularReact vs angular
React vs angular500Tech
 
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, AngularAmy 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 ReactJSSlashMobility.com
 
ReactJS or Angular
ReactJS or AngularReactJS or Angular
ReactJS or Angularboyney123
 
AngularJS + React
AngularJS + ReactAngularJS + React
AngularJS + Reactjustvamp
 
Thinking in Components
Thinking in ComponentsThinking in Components
Thinking in ComponentsAnton 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 UILohith 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 frameworkGiovanni Buffa
 
Springboot and camel
Springboot and camelSpringboot and camel
Springboot and camelDeepak 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 applicationsLuciano 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
 

Destacado (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 a 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 $scopeBrajesh Yadav
 
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
 
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 jscodeandyou forums
 
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 KarmaExoLeaders.com
 
Client-side Rendering with AngularJS
Client-side Rendering with AngularJSClient-side Rendering with AngularJS
Client-side Rendering with AngularJSDavid Lapsley
 
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 StudiosLearnimtactics
 
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-2014Dariusz Kalbarczyk
 
Angular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersAngular1x and Angular 2 for Beginners
Angular1x and Angular 2 for BeginnersOswald Campesato
 
Angular js - 4developers 12 kwietnia 2013
Angular js - 4developers 12 kwietnia 2013Angular js - 4developers 12 kwietnia 2013
Angular js - 4developers 12 kwietnia 2013Marcin 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 AngularJSbuttyx
 
Angular.js Primer in Aalto University
Angular.js Primer in Aalto UniversityAngular.js Primer in Aalto University
Angular.js Primer in Aalto UniversitySC5.io
 
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 DevelopersCaldera Labs
 
Angular directive filter and routing
Angular directive filter and routingAngular directive filter and routing
Angular directive filter and routingjagriti srivastava
 
Practical AngularJS
Practical AngularJSPractical AngularJS
Practical AngularJSWei 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 ApplicationAndrew 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 platformsAyush Sharma
 

Similar a 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
 
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.
 
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
 
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
 

Más de Keyup

Unity
UnityUnity
UnityKeyup
 
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
WinJSKeyup
 
Redux+React
Redux+ReactRedux+React
Redux+ReactKeyup
 
Garbage Collection in Java
Garbage Collection in JavaGarbage Collection in Java
Garbage Collection in JavaKeyup
 
CSS flexbox
CSS flexboxCSS flexbox
CSS flexboxKeyup
 
Magento 2
Magento 2Magento 2
Magento 2Keyup
 
Silex
SilexSilex
SilexKeyup
 
Ruby on rails
Ruby on railsRuby on rails
Ruby on railsKeyup
 
HHVM & Hack
HHVM & HackHHVM & Hack
HHVM & HackKeyup
 
Icinga2
Icinga2Icinga2
Icinga2Keyup
 
O auth2
O auth2O auth2
O auth2Keyup
 
Úvod do bezpečnosti na webu
Úvod do bezpečnosti na webuÚvod do bezpečnosti na webu
Úvod do bezpečnosti na webuKeyup
 
CoffeeScript
CoffeeScriptCoffeeScript
CoffeeScriptKeyup
 
Easymock
EasymockEasymock
EasymockKeyup
 
CSS 3
CSS 3CSS 3
CSS 3Keyup
 
Contract in Java
Contract in JavaContract in Java
Contract in JavaKeyup
 
Jenkins
JenkinsJenkins
JenkinsKeyup
 
JLint
JLintJLint
JLintKeyup
 
Optimalizace rychlosti stránek
Optimalizace rychlosti stránekOptimalizace rychlosti stránek
Optimalizace rychlosti stránekKeyup
 

Más de 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
 

Último

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...OnePlan Solutions
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....ShaimaaMohamedGalal
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsJhone kinadey
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfkalichargn70th171
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 

Último (20)

Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
Tech Tuesday-Harness the Power of Effective Resource Planning with OnePlan’s ...
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Clustering techniques data mining book ....
Clustering techniques data mining book ....Clustering techniques data mining book ....
Clustering techniques data mining book ....
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
Right Money Management App For Your Financial Goals
Right Money Management App For Your Financial GoalsRight Money Management App For Your Financial Goals
Right Money Management App For Your Financial Goals
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdfThe Ultimate Test Automation Guide_ Best Practices and Tips.pdf
The Ultimate Test Automation Guide_ Best Practices and Tips.pdf
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 

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)