SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
How to
Migrate from
Angular to React
Feb 28, 2019
Tomasz Bąk
t.bak@selleo.com
About me
● 13 years software developer at selleo.com
● 6+ years senior frontend developer
Agenda
● Why migrate?
● Migration strategies
● Micro Frontends architecture
Before migration consider
the business value and costs
“Old code has been used. It has been tested. Lots of bugs
have been found, and they’ve been fixed. Each of these bugs
took weeks of real-world usage before they were found.
When you throw away code and start from scratch, you are
throwing away all that knowledge.”
Source: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
Joel Spolsky
“This code is a mess”
is not a good reason to migrate
● ugly code - fix cryptic variables names, mixed
_camelCase/snake_case etc.
● architecture problems - can be solved, one at a time, by
carefully moving code, refactoring, changing interfaces
● performance problems - when optimizing for speed, 1%
of the work gets you 99% of the bang
Source: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
Why migrate?
● Hiring and talent retention
● Tech stack unification
● Leverage other tech ecosystem
React advantages
● JavaScript superpowers
○ JSX blends well together with JavaScript
○ your components are functions
○ static type checking (TypeScript instead of PropTypes)
● stronger libraries community
○ Redux, Jest + Enzyme, Formik + Yup
○ React / Redux developer tools
● strict unidirectional data flow
Migration vs business value
Legacy
App
New
App
Time
Added Value
Migration vs business value
Legacy
App
New
App
Time
Added Value ... ......
Migration strategies
Bottom-up Top-down
Migration strategies
Bottom-up Top-down
Embed React components in Angular
Usually delays state management
layer migration
Replace larger chunks, usually URL based
Two separate state management layers
Martin Fowler’s
Strangler Application pattern
Transform - create a parallel new view
Coexist - leave the existing view for a time, so the
functionality is implemented incrementally
Eliminate - remove the old functionality as users
stop using it
Source: https://developer.ibm.com/articles/cl-strangler-application-pattern-microservices-apps-trs/
How to apply
Strangler Application pattern
Identify the Bounded Contexts in your application
design - e.g. in an airline application, flight booking
would be one Bounded Context, while the airline
loyalty program would be a different Bounded
Context.
Choose the Bounded Context that is the smallest
and least costly to refactor
Source: https://developer.ibm.com/articles/cl-strangler-application-pattern-microservices-apps-trs/
Micro Frontends architecture
The idea behind Micro Frontends is to think
about a website or web app as a composition of
features which are owned by independent
teams. Each team has a distinct area of
business or mission it cares about and
specialises in. A team is cross functional and
develops its features end-to-end, from database
to user interface.
Source: https://micro-frontends.org
Micro Frontends architecture
Micro Frontends architecture
Who is using Micro Frontends?
HelloFresh
“At first, we found development speed to be a bit slow. Since this approach
requires you to own your entire project E2E, the learning curve can be steep. But
after cresting the curve we were able to push out projects like never before;
the new HelloFresh shop, for example, took 3 people 4 weeks to roll out. Our
developers also claim increased confidence and breadth of knowledge after
adopting this approach.”
Source: https://engineering.hellofresh.com/front-end-microservices-at-hellofresh-23978a611b87
Who is using Micro Frontends?
Ikea
“Today, we are aware that we should normally not have our whole enterprise in one service, and so we
split up the enterprise architecture in smaller services, for example, microservices. However, we are
also starting to realize that we have the same problems with the frontend monolith as we had with the
backend monolith, Gustaf Nilsson Kotte explained in a recent interview hosted by Stefan Tilkov. Using
a micro frontend architecture, he breaks the frontend into smaller parts to allow for teams to deploy
autonomously, thus enabling continuous delivery for web frontends.”
Source: https://www.infoq.com/news/2018/08/experiences-micro-frontends
Micro Frontends architecture - Single SPA framework https://single-spa.js.org
Micro Frontends architecture - Single SPA framework https://single-spa.js.org
import {declareChildApplication, start} from 'single-spa';
declareChildApplication('navbar',
() => import('./navbar/navbar.app.js'), () => true);
declareChildApplication('home',
() => import('./home/home.app.js'), () => location.pathname === "" || location.pathname === "/");
declareChildApplication('angular',
() => import('./angular/angular.app.js'), pathPrefix('/angular'));
declareChildApplication('react',
() => import('./react/react.app.js'), pathPrefix('/react'));
declareChildApplication('vue',
() => import('src/vue/vue.app.js'), pathPrefix('/vue'));
start();
Micro Frontends architecture - Single SPA framework https://single-spa.js.org
import React from 'react';
import ReactDOM from 'react-dom';
import singleSpaReact from 'single-spa-react';
import rootComponent from './root.component.js';
const reactLifecycles = singleSpaReact({
React, ReactDOM,
rootComponent,
domElementGetter: () => document.getElementById('react-app')
});
export const bootstrap = [reactLifecycles.bootstrap];
export const mount = [reactLifecycles.mount];
export const unmount = [reactLifecycles.unmount];
Summary
● Consider the business value and costs
● Identify the Bounded Contexts in your application
● Make your application more modular, break the
Monolith!
Q&A
t.bak@selleo.com

Weitere ähnliche Inhalte

Was ist angesagt?

Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecturetyrantbrian
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailogjuljo
 
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Edureka!
 
Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...
Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...
Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...BIHI Oussama
 
Integrating Bounded Contexts Tips - Dutch PHP 2016
Integrating Bounded Contexts Tips - Dutch PHP 2016Integrating Bounded Contexts Tips - Dutch PHP 2016
Integrating Bounded Contexts Tips - Dutch PHP 2016Carlos Buenosvinos
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREAraf Karsh Hamid
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootKashif Ali Siddiqui
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To MicroservicesLalit Kale
 
CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®confluent
 
Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...
Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...
Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...Amazon Web Services
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principlesSanjoy Kumar Roy
 
Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Juan Sequeda
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentationVibhor Grover
 

Was ist angesagt? (20)

Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Microservice Architecture
Microservice ArchitectureMicroservice Architecture
Microservice Architecture
 
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and HailoMicroservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
Microservices Architectures: Become a Unicorn like Netflix, Twitter and Hailo
 
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
 
Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...
Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...
Developing Apps with GPT-4 and ChatGPT_ Build Intelligent Chatbots, Content G...
 
Intro to LLMs
Intro to LLMsIntro to LLMs
Intro to LLMs
 
Integrating Bounded Contexts Tips - Dutch PHP 2016
Integrating Bounded Contexts Tips - Dutch PHP 2016Integrating Bounded Contexts Tips - Dutch PHP 2016
Integrating Bounded Contexts Tips - Dutch PHP 2016
 
Microservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SREMicroservices Docker Kubernetes Istio Kanban DevOps SRE
Microservices Docker Kubernetes Istio Kanban DevOps SRE
 
Understanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring BootUnderstanding MicroSERVICE Architecture with Java & Spring Boot
Understanding MicroSERVICE Architecture with Java & Spring Boot
 
Elastic-Engineering
Elastic-EngineeringElastic-Engineering
Elastic-Engineering
 
Graphql
GraphqlGraphql
Graphql
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
Introduction To Microservices
Introduction To MicroservicesIntroduction To Microservices
Introduction To Microservices
 
CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®CDC patterns in Apache Kafka®
CDC patterns in Apache Kafka®
 
Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...
Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...
Architecture Patterns for Multi-Region Active-Active Applications (ARC209-R2)...
 
Microservice architecture design principles
Microservice architecture design principlesMicroservice architecture design principles
Microservice architecture design principles
 
Introduction to GraphQL
Introduction to GraphQLIntroduction to GraphQL
Introduction to GraphQL
 
Introduction to Linked Data 1/5
Introduction to Linked Data 1/5Introduction to Linked Data 1/5
Introduction to Linked Data 1/5
 
Graphql presentation
Graphql presentationGraphql presentation
Graphql presentation
 

Ähnlich wie How to migrate large project from Angular to React

FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro FrontendMiki Lombardi
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMiki Lombardi
 
IT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docxIT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docxvrickens
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondUgo Landini
 
Scaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdfScaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdfKatamaRajuBandigari1
 
The Benefits Of Software Creation
The Benefits Of Software CreationThe Benefits Of Software Creation
The Benefits Of Software CreationJennifer Wood
 
Beyond 12 Factor - Developing Cloud Native Applications
Beyond 12 Factor - Developing Cloud Native ApplicationsBeyond 12 Factor - Developing Cloud Native Applications
Beyond 12 Factor - Developing Cloud Native ApplicationsContainer Solutions
 
KiranGara_JEE_7Yrs
KiranGara_JEE_7YrsKiranGara_JEE_7Yrs
KiranGara_JEE_7YrsKiran Gara
 
from shadow IT to empowered IT-asanka 2014 08-gartner catalyst
from shadow IT to empowered IT-asanka 2014 08-gartner catalystfrom shadow IT to empowered IT-asanka 2014 08-gartner catalyst
from shadow IT to empowered IT-asanka 2014 08-gartner catalystWSO2
 
From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!
From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!
From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!WSO2
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendVlad Fedosov
 
The F*star Meta-Pattern (English only)
The F*star Meta-Pattern (English only)The F*star Meta-Pattern (English only)
The F*star Meta-Pattern (English only)eelstork
 
Application security for the modern web - ISSA South Texas Houston DevOps
Application security for the modern web - ISSA South Texas Houston DevOpsApplication security for the modern web - ISSA South Texas Houston DevOps
Application security for the modern web - ISSA South Texas Houston DevOpsPhillip Maddux
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekDr. Felix Raab
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksIRJET Journal
 
IRJET- Web Page Builder
IRJET- Web Page BuilderIRJET- Web Page Builder
IRJET- Web Page BuilderIRJET Journal
 

Ähnlich wie How to migrate large project from Angular to React (20)

FEVR - Micro Frontend
FEVR - Micro FrontendFEVR - Micro Frontend
FEVR - Micro Frontend
 
Micro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - PlansoftMicro Front-End & Microservices - Plansoft
Micro Front-End & Microservices - Plansoft
 
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJSMicro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
Micro Front Ends : Divided We Rule by Parth Ghiya - AhmedabadJS
 
IT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docxIT 8003 Cloud ComputingFor this activi.docx
IT 8003 Cloud ComputingFor this activi.docx
 
Cloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyondCloudify your applications: microservices and beyond
Cloudify your applications: microservices and beyond
 
Scaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdfScaling frontend applications with micro-frontends Presentation.pdf
Scaling frontend applications with micro-frontends Presentation.pdf
 
The Benefits Of Software Creation
The Benefits Of Software CreationThe Benefits Of Software Creation
The Benefits Of Software Creation
 
Beyond 12 Factor - Developing Cloud Native Applications
Beyond 12 Factor - Developing Cloud Native ApplicationsBeyond 12 Factor - Developing Cloud Native Applications
Beyond 12 Factor - Developing Cloud Native Applications
 
KiranGara_JEE_7Yrs
KiranGara_JEE_7YrsKiranGara_JEE_7Yrs
KiranGara_JEE_7Yrs
 
from shadow IT to empowered IT-asanka 2014 08-gartner catalyst
from shadow IT to empowered IT-asanka 2014 08-gartner catalystfrom shadow IT to empowered IT-asanka 2014 08-gartner catalyst
from shadow IT to empowered IT-asanka 2014 08-gartner catalyst
 
From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!
From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!
From Shadow IT to Empowered IT: Unshackling Your Developers’ Creativity!
 
JSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontendJSFest 2019: Technology agnostic microservices at SPA frontend
JSFest 2019: Technology agnostic microservices at SPA frontend
 
Abhinav Nigam
Abhinav NigamAbhinav Nigam
Abhinav Nigam
 
The F*star Meta-Pattern (English only)
The F*star Meta-Pattern (English only)The F*star Meta-Pattern (English only)
The F*star Meta-Pattern (English only)
 
Resume
ResumeResume
Resume
 
Application security for the modern web - ISSA South Texas Houston DevOps
Application security for the modern web - ISSA South Texas Houston DevOpsApplication security for the modern web - ISSA South Texas Houston DevOps
Application security for the modern web - ISSA South Texas Houston DevOps
 
Building a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one weekBuilding a full-stack app with Golang and Google Cloud Platform in one week
Building a full-stack app with Golang and Google Cloud Platform in one week
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web Frameworks
 
Ahmed El Mawaziny CV
Ahmed El Mawaziny CVAhmed El Mawaziny CV
Ahmed El Mawaziny CV
 
IRJET- Web Page Builder
IRJET- Web Page BuilderIRJET- Web Page Builder
IRJET- Web Page Builder
 

Mehr von Tomasz Bak

Design Patterns in React
Design Patterns in ReactDesign Patterns in React
Design Patterns in ReactTomasz Bak
 
Building React CRUD app in minutes?
Building React CRUD app in minutes?Building React CRUD app in minutes?
Building React CRUD app in minutes?Tomasz Bak
 
e2e testing with cypress
e2e testing with cypresse2e testing with cypress
e2e testing with cypressTomasz Bak
 
How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQLTomasz Bak
 
Working with npm packages
Working with npm packagesWorking with npm packages
Working with npm packagesTomasz Bak
 
How to replace rails asset pipeline with webpack?
How to replace rails asset pipeline with webpack?How to replace rails asset pipeline with webpack?
How to replace rails asset pipeline with webpack?Tomasz Bak
 
Functional Reactive Angular 2
Functional Reactive Angular 2 Functional Reactive Angular 2
Functional Reactive Angular 2 Tomasz Bak
 
Jak wnieść wkład w Open Source?
Jak wnieść wkład w Open Source?Jak wnieść wkład w Open Source?
Jak wnieść wkład w Open Source?Tomasz Bak
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript PromisesTomasz Bak
 
Replacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with GulpReplacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with GulpTomasz Bak
 
Ulepszanie aplikacji webowej z AngularJS
Ulepszanie aplikacji webowej z AngularJSUlepszanie aplikacji webowej z AngularJS
Ulepszanie aplikacji webowej z AngularJSTomasz Bak
 
Bardziej produktywny gmail
Bardziej produktywny gmailBardziej produktywny gmail
Bardziej produktywny gmailTomasz Bak
 
Rails tobak2005
Rails tobak2005Rails tobak2005
Rails tobak2005Tomasz Bak
 
Testowanie JavaScript
Testowanie JavaScriptTestowanie JavaScript
Testowanie JavaScriptTomasz Bak
 

Mehr von Tomasz Bak (16)

Design Patterns in React
Design Patterns in ReactDesign Patterns in React
Design Patterns in React
 
Building React CRUD app in minutes?
Building React CRUD app in minutes?Building React CRUD app in minutes?
Building React CRUD app in minutes?
 
e2e testing with cypress
e2e testing with cypresse2e testing with cypress
e2e testing with cypress
 
How to GraphQL
How to GraphQLHow to GraphQL
How to GraphQL
 
Working with npm packages
Working with npm packagesWorking with npm packages
Working with npm packages
 
How to replace rails asset pipeline with webpack?
How to replace rails asset pipeline with webpack?How to replace rails asset pipeline with webpack?
How to replace rails asset pipeline with webpack?
 
Functional Reactive Angular 2
Functional Reactive Angular 2 Functional Reactive Angular 2
Functional Reactive Angular 2
 
Jak wnieść wkład w Open Source?
Jak wnieść wkład w Open Source?Jak wnieść wkład w Open Source?
Jak wnieść wkład w Open Source?
 
JavaScript Promises
JavaScript PromisesJavaScript Promises
JavaScript Promises
 
Replacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with GulpReplacing Rails asset pipeline with Gulp
Replacing Rails asset pipeline with Gulp
 
Ulepszanie aplikacji webowej z AngularJS
Ulepszanie aplikacji webowej z AngularJSUlepszanie aplikacji webowej z AngularJS
Ulepszanie aplikacji webowej z AngularJS
 
Bardziej produktywny gmail
Bardziej produktywny gmailBardziej produktywny gmail
Bardziej produktywny gmail
 
Kerberos
KerberosKerberos
Kerberos
 
Rails tobak2005
Rails tobak2005Rails tobak2005
Rails tobak2005
 
Ldap novell
Ldap novellLdap novell
Ldap novell
 
Testowanie JavaScript
Testowanie JavaScriptTestowanie JavaScript
Testowanie JavaScript
 

Kürzlich hochgeladen

Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...Nitya salvi
 
%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 kaalfonteinmasabamasaba
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024Mind IT Systems
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplatePresentation.STUDIO
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
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
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is insideshinachiaurasa2
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdfPearlKirahMaeRagusta1
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesVictorSzoltysek
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfonteinmasabamasaba
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...Shane Coughlan
 
%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 tembisamasabamasaba
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech studentsHimanshiGarg82
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 

Kürzlich hochgeladen (20)

Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...Chinsurah Escorts ☎️8617697112  Starting From 5K to 15K High Profile Escorts ...
Chinsurah Escorts ☎️8617697112 Starting From 5K to 15K High Profile Escorts ...
 
%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
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
10 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 202410 Trends Likely to Shape Enterprise Technology in 2024
10 Trends Likely to Shape Enterprise Technology in 2024
 
AI & Machine Learning Presentation Template
AI & Machine Learning Presentation TemplateAI & Machine Learning Presentation Template
AI & Machine Learning Presentation Template
 
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
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
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
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
%in Stilfontein+277-882-255-28 abortion pills for sale in Stilfontein
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
OpenChain - The Ramifications of ISO/IEC 5230 and ISO/IEC 18974 for Legal Pro...
 
%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
 
8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students8257 interfacing 2 in microprocessor for btech students
8257 interfacing 2 in microprocessor for btech students
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 

How to migrate large project from Angular to React

  • 1. How to Migrate from Angular to React Feb 28, 2019 Tomasz Bąk t.bak@selleo.com
  • 2. About me ● 13 years software developer at selleo.com ● 6+ years senior frontend developer
  • 3. Agenda ● Why migrate? ● Migration strategies ● Micro Frontends architecture
  • 4. Before migration consider the business value and costs “Old code has been used. It has been tested. Lots of bugs have been found, and they’ve been fixed. Each of these bugs took weeks of real-world usage before they were found. When you throw away code and start from scratch, you are throwing away all that knowledge.” Source: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/ Joel Spolsky
  • 5. “This code is a mess” is not a good reason to migrate ● ugly code - fix cryptic variables names, mixed _camelCase/snake_case etc. ● architecture problems - can be solved, one at a time, by carefully moving code, refactoring, changing interfaces ● performance problems - when optimizing for speed, 1% of the work gets you 99% of the bang Source: https://www.joelonsoftware.com/2000/04/06/things-you-should-never-do-part-i/
  • 6. Why migrate? ● Hiring and talent retention ● Tech stack unification ● Leverage other tech ecosystem
  • 7. React advantages ● JavaScript superpowers ○ JSX blends well together with JavaScript ○ your components are functions ○ static type checking (TypeScript instead of PropTypes) ● stronger libraries community ○ Redux, Jest + Enzyme, Formik + Yup ○ React / Redux developer tools ● strict unidirectional data flow
  • 8. Migration vs business value Legacy App New App Time Added Value
  • 9. Migration vs business value Legacy App New App Time Added Value ... ......
  • 11. Migration strategies Bottom-up Top-down Embed React components in Angular Usually delays state management layer migration Replace larger chunks, usually URL based Two separate state management layers
  • 12. Martin Fowler’s Strangler Application pattern Transform - create a parallel new view Coexist - leave the existing view for a time, so the functionality is implemented incrementally Eliminate - remove the old functionality as users stop using it Source: https://developer.ibm.com/articles/cl-strangler-application-pattern-microservices-apps-trs/
  • 13. How to apply Strangler Application pattern Identify the Bounded Contexts in your application design - e.g. in an airline application, flight booking would be one Bounded Context, while the airline loyalty program would be a different Bounded Context. Choose the Bounded Context that is the smallest and least costly to refactor Source: https://developer.ibm.com/articles/cl-strangler-application-pattern-microservices-apps-trs/
  • 14. Micro Frontends architecture The idea behind Micro Frontends is to think about a website or web app as a composition of features which are owned by independent teams. Each team has a distinct area of business or mission it cares about and specialises in. A team is cross functional and develops its features end-to-end, from database to user interface. Source: https://micro-frontends.org
  • 17. Who is using Micro Frontends? HelloFresh “At first, we found development speed to be a bit slow. Since this approach requires you to own your entire project E2E, the learning curve can be steep. But after cresting the curve we were able to push out projects like never before; the new HelloFresh shop, for example, took 3 people 4 weeks to roll out. Our developers also claim increased confidence and breadth of knowledge after adopting this approach.” Source: https://engineering.hellofresh.com/front-end-microservices-at-hellofresh-23978a611b87
  • 18. Who is using Micro Frontends? Ikea “Today, we are aware that we should normally not have our whole enterprise in one service, and so we split up the enterprise architecture in smaller services, for example, microservices. However, we are also starting to realize that we have the same problems with the frontend monolith as we had with the backend monolith, Gustaf Nilsson Kotte explained in a recent interview hosted by Stefan Tilkov. Using a micro frontend architecture, he breaks the frontend into smaller parts to allow for teams to deploy autonomously, thus enabling continuous delivery for web frontends.” Source: https://www.infoq.com/news/2018/08/experiences-micro-frontends
  • 19. Micro Frontends architecture - Single SPA framework https://single-spa.js.org
  • 20. Micro Frontends architecture - Single SPA framework https://single-spa.js.org import {declareChildApplication, start} from 'single-spa'; declareChildApplication('navbar', () => import('./navbar/navbar.app.js'), () => true); declareChildApplication('home', () => import('./home/home.app.js'), () => location.pathname === "" || location.pathname === "/"); declareChildApplication('angular', () => import('./angular/angular.app.js'), pathPrefix('/angular')); declareChildApplication('react', () => import('./react/react.app.js'), pathPrefix('/react')); declareChildApplication('vue', () => import('src/vue/vue.app.js'), pathPrefix('/vue')); start();
  • 21. Micro Frontends architecture - Single SPA framework https://single-spa.js.org import React from 'react'; import ReactDOM from 'react-dom'; import singleSpaReact from 'single-spa-react'; import rootComponent from './root.component.js'; const reactLifecycles = singleSpaReact({ React, ReactDOM, rootComponent, domElementGetter: () => document.getElementById('react-app') }); export const bootstrap = [reactLifecycles.bootstrap]; export const mount = [reactLifecycles.mount]; export const unmount = [reactLifecycles.unmount];
  • 22. Summary ● Consider the business value and costs ● Identify the Bounded Contexts in your application ● Make your application more modular, break the Monolith!