SlideShare una empresa de Scribd logo
1 de 64
Descargar para leer sin conexión
#Devoxx @deepu105 | @mraible#Devoxx17
By Deepu K Sasidharan, XebiaLabs and Matt Raible, Okta
November 9, 2017
About Deepu
Javascript Evangelist
Co-lead
Senior product developer
Robotics & Astronomy enthusiast
https://www.packtpub.com/application-development/full-stack-development-jhipster
#Devoxx @deepu105 | @mraible#Devoxx17
About Matt
Hick from the Sticks
Open Source Connoisseur
Web Framework Aficionado
Developer Advocate
VW Buses and Vans
Java Hipster
#Devoxx @deepu105 | @mraible#Devoxx17
What about you?
How many folks are Java developers?
How many are web developers?
Who likes JavaScript? Who likes TypeScript better?
Are you a fan of:
Angular
React
Vue.js
#Devoxx @deepu105 | @mraible#Devoxx17
Today’s Agenda
The History of Angular and React
Learning Angular and React
Our favorite and not-so-favorite features
Framework Fight!
Lies, damned lies, and statistics
Our Recommendations
#Devoxx @deepu105 | @mraible#Devoxx17
The Rise of MV* Frameworks
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
How many of you have experienced
“Yet Another Framework Syndrome”
#Devoxx @deepu105 | @mraible#Devoxx17
The History of Angular
Started as AngularJS in 2009 by Miško Hevery
GWT == 3 developers, 6 months
AngularJS == 1 developer, 3 weeks
Announced Angular 2, September 2014
2.0 Released in September 2016
5.0 Released November 1, 2017
#Devoxx @deepu105 | @mraible#Devoxx17
https://angular.io/guide/quickstart
The History of React
React was created by Jordan Walke in 2011 &
Open sourced in May 2013
Inspired by XHP, an HTML components
framework for PHP
Within one year, had large sites
Khan Academy, New York Times, Airbnb
+ Facebook and Instagram
16.0 released on September 26, 2017
#Devoxx @deepu105 | @mraible#Devoxx17
https://codepen.io/gaearon/pen/ZpvBNJ
https://vimeo.com/213710634
#Devoxx @deepu105 | @mraible#Devoxx17
Getting Started Comparison
#Devoxx @deepu105 | @mraible#Devoxx17
Angular CLI vs Create React App
Minimal dependencies
ES6 by default
Yarn by default
325 Lines of code (not counting
README)
PWA Score: 55/82
ng new app-name --minimal
TypeScript by default
npm by default
225 Lines of code
PWA Score: 18/36 (dev/prod)
ng generate component | service
#Devoxx @deepu105 | @mraible#Devoxx17
Your Favorite Angular Features?
#Devoxx @deepu105 | @mraible#Devoxx17
Matt’s Favorite Angular Features
Dependency Injection
Angular CLI
Resembles Java MVC Frameworks
Two-way Binding
Components, Services, and Directives
TypeScript
Ionic Framework
Webpack compiling TypeScript
Searchability: Angular vs AngularJS
Release Candidates in 2016
Testing Infrastructure
#Devoxx @deepu105 | @mraible#Devoxx17
Your Favorite React Features?
#Devoxx @deepu105 | @mraible#Devoxx17
Deepu’s Favorite React Features
One way binding
Virtual DOM
JSX
Flexibility
Component based composability
Smart & Dumb components
React Native
One way binding
Dependency fatigue
JSX
Too many options for state management
No official style guide
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
Framework vs Library
Angular = Full fledged MVVM framework
React = View rendering library
Angular = React + Redux + React Router … (React & Friends)
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
Let’s get the similarities out of the way
Both Angular and React are component-based
Both are client side MVVM frameworks for building SPAs
Both support server-side rendering
Both supports native mobile app development
Both requires a build tool like webpack for optimal usage
Both have comparable performance
Both are backed by big companies (Google & Facebook)
Both are MIT licenced (Finally!)
#Devoxx @deepu105 | @mraible#Devoxx17
It’s Time to Vote!
#Devoxx @deepu105 | @mraible#Devoxx17
Technical Differences?
#Devoxx @deepu105 | @mraible#Devoxx17
Follows EL in HTML approach
Uses regular DOM
Typescript based (Possible to write in plain JS
but not recommended)
Supports dependency injection
Supports Lazy loading & AOT
State management by default supports one
way and 2 way binding
Technical Differences
Follows HTML in JS (JSX) approach
Uses Virtual DOM
ES6 + JSX based (Possible to use Typescript
+ TSX as well)
Does not have the concept
Lazy loading is possible, No AOT
State management is only one way binding
and libraries like Redux or MobX is used more
often for state management
#Devoxx @deepu105 | @mraible#Devoxx17
Philosophical Differences?
#Devoxx @deepu105 | @mraible#Devoxx17
An opinionated framework
Promotes object-oriented approach
Offers everything required to build an SPA
Differing Philosophies
A view rendering library
Promotes functional approach
Requires use of a many 3rd party libraries like
Redux, React router etc.
#Devoxx @deepu105 | @mraible#Devoxx17
Usability?
#Devoxx @deepu105 | @mraible#Devoxx17
Less flexible
Often results in more code for same task
compared to React
Usability
Very flexible
Often results in less code for same task
compared to Angular
#Devoxx @deepu105 | @mraible#Devoxx17
Which one is easier to learn?
#Devoxx @deepu105 | @mraible#Devoxx17
Learning
Angular is a framework with lot of concepts
and hence is complex to learn causing JS
fatigue
Opinionated and provides guidance for most
use cases
React itself is easier to learn but since it is
only a view renderer it would require many
other libraries for state management, routing
etc ending up in same fatigue
Limited guidance. Requires one to choose a
stack and decide on 3rd party libraries and
approaches to follow
#Devoxx @deepu105 | @mraible#Devoxx17
Which one has a better ecosystem?
#Devoxx @deepu105 | @mraible#Devoxx17
Ecosystem
Ecosystem is not that huge
Easier to set up for a full fledged application
out of the box
Limited choice when it comes to alternative
approaches for example state management
Huge ecosystem
Difficult to set up for a full fledged application
due to above point
Lot of choices in approaches
#Devoxx @deepu105 | @mraible#Devoxx17
Best way to compare?
With <code>!
How We Did It
Generated apps with both Angular and React
Used JHipster, because we’re hip!
Gathered statistics:
Performance
Accessibility
Lines of Code
#Devoxx @deepu105 | @mraible#Devoxx17
JHipster Angular vs React
PWA Score: 91
Performance: 66
Accessibility: 100
Best Practices: 81
Lines of code: 12416 (55 TypeScript)
Number of tests: 3
PWA Score: 91
Performance: 75
Accessibility: 100
Best Practices: 81
Lines of code: 15177 (126 TypeScript files)
Number of tests: 9
#Devoxx @deepu105 | @mraible#Devoxx17
Demo Time!
#Devoxx @deepu105 | @mraible#Devoxx17
Angular vs React - Pretty Graphs
#Devoxx @deepu105 | @mraible#Devoxx17
Popularity - Google Trends
#Devoxx @deepu105 | @mraible#Devoxx17
Angular React
Popularity - Hot Frameworks
#Devoxx @deepu105 | @mraible#Devoxx17
https://hotframeworks.com/#top-frameworks
Popularity - Github stars
#Devoxx @deepu105 | @mraible#Devoxx17
http://www.timqian.com/star-history
Popularity - NPM downloads
#Devoxx @deepu105 | @mraible#Devoxx17
Usage - Libscore
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
So who wins?
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
Our Recommendation
If you have a lot of state: React
If you’re familiar with Java MVC frameworks: Angular
If you work at Facebook: React
If you work at Google: Angular
If you like structure and a helping hand: Angular
If you like flexibility: React
#Devoxx @deepu105 | @mraible#Devoxx17
Other Opinions
https://medium.com/unicorn-supplies/angular-vs-react-vs-vue-a-2017-comparison-c5c52d620176
Other Opinions
https://hackernoon.com/angular-vs-react-the-deal-breaker-7d76c04496bc
What You Learned
The History of Angular and React
Hello World in Angular and React
Our favorite and not-so-favorite features
Similarities and Differences
Lies, damned lies, and statistics
Learning is the real skill, not knowing a web framework!
#Devoxx @deepu105 | @mraible#Devoxx17
Want to learn more about JHipster?
Come to our BOF tonight!
#Devoxx @deepu105 | @mraible#Devoxx17
Questions?
JHipster Sample Apps on GitHub
github.com/hipster-labs/devoxx17-jh-angular
github.com/hipster-labs/devoxx17-jh-react
Presentation at speakerdeck.com/mraible
Contact us!
@deepu105 || deepu.js.org
@mraible || raibledesigns.com
#Devoxx @deepu105 | @mraible#Devoxx17
#Devoxx @deepu105 | @mraible#Devoxx17
The JHipster Mini-Book
Written with Asciidoctor
Quick and to the point, 130 pages
Developed a real world app:
www.21-points.com
Free Download from
infoq.com/minibooks/jhipster-4-mini-book
@jhipster_book
#Devoxx @deepu105 | @mraible#Devoxx17
Thank you!

Más contenido relacionado

La actualidad más candente

La actualidad más candente (20)

Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017Front End Development for Back End Developers - UberConf 2017
Front End Development for Back End Developers - UberConf 2017
 
JHipster React - Devoxx BE 2017
JHipster React - Devoxx BE 2017JHipster React - Devoxx BE 2017
JHipster React - Devoxx BE 2017
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
 
Front End Development for Back End Developers - Devoxx UK 2017
 Front End Development for Back End Developers - Devoxx UK 2017 Front End Development for Back End Developers - Devoxx UK 2017
Front End Development for Back End Developers - Devoxx UK 2017
 
What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017What's New in JHipsterLand - Devoxx Poland 2017
What's New in JHipsterLand - Devoxx Poland 2017
 
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
Building a PWA with Ionic, Angular, and Spring Boot - GeeCON 2017
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
 
Bootiful Development with Spring Boot and Angular - Spring I/O 2017
Bootiful Development with Spring Boot and Angular - Spring I/O 2017Bootiful Development with Spring Boot and Angular - Spring I/O 2017
Bootiful Development with Spring Boot and Angular - Spring I/O 2017
 
Building Cloud Native Progressive Web Apps with Angular and Spring Boot - Dev...
Building Cloud Native Progressive Web Apps with Angular and Spring Boot - Dev...Building Cloud Native Progressive Web Apps with Angular and Spring Boot - Dev...
Building Cloud Native Progressive Web Apps with Angular and Spring Boot - Dev...
 
CraftCamp for Students - Introduction to JHipster
CraftCamp for Students - Introduction to JHipsterCraftCamp for Students - Introduction to JHipster
CraftCamp for Students - Introduction to JHipster
 
Interoperability of components built with different frameworks
Interoperability of components built with different frameworksInteroperability of components built with different frameworks
Interoperability of components built with different frameworks
 
How we built a job board in one week with JHipster
How we built a job board in one week with JHipsterHow we built a job board in one week with JHipster
How we built a job board in one week with JHipster
 
Write Once, Run Everywhere
Write Once, Run EverywhereWrite Once, Run Everywhere
Write Once, Run Everywhere
 
Bootiful Development with Spring Boot and Vue - RWX 2018
Bootiful Development with Spring Boot and Vue - RWX 2018Bootiful Development with Spring Boot and Vue - RWX 2018
Bootiful Development with Spring Boot and Vue - RWX 2018
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
 
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Microservices for the Masses with Spring Boot and JHipster - RWX 2018Microservices for the Masses with Spring Boot and JHipster - RWX 2018
Microservices for the Masses with Spring Boot and JHipster - RWX 2018
 
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
The Ultimate Getting Started with Angular Workshop - Devoxx France 2017
 
React in production (react global summit 2021)
React in production (react global summit 2021)React in production (react global summit 2021)
React in production (react global summit 2021)
 
What I learned teaching programming to 150 beginners
What I learned teaching programming to 150 beginnersWhat I learned teaching programming to 150 beginners
What I learned teaching programming to 150 beginners
 
What's New in JHipsterLand - Devoxx US 2017
What's New in JHipsterLand - Devoxx US 2017What's New in JHipsterLand - Devoxx US 2017
What's New in JHipsterLand - Devoxx US 2017
 

Similar a Angular vs React Smackdown - Devoxx BE 2017

Similar a Angular vs React Smackdown - Devoxx BE 2017 (20)

Angular vs React - Devoxx BE 2017
Angular vs React - Devoxx BE 2017Angular vs React - Devoxx BE 2017
Angular vs React - Devoxx BE 2017
 
Devoxx France 2018 GraphQL vs Traditional REST API
Devoxx France 2018 GraphQL vs Traditional REST APIDevoxx France 2018 GraphQL vs Traditional REST API
Devoxx France 2018 GraphQL vs Traditional REST API
 
Talk EclipseSirius Con - EIP Designer - 20151203
Talk EclipseSirius Con - EIP Designer - 20151203Talk EclipseSirius Con - EIP Designer - 20151203
Talk EclipseSirius Con - EIP Designer - 20151203
 
Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018Front-end for Java developers Devoxx France 2018
Front-end for Java developers Devoxx France 2018
 
StackEngine Problem Space Demo
StackEngine Problem Space DemoStackEngine Problem Space Demo
StackEngine Problem Space Demo
 
Webinar: DevOps - Redefining your IT Strategy
Webinar: DevOps - Redefining your IT StrategyWebinar: DevOps - Redefining your IT Strategy
Webinar: DevOps - Redefining your IT Strategy
 
DevOps-Redefining your IT Strategy-28thJan15
DevOps-Redefining your IT Strategy-28thJan15DevOps-Redefining your IT Strategy-28thJan15
DevOps-Redefining your IT Strategy-28thJan15
 
DevOps & the Dark Side 10 ways to convince your team DevOps is a force for good
DevOps & the Dark Side 10 ways to convince your team DevOps is a force for goodDevOps & the Dark Side 10 ways to convince your team DevOps is a force for good
DevOps & the Dark Side 10 ways to convince your team DevOps is a force for good
 
Continuous Testing using Shippable and Docker
Continuous Testing using Shippable and DockerContinuous Testing using Shippable and Docker
Continuous Testing using Shippable and Docker
 
TechSEO Boost 2018: Research Competition
TechSEO Boost 2018: Research CompetitionTechSEO Boost 2018: Research Competition
TechSEO Boost 2018: Research Competition
 
The Art of Decomposing Monoliths - Kfir Bloch, Wix
The Art of Decomposing Monoliths - Kfir Bloch, WixThe Art of Decomposing Monoliths - Kfir Bloch, Wix
The Art of Decomposing Monoliths - Kfir Bloch, Wix
 
Frontend War: Angular vs React vs Vue
Frontend War: Angular vs React vs VueFrontend War: Angular vs React vs Vue
Frontend War: Angular vs React vs Vue
 
The art of decomposing monoliths - Kfir Bloch - Codemotion Amsterdam 2016
The art of decomposing monoliths - Kfir Bloch - Codemotion Amsterdam 2016The art of decomposing monoliths - Kfir Bloch - Codemotion Amsterdam 2016
The art of decomposing monoliths - Kfir Bloch - Codemotion Amsterdam 2016
 
The building blocks of the next web
The building blocks of the next webThe building blocks of the next web
The building blocks of the next web
 
The building blocks of the next web, from Customer Journey to UI Components. ...
The building blocks of the next web, from Customer Journey to UI Components. ...The building blocks of the next web, from Customer Journey to UI Components. ...
The building blocks of the next web, from Customer Journey to UI Components. ...
 
Scala from the Trenches - Java One 2016
Scala from the Trenches - Java One 2016Scala from the Trenches - Java One 2016
Scala from the Trenches - Java One 2016
 
DEVNET-1125 Partner Case Study - “Project Hybrid Engineer”
DEVNET-1125	Partner Case Study - “Project Hybrid Engineer”DEVNET-1125	Partner Case Study - “Project Hybrid Engineer”
DEVNET-1125 Partner Case Study - “Project Hybrid Engineer”
 
ruby-on-rails-vs-nodejs-which-is-the-best-backend-framework.pdf
ruby-on-rails-vs-nodejs-which-is-the-best-backend-framework.pdfruby-on-rails-vs-nodejs-which-is-the-best-backend-framework.pdf
ruby-on-rails-vs-nodejs-which-is-the-best-backend-framework.pdf
 
SQL Server 2016 JSON
SQL Server 2016 JSONSQL Server 2016 JSON
SQL Server 2016 JSON
 
Its time to React.js
Its time to React.jsIts time to React.js
Its time to React.js
 

Más de Matt Raible

Más de Matt Raible (20)

Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
 
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022
 
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
 
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021Web App Security for Java Developers - PWX 2021
Web App Security for Java Developers - PWX 2021
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
 
Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Sprin...
 
JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020
 
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
 
Security Patterns for Microservice Architectures - SpringOne 2020
Security Patterns for Microservice Architectures - SpringOne 2020Security Patterns for Microservice Architectures - SpringOne 2020
Security Patterns for Microservice Architectures - SpringOne 2020
 
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Security Patterns for Microservice Architectures - ADTMag Microservices & API...Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
 

Último

%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
masabamasaba
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
VictoriaMetrics
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
masabamasaba
 

Último (20)

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
WSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaSWSO2CON 2024 Slides - Open Source to SaaS
WSO2CON 2024 Slides - Open Source to SaaS
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
Artyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptxArtyushina_Guest lecture_YorkU CS May 2024.pptx
Artyushina_Guest lecture_YorkU CS May 2024.pptx
 
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
Large-scale Logging Made Easy: Meetup at Deutsche Bank 2024
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
Architecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the pastArchitecture decision records - How not to get lost in the past
Architecture decision records - How not to get lost in the past
 
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
WSO2CON 2024 - WSO2's Digital Transformation Journey with Choreo: A Platforml...
 
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
Direct Style Effect Systems -The Print[A] Example- A Comprehension AidDirect Style Effect Systems -The Print[A] Example- A Comprehension Aid
Direct Style Effect Systems - The Print[A] Example - A Comprehension Aid
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
%in Hazyview+277-882-255-28 abortion pills for sale in Hazyview
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto%in Soweto+277-882-255-28 abortion pills for sale in soweto
%in Soweto+277-882-255-28 abortion pills for sale in soweto
 
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa%in tembisa+277-882-255-28 abortion pills for sale in tembisa
%in tembisa+277-882-255-28 abortion pills for sale in tembisa
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open SourceWSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
WSO2CON 2024 - Freedom First—Unleashing Developer Potential with Open Source
 
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
WSO2CON 2024 - Cloud Native Middleware: Domain-Driven Design, Cell-Based Arch...
 

Angular vs React Smackdown - Devoxx BE 2017

  • 1. #Devoxx @deepu105 | @mraible#Devoxx17 By Deepu K Sasidharan, XebiaLabs and Matt Raible, Okta November 9, 2017
  • 2. About Deepu Javascript Evangelist Co-lead Senior product developer Robotics & Astronomy enthusiast https://www.packtpub.com/application-development/full-stack-development-jhipster #Devoxx @deepu105 | @mraible#Devoxx17
  • 3. About Matt Hick from the Sticks Open Source Connoisseur Web Framework Aficionado Developer Advocate VW Buses and Vans Java Hipster #Devoxx @deepu105 | @mraible#Devoxx17
  • 4. What about you? How many folks are Java developers? How many are web developers? Who likes JavaScript? Who likes TypeScript better? Are you a fan of: Angular React Vue.js #Devoxx @deepu105 | @mraible#Devoxx17
  • 5. Today’s Agenda The History of Angular and React Learning Angular and React Our favorite and not-so-favorite features Framework Fight! Lies, damned lies, and statistics Our Recommendations #Devoxx @deepu105 | @mraible#Devoxx17
  • 6. The Rise of MV* Frameworks #Devoxx @deepu105 | @mraible#Devoxx17
  • 7. #Devoxx @deepu105 | @mraible#Devoxx17
  • 8. How many of you have experienced “Yet Another Framework Syndrome” #Devoxx @deepu105 | @mraible#Devoxx17
  • 9. The History of Angular Started as AngularJS in 2009 by Miško Hevery GWT == 3 developers, 6 months AngularJS == 1 developer, 3 weeks Announced Angular 2, September 2014 2.0 Released in September 2016 5.0 Released November 1, 2017 #Devoxx @deepu105 | @mraible#Devoxx17
  • 11.
  • 12.
  • 13.
  • 14. The History of React React was created by Jordan Walke in 2011 & Open sourced in May 2013 Inspired by XHP, an HTML components framework for PHP Within one year, had large sites Khan Academy, New York Times, Airbnb + Facebook and Instagram 16.0 released on September 26, 2017 #Devoxx @deepu105 | @mraible#Devoxx17
  • 17.
  • 18. #Devoxx @deepu105 | @mraible#Devoxx17
  • 19. Getting Started Comparison #Devoxx @deepu105 | @mraible#Devoxx17
  • 20. Angular CLI vs Create React App Minimal dependencies ES6 by default Yarn by default 325 Lines of code (not counting README) PWA Score: 55/82 ng new app-name --minimal TypeScript by default npm by default 225 Lines of code PWA Score: 18/36 (dev/prod) ng generate component | service #Devoxx @deepu105 | @mraible#Devoxx17
  • 21. Your Favorite Angular Features? #Devoxx @deepu105 | @mraible#Devoxx17
  • 22. Matt’s Favorite Angular Features Dependency Injection Angular CLI Resembles Java MVC Frameworks Two-way Binding Components, Services, and Directives TypeScript Ionic Framework Webpack compiling TypeScript Searchability: Angular vs AngularJS Release Candidates in 2016 Testing Infrastructure #Devoxx @deepu105 | @mraible#Devoxx17
  • 23. Your Favorite React Features? #Devoxx @deepu105 | @mraible#Devoxx17
  • 24. Deepu’s Favorite React Features One way binding Virtual DOM JSX Flexibility Component based composability Smart & Dumb components React Native One way binding Dependency fatigue JSX Too many options for state management No official style guide #Devoxx @deepu105 | @mraible#Devoxx17
  • 25. #Devoxx @deepu105 | @mraible#Devoxx17
  • 26. #Devoxx @deepu105 | @mraible#Devoxx17
  • 27. Framework vs Library Angular = Full fledged MVVM framework React = View rendering library Angular = React + Redux + React Router … (React & Friends) #Devoxx @deepu105 | @mraible#Devoxx17
  • 28. #Devoxx @deepu105 | @mraible#Devoxx17
  • 29. Let’s get the similarities out of the way Both Angular and React are component-based Both are client side MVVM frameworks for building SPAs Both support server-side rendering Both supports native mobile app development Both requires a build tool like webpack for optimal usage Both have comparable performance Both are backed by big companies (Google & Facebook) Both are MIT licenced (Finally!) #Devoxx @deepu105 | @mraible#Devoxx17
  • 30. It’s Time to Vote! #Devoxx @deepu105 | @mraible#Devoxx17
  • 32. Follows EL in HTML approach Uses regular DOM Typescript based (Possible to write in plain JS but not recommended) Supports dependency injection Supports Lazy loading & AOT State management by default supports one way and 2 way binding Technical Differences Follows HTML in JS (JSX) approach Uses Virtual DOM ES6 + JSX based (Possible to use Typescript + TSX as well) Does not have the concept Lazy loading is possible, No AOT State management is only one way binding and libraries like Redux or MobX is used more often for state management #Devoxx @deepu105 | @mraible#Devoxx17
  • 34. An opinionated framework Promotes object-oriented approach Offers everything required to build an SPA Differing Philosophies A view rendering library Promotes functional approach Requires use of a many 3rd party libraries like Redux, React router etc. #Devoxx @deepu105 | @mraible#Devoxx17
  • 35. Usability? #Devoxx @deepu105 | @mraible#Devoxx17
  • 36. Less flexible Often results in more code for same task compared to React Usability Very flexible Often results in less code for same task compared to Angular #Devoxx @deepu105 | @mraible#Devoxx17
  • 37. Which one is easier to learn? #Devoxx @deepu105 | @mraible#Devoxx17
  • 38. Learning Angular is a framework with lot of concepts and hence is complex to learn causing JS fatigue Opinionated and provides guidance for most use cases React itself is easier to learn but since it is only a view renderer it would require many other libraries for state management, routing etc ending up in same fatigue Limited guidance. Requires one to choose a stack and decide on 3rd party libraries and approaches to follow #Devoxx @deepu105 | @mraible#Devoxx17
  • 39. Which one has a better ecosystem? #Devoxx @deepu105 | @mraible#Devoxx17
  • 40. Ecosystem Ecosystem is not that huge Easier to set up for a full fledged application out of the box Limited choice when it comes to alternative approaches for example state management Huge ecosystem Difficult to set up for a full fledged application due to above point Lot of choices in approaches #Devoxx @deepu105 | @mraible#Devoxx17
  • 41. Best way to compare? With <code>!
  • 42. How We Did It Generated apps with both Angular and React Used JHipster, because we’re hip! Gathered statistics: Performance Accessibility Lines of Code #Devoxx @deepu105 | @mraible#Devoxx17
  • 43. JHipster Angular vs React PWA Score: 91 Performance: 66 Accessibility: 100 Best Practices: 81 Lines of code: 12416 (55 TypeScript) Number of tests: 3 PWA Score: 91 Performance: 75 Accessibility: 100 Best Practices: 81 Lines of code: 15177 (126 TypeScript files) Number of tests: 9 #Devoxx @deepu105 | @mraible#Devoxx17
  • 44. Demo Time! #Devoxx @deepu105 | @mraible#Devoxx17
  • 45. Angular vs React - Pretty Graphs #Devoxx @deepu105 | @mraible#Devoxx17
  • 46. Popularity - Google Trends #Devoxx @deepu105 | @mraible#Devoxx17
  • 47. Angular React Popularity - Hot Frameworks #Devoxx @deepu105 | @mraible#Devoxx17 https://hotframeworks.com/#top-frameworks
  • 48. Popularity - Github stars #Devoxx @deepu105 | @mraible#Devoxx17 http://www.timqian.com/star-history
  • 49. Popularity - NPM downloads #Devoxx @deepu105 | @mraible#Devoxx17
  • 50. Usage - Libscore #Devoxx @deepu105 | @mraible#Devoxx17
  • 51. #Devoxx @deepu105 | @mraible#Devoxx17
  • 52. #Devoxx @deepu105 | @mraible#Devoxx17
  • 53. #Devoxx @deepu105 | @mraible#Devoxx17
  • 54. So who wins? #Devoxx @deepu105 | @mraible#Devoxx17
  • 55. #Devoxx @deepu105 | @mraible#Devoxx17
  • 56. Our Recommendation If you have a lot of state: React If you’re familiar with Java MVC frameworks: Angular If you work at Facebook: React If you work at Google: Angular If you like structure and a helping hand: Angular If you like flexibility: React #Devoxx @deepu105 | @mraible#Devoxx17
  • 59. What You Learned The History of Angular and React Hello World in Angular and React Our favorite and not-so-favorite features Similarities and Differences Lies, damned lies, and statistics Learning is the real skill, not knowing a web framework! #Devoxx @deepu105 | @mraible#Devoxx17
  • 60. Want to learn more about JHipster? Come to our BOF tonight! #Devoxx @deepu105 | @mraible#Devoxx17
  • 61. Questions? JHipster Sample Apps on GitHub github.com/hipster-labs/devoxx17-jh-angular github.com/hipster-labs/devoxx17-jh-react Presentation at speakerdeck.com/mraible Contact us! @deepu105 || deepu.js.org @mraible || raibledesigns.com #Devoxx @deepu105 | @mraible#Devoxx17
  • 62. #Devoxx @deepu105 | @mraible#Devoxx17
  • 63. The JHipster Mini-Book Written with Asciidoctor Quick and to the point, 130 pages Developed a real world app: www.21-points.com Free Download from infoq.com/minibooks/jhipster-4-mini-book @jhipster_book #Devoxx @deepu105 | @mraible#Devoxx17