SlideShare a Scribd company logo
Angular and Redux
Managing the state of your application with the Redux pattern
Paulo Clavijo Esteban
@pclavijo
Dell-EMC - May 2018
From AngularJS to Angular
- MVC Architecture
- Controllers
- Scope horrors
- Two-way binding
- Directives for each event
- Wrappers for libraries
- Component-Based Architecture
- Components
- @Inputs and @Outputs
- TypeScript
- Reactive with Observables RxJS
- CLI
- MVC Architecture
- Controllers
- Scope horrors
- Two-way binding
- Directives for each event
- Wrappers for libraries
Paulo Clavijo @pclavijo - May 2018
Container Component
Component-based Architecture
Container Component
Presentational Component
@Input/@Output
Presentational Component
@Input/@Output
Container
Component
Service
Service
Service
Service
Service
Container Component
Presentational Component
@Input/@Output
Presentational Component
@Input/@Output
Service
Paulo Clavijo @pclavijo - May 2018
Container Component
Component-based Architecture + Redux
Container Component
Presentational Component
@Input/@Output
Presentational Component
@Input/@Output
Container
Component
StoreContainer Component
Presentational Component
@Input/@Output
Presentational Component
@Input/@Output
ke l he l a n
Sta on g e l
Paulo Clavijo @pclavijo - May 2018
Store
Redux data flow
New State
Provider
Contract
Tests
Provider
Contract
Tests
ReducersActions
Paulo Clavijo @pclavijo - May 2018
Component
1) co n di t s
ac
2) re r a c e n t e
Selectors
3) s o p es d a
Actions
{ type: 'SHOW_SIDE_NAV' }
{ type: 'DELETE_TASK', payload: 'id-t1' }
Paulo Clavijo @pclavijo - May 2018
Reducers
homepageReducer(state, action) {
switch (action.type) {
case 'SHOW_SIDE_NAV':
return { ...state, showSideNav: true };
case 'HIDE_SIDE_NAV':
return { ...state, showSideNav: false };
default:
return state;
}
Paulo Clavijo @pclavijo - May 2018
State
Paulo Clavijo @pclavijo - May 2018
{
header: {
user: {
id: 'id-u1',
name: 'John Doe'
},
notifications: [ ]
},
tasksBoard: {
tasks: [
{ id: 'id-t1', name: 'Buy bread', done: false },
{ id: 'id-t2', name: 'Go to the gym', done: false }
],
isLoading: false
},
sideNav: {
show: false
}
}
Mod g o p ic o
s a n i t if n e
be n u n an p
mo s
Http communication? Async logic?
Store
Redux data flow
New StateProvider
Contract
Tests
Provider
Contract
Tests
Reducers
Paulo Clavijo @pclavijo - May 2018
Component
Selectors
Provider
Contract
Tests
Provider
Contract
Tests
Epics
Actions
Action
{ type: 'DELETE_ORDER', payload: { orderId: 'id-1' }
@select('orders')
Store State
{
orders:[ {
orderId: 'o1'
lineItems: [
{ id: 'i1', name: 'foo', qty: 1 },
{ id: 'i2', name: 'bar', qty: 2 }
],
total: 1000
}],
showOrderDetails: true,
isDeleting: false,
...
}
Action
Action
{ type: 'DELETE_ORDER_SUCCEEDED' }
Service
New State
{
...
isDeleting: true,
...
}
isDeleting: true,
New State
{
...
showOrderDetails: false,
isDeleting: false,
...
}
Store State
{
orders:[ {
orderId: 'o1'
lineItems: [
{ id: 'i1', name: 'foo', qty: 1 },
{ id: 'i2', name: 'bar', qty: 2 }
],
total: 1000
}],
showOrderDetails: false,
isDeleting: false,
...
}
Actions
Developer Tools, Time Travel
Paulo Clavijo @pclavijo - May 2018
Observables / Rx data streams
React RxJS
… p o r n it y h o s a s am
Paulo Clavijo @pclavijo - May 2018
Redux libraries for Angular
● Angular Redux (github.com/angular-redux)
● Ngrx (github.com/ngrx)
Paulo Clavijo @pclavijo - May 2018
Terminology
- Action
- Action Creators
- Reducer
- Root Reducer (combine reducers)
- Store
- Application State
- Epic (Effects)
- Middleware
Paulo Clavijo @pclavijo - May 2018
Demo
Ad

More Related Content

What's hot (20)

Developing applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKDeveloping applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDK
Horea Porutiu
 
ZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制について
ZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制についてZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制について
ZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制について
Masaki Hirose
 
WebGL Performance Tuning Tips
WebGL Performance Tuning TipsWebGL Performance Tuning Tips
WebGL Performance Tuning Tips
Yukio Andoh
 
【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)
【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)
【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)
Hiroyuki Kusu
 
関数型・オブジェクト指向 宗教戦争に疲れたなたに送るGo言語入門
関数型・オブジェクト指向宗教戦争に疲れたなたに送るGo言語入門関数型・オブジェクト指向宗教戦争に疲れたなたに送るGo言語入門
関数型・オブジェクト指向 宗教戦争に疲れたなたに送るGo言語入門
Tadahiro Ishisaka
 
오픈소스GIS 개발 일반 강의자료
오픈소스GIS 개발 일반 강의자료오픈소스GIS 개발 일반 강의자료
오픈소스GIS 개발 일반 강의자료
BJ Jang
 
Go言語のスライスを理解しよう
Go言語のスライスを理解しようGo言語のスライスを理解しよう
Go言語のスライスを理解しよう
Yasutaka Kawamoto
 
Process hollowing
Process hollowingProcess hollowing
Process hollowing
ry0kvn
 
DDD로 복잡함 다루기
DDD로 복잡함 다루기DDD로 복잡함 다루기
DDD로 복잡함 다루기
beom kyun choi
 
블록체인 기술 적용 사례
블록체인 기술 적용 사례블록체인 기술 적용 사례
블록체인 기술 적용 사례
ICON Foundation
 
Blockchain technology and supply chain management
Blockchain technology and supply chain managementBlockchain technology and supply chain management
Blockchain technology and supply chain management
Ahmed Banafa
 
Créer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto ProjectCréer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto Project
Christian Charreyre
 
実践!Django + GraphQL 実装
実践!Django + GraphQL 実装実践!Django + GraphQL 実装
実践!Django + GraphQL 実装
ssuseraf19bf
 
Jvm internal
Jvm internalJvm internal
Jvm internal
Go Tanaka
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
Araf Karsh Hamid
 
Bitcoin Script
Bitcoin ScriptBitcoin Script
Bitcoin Script
David Evans
 
PGCon.jp 2014 jsonb-datatype-20141205
PGCon.jp 2014 jsonb-datatype-20141205PGCon.jp 2014 jsonb-datatype-20141205
PGCon.jp 2014 jsonb-datatype-20141205
Toshi Harada
 
OpenJDK トラブルシューティング #javacasual
OpenJDK トラブルシューティング #javacasualOpenJDK トラブルシューティング #javacasual
OpenJDK トラブルシューティング #javacasual
Yuji Kubota
 
Developing applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDKDeveloping applications with Hyperledger Fabric SDK
Developing applications with Hyperledger Fabric SDK
Horea Porutiu
 
ZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制について
ZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制についてZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制について
ZOZOTOWNで最大級のトラフィックを記録する福袋発売イベントで実施した負荷対策と、当日の監視体制について
Masaki Hirose
 
WebGL Performance Tuning Tips
WebGL Performance Tuning TipsWebGL Performance Tuning Tips
WebGL Performance Tuning Tips
Yukio Andoh
 
【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)
【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)
【DroidKaigi2015】初学者に嬉しいAndroid開発環境(あとMVCとか)
Hiroyuki Kusu
 
関数型・オブジェクト指向 宗教戦争に疲れたなたに送るGo言語入門
関数型・オブジェクト指向宗教戦争に疲れたなたに送るGo言語入門関数型・オブジェクト指向宗教戦争に疲れたなたに送るGo言語入門
関数型・オブジェクト指向 宗教戦争に疲れたなたに送るGo言語入門
Tadahiro Ishisaka
 
오픈소스GIS 개발 일반 강의자료
오픈소스GIS 개발 일반 강의자료오픈소스GIS 개발 일반 강의자료
오픈소스GIS 개발 일반 강의자료
BJ Jang
 
Go言語のスライスを理解しよう
Go言語のスライスを理解しようGo言語のスライスを理解しよう
Go言語のスライスを理解しよう
Yasutaka Kawamoto
 
Process hollowing
Process hollowingProcess hollowing
Process hollowing
ry0kvn
 
DDD로 복잡함 다루기
DDD로 복잡함 다루기DDD로 복잡함 다루기
DDD로 복잡함 다루기
beom kyun choi
 
블록체인 기술 적용 사례
블록체인 기술 적용 사례블록체인 기술 적용 사례
블록체인 기술 적용 사례
ICON Foundation
 
Blockchain technology and supply chain management
Blockchain technology and supply chain managementBlockchain technology and supply chain management
Blockchain technology and supply chain management
Ahmed Banafa
 
Créer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto ProjectCréer une distribution Linux embarqué professionnelle avec Yocto Project
Créer une distribution Linux embarqué professionnelle avec Yocto Project
Christian Charreyre
 
実践!Django + GraphQL 実装
実践!Django + GraphQL 実装実践!Django + GraphQL 実装
実践!Django + GraphQL 実装
ssuseraf19bf
 
Jvm internal
Jvm internalJvm internal
Jvm internal
Go Tanaka
 
Blockchain - HyperLedger Fabric
Blockchain - HyperLedger FabricBlockchain - HyperLedger Fabric
Blockchain - HyperLedger Fabric
Araf Karsh Hamid
 
PGCon.jp 2014 jsonb-datatype-20141205
PGCon.jp 2014 jsonb-datatype-20141205PGCon.jp 2014 jsonb-datatype-20141205
PGCon.jp 2014 jsonb-datatype-20141205
Toshi Harada
 
OpenJDK トラブルシューティング #javacasual
OpenJDK トラブルシューティング #javacasualOpenJDK トラブルシューティング #javacasual
OpenJDK トラブルシューティング #javacasual
Yuji Kubota
 

Similar to Angular and Redux (20)

JDBeyler
JDBeylerJDBeyler
JDBeyler
jdbeyler
 
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Roel Hartman
 
The Current State of Table API in 2022
The Current State of Table API in 2022The Current State of Table API in 2022
The Current State of Table API in 2022
Flink Forward
 
MongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB Days UK: Using MongoDB and Python for Data Analysis PipelinesMongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB
 
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
apidays
 
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays
 
What we learnt at carousell tw for golang gathering #31
What we learnt at carousell tw for golang gathering #31What we learnt at carousell tw for golang gathering #31
What we learnt at carousell tw for golang gathering #31
Ronald Hsu
 
How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...
How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...
How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...
Oleksandr Tarasenko
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side Rendering
Riwut Libinuko
 
GraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learnedGraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learned
MarcinStachniuk
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
MarcinStachniuk
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Jarek Potiuk
 
Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9
google
 
APIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdf
APIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdfAPIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdf
APIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdf
Łukasz Chruściel
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
MarcinStachniuk
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
Roel Hartman
 
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy
 
Agile without technical practices isn't agile
Agile without technical practices isn't agileAgile without technical practices isn't agile
Agile without technical practices isn't agile
kevin_yeung
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
Ortus Solutions, Corp
 
PHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsPHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the tests
Michelangelo van Dam
 
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Developing A Real World Logistic Application With Oracle Application - UKOUG ...
Roel Hartman
 
The Current State of Table API in 2022
The Current State of Table API in 2022The Current State of Table API in 2022
The Current State of Table API in 2022
Flink Forward
 
MongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB Days UK: Using MongoDB and Python for Data Analysis PipelinesMongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB Days UK: Using MongoDB and Python for Data Analysis Pipelines
MongoDB
 
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
apidays LIVE Australia 2020 - From micro to macro-coordination through domain...
apidays
 
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays Paris 2022 - France Televisions : How we leverage API Platform for ou...
apidays
 
What we learnt at carousell tw for golang gathering #31
What we learnt at carousell tw for golang gathering #31What we learnt at carousell tw for golang gathering #31
What we learnt at carousell tw for golang gathering #31
Ronald Hsu
 
How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...
How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...
How to grow GraphQL and remove SQLAlchemy and REST API from a high-load Pytho...
Oleksandr Tarasenko
 
O365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side RenderingO365 Saturday - Deepdive SharePoint Client Side Rendering
O365 Saturday - Deepdive SharePoint Client Side Rendering
Riwut Libinuko
 
GraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learnedGraphQL - when REST API is not enough - lessons learned
GraphQL - when REST API is not enough - lessons learned
MarcinStachniuk
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
MarcinStachniuk
 
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFestManageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Manageable Data Pipelines With Airflow (and kubernetes) - GDG DevFest
Jarek Potiuk
 
Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9Linq E Ef 1207668728621762 9
Linq E Ef 1207668728621762 9
google
 
APIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdf
APIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdfAPIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdf
APIP 2024 - All the Challenges of Sylius Migration to API Platform 3.pdf
Łukasz Chruściel
 
GraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learnedGraphQL - when REST API is to less - lessons learned
GraphQL - when REST API is to less - lessons learned
MarcinStachniuk
 
Creating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with googleCreating sub zero dashboard plugin for apex with google
Creating sub zero dashboard plugin for apex with google
Roel Hartman
 
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy MadCode Meetup #11: Why do you need to switch from Obj-C to Swift, or ...
Stanfy
 
Agile without technical practices isn't agile
Agile without technical practices isn't agileAgile without technical practices isn't agile
Agile without technical practices isn't agile
kevin_yeung
 
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
ITB2019 ColdBox APIs + VueJS - powering Mobile, Desktop and Web Apps with 1 V...
Ortus Solutions, Corp
 
PHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the testsPHPUnit Episode iv.iii: Return of the tests
PHPUnit Episode iv.iii: Return of the tests
Michelangelo van Dam
 
Ad

More from Paulo Clavijo (15)

Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021
Paulo Clavijo
 
User story slicing exercise
User story slicing exerciseUser story slicing exercise
User story slicing exercise
Paulo Clavijo
 
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
Paulo Clavijo
 
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Paulo Clavijo
 
Legacy Code and Refactoring Workshop - Session 1 - October 2019
Legacy Code and Refactoring Workshop - Session 1 - October 2019Legacy Code and Refactoring Workshop - Session 1 - October 2019
Legacy Code and Refactoring Workshop - Session 1 - October 2019
Paulo Clavijo
 
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Paulo Clavijo
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
Paulo Clavijo
 
TDD and Simple Design Workshop - Session 1 - November 2018
TDD and Simple Design Workshop - Session 1 - November 2018TDD and Simple Design Workshop - Session 1 - November 2018
TDD and Simple Design Workshop - Session 1 - November 2018
Paulo Clavijo
 
Outside-in TDD with Test Doubles
Outside-in TDD with Test DoublesOutside-in TDD with Test Doubles
Outside-in TDD with Test Doubles
Paulo Clavijo
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
Paulo Clavijo
 
Consumer-Driven Contract Testing
Consumer-Driven Contract TestingConsumer-Driven Contract Testing
Consumer-Driven Contract Testing
Paulo Clavijo
 
ATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de AceptaciónATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de Aceptación
Paulo Clavijo
 
Tests Unitarios con JUnit 4
Tests Unitarios con JUnit 4Tests Unitarios con JUnit 4
Tests Unitarios con JUnit 4
Paulo Clavijo
 
Gestión de Cambios de BBDD con LiquiBase
Gestión de Cambios de BBDD con LiquiBaseGestión de Cambios de BBDD con LiquiBase
Gestión de Cambios de BBDD con LiquiBase
Paulo Clavijo
 
Introducción a Spring Roo
Introducción a Spring RooIntroducción a Spring Roo
Introducción a Spring Roo
Paulo Clavijo
 
Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021Consumer-Driven Contract Testing - Workshop - January 2021
Consumer-Driven Contract Testing - Workshop - January 2021
Paulo Clavijo
 
User story slicing exercise
User story slicing exerciseUser story slicing exercise
User story slicing exercise
Paulo Clavijo
 
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
CI/CD non-breaking changes exercise - Cork Software Crafters - February 2020
Paulo Clavijo
 
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019Breaking Dependencies Legacy Code -  Cork Software Crafters - September 2019
Breaking Dependencies Legacy Code - Cork Software Crafters - September 2019
Paulo Clavijo
 
Legacy Code and Refactoring Workshop - Session 1 - October 2019
Legacy Code and Refactoring Workshop - Session 1 - October 2019Legacy Code and Refactoring Workshop - Session 1 - October 2019
Legacy Code and Refactoring Workshop - Session 1 - October 2019
Paulo Clavijo
 
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Approval Testing & Mutation Testing - Cork Software Crafters - June 2019
Paulo Clavijo
 
TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019TDD and Simple Design Workshop - Session 1 - March 2019
TDD and Simple Design Workshop - Session 1 - March 2019
Paulo Clavijo
 
TDD and Simple Design Workshop - Session 1 - November 2018
TDD and Simple Design Workshop - Session 1 - November 2018TDD and Simple Design Workshop - Session 1 - November 2018
TDD and Simple Design Workshop - Session 1 - November 2018
Paulo Clavijo
 
Outside-in TDD with Test Doubles
Outside-in TDD with Test DoublesOutside-in TDD with Test Doubles
Outside-in TDD with Test Doubles
Paulo Clavijo
 
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
DDD Strategic Design - Context Maps - Paulo Clavijo - April 2018
Paulo Clavijo
 
Consumer-Driven Contract Testing
Consumer-Driven Contract TestingConsumer-Driven Contract Testing
Consumer-Driven Contract Testing
Paulo Clavijo
 
ATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de AceptaciónATDD - Desarrollo Dirigido por Test de Aceptación
ATDD - Desarrollo Dirigido por Test de Aceptación
Paulo Clavijo
 
Tests Unitarios con JUnit 4
Tests Unitarios con JUnit 4Tests Unitarios con JUnit 4
Tests Unitarios con JUnit 4
Paulo Clavijo
 
Gestión de Cambios de BBDD con LiquiBase
Gestión de Cambios de BBDD con LiquiBaseGestión de Cambios de BBDD con LiquiBase
Gestión de Cambios de BBDD con LiquiBase
Paulo Clavijo
 
Introducción a Spring Roo
Introducción a Spring RooIntroducción a Spring Roo
Introducción a Spring Roo
Paulo Clavijo
 
Ad

Recently uploaded (20)

Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In FranceManifest Pre-Seed Update | A Humanoid OEM Deeptech In France
Manifest Pre-Seed Update | A Humanoid OEM Deeptech In France
chb3
 
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
Transcript: #StandardsGoals for 2025: Standards & certification roundup - Tec...
BookNet Canada
 
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath MaestroDev Dives: Automate and orchestrate your processes with UiPath Maestro
Dev Dives: Automate and orchestrate your processes with UiPath Maestro
UiPathCommunity
 
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Enhancing ICU Intelligence: How Our Functional Testing Enabled a Healthcare I...
Impelsys Inc.
 
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptxIncreasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Increasing Retail Store Efficiency How can Planograms Save Time and Money.pptx
Anoop Ashok
 
tecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdftecnologias de las primeras civilizaciones.pdf
tecnologias de las primeras civilizaciones.pdf
fjgm517
 
HCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser EnvironmentsHCL Nomad Web – Best Practices and Managing Multiuser Environments
HCL Nomad Web – Best Practices and Managing Multiuser Environments
panagenda
 
Cybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure ADCybersecurity Identity and Access Solutions using Azure AD
Cybersecurity Identity and Access Solutions using Azure AD
VICTOR MAESTRE RAMIREZ
 
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes Partner Innovation Updates for May 2025
ThousandEyes
 
Generative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in BusinessGenerative Artificial Intelligence (GenAI) in Business
Generative Artificial Intelligence (GenAI) in Business
Dr. Tathagat Varma
 
Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)Into The Box Conference Keynote Day 1 (ITB2025)
Into The Box Conference Keynote Day 1 (ITB2025)
Ortus Solutions, Corp
 
Technology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data AnalyticsTechnology Trends in 2025: AI and Big Data Analytics
Technology Trends in 2025: AI and Big Data Analytics
InData Labs
 
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-UmgebungenHCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
HCL Nomad Web – Best Practices und Verwaltung von Multiuser-Umgebungen
panagenda
 
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul Shares 5 Steps to Implement AI Agents for Maximum Business Efficien...
Noah Loul
 
Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025Splunk Security Update | Public Sector Summit Germany 2025
Splunk Security Update | Public Sector Summit Germany 2025
Splunk
 
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded DevelopersLinux Support for SMARC: How Toradex Empowers Embedded Developers
Linux Support for SMARC: How Toradex Empowers Embedded Developers
Toradex
 
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep DiveDesigning Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
Designing Low-Latency Systems with Rust and ScyllaDB: An Architectural Deep Dive
ScyllaDB
 
2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx2025-05-Q4-2024-Investor-Presentation.pptx
2025-05-Q4-2024-Investor-Presentation.pptx
Samuele Fogagnolo
 
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptxSpecial Meetup Edition - TDX Bengaluru Meetup #52.pptx
Special Meetup Edition - TDX Bengaluru Meetup #52.pptx
shyamraj55
 
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
AI EngineHost Review: Revolutionary USA Datacenter-Based Hosting with NVIDIA ...
SOFTTECHHUB
 

Angular and Redux

  • 1. Angular and Redux Managing the state of your application with the Redux pattern Paulo Clavijo Esteban @pclavijo Dell-EMC - May 2018
  • 2. From AngularJS to Angular - MVC Architecture - Controllers - Scope horrors - Two-way binding - Directives for each event - Wrappers for libraries - Component-Based Architecture - Components - @Inputs and @Outputs - TypeScript - Reactive with Observables RxJS - CLI - MVC Architecture - Controllers - Scope horrors - Two-way binding - Directives for each event - Wrappers for libraries Paulo Clavijo @pclavijo - May 2018
  • 3. Container Component Component-based Architecture Container Component Presentational Component @Input/@Output Presentational Component @Input/@Output Container Component Service Service Service Service Service Container Component Presentational Component @Input/@Output Presentational Component @Input/@Output Service Paulo Clavijo @pclavijo - May 2018
  • 4. Container Component Component-based Architecture + Redux Container Component Presentational Component @Input/@Output Presentational Component @Input/@Output Container Component StoreContainer Component Presentational Component @Input/@Output Presentational Component @Input/@Output ke l he l a n Sta on g e l Paulo Clavijo @pclavijo - May 2018
  • 5. Store Redux data flow New State Provider Contract Tests Provider Contract Tests ReducersActions Paulo Clavijo @pclavijo - May 2018 Component 1) co n di t s ac 2) re r a c e n t e Selectors 3) s o p es d a
  • 6. Actions { type: 'SHOW_SIDE_NAV' } { type: 'DELETE_TASK', payload: 'id-t1' } Paulo Clavijo @pclavijo - May 2018
  • 7. Reducers homepageReducer(state, action) { switch (action.type) { case 'SHOW_SIDE_NAV': return { ...state, showSideNav: true }; case 'HIDE_SIDE_NAV': return { ...state, showSideNav: false }; default: return state; } Paulo Clavijo @pclavijo - May 2018
  • 8. State Paulo Clavijo @pclavijo - May 2018 { header: { user: { id: 'id-u1', name: 'John Doe' }, notifications: [ ] }, tasksBoard: { tasks: [ { id: 'id-t1', name: 'Buy bread', done: false }, { id: 'id-t2', name: 'Go to the gym', done: false } ], isLoading: false }, sideNav: { show: false } } Mod g o p ic o s a n i t if n e be n u n an p mo s
  • 10. Store Redux data flow New StateProvider Contract Tests Provider Contract Tests Reducers Paulo Clavijo @pclavijo - May 2018 Component Selectors Provider Contract Tests Provider Contract Tests Epics Actions Action { type: 'DELETE_ORDER', payload: { orderId: 'id-1' } @select('orders') Store State { orders:[ { orderId: 'o1' lineItems: [ { id: 'i1', name: 'foo', qty: 1 }, { id: 'i2', name: 'bar', qty: 2 } ], total: 1000 }], showOrderDetails: true, isDeleting: false, ... } Action Action { type: 'DELETE_ORDER_SUCCEEDED' } Service New State { ... isDeleting: true, ... } isDeleting: true, New State { ... showOrderDetails: false, isDeleting: false, ... } Store State { orders:[ { orderId: 'o1' lineItems: [ { id: 'i1', name: 'foo', qty: 1 }, { id: 'i2', name: 'bar', qty: 2 } ], total: 1000 }], showOrderDetails: false, isDeleting: false, ... } Actions
  • 11. Developer Tools, Time Travel Paulo Clavijo @pclavijo - May 2018
  • 12. Observables / Rx data streams React RxJS … p o r n it y h o s a s am Paulo Clavijo @pclavijo - May 2018
  • 13. Redux libraries for Angular ● Angular Redux (github.com/angular-redux) ● Ngrx (github.com/ngrx) Paulo Clavijo @pclavijo - May 2018
  • 14. Terminology - Action - Action Creators - Reducer - Root Reducer (combine reducers) - Store - Application State - Epic (Effects) - Middleware Paulo Clavijo @pclavijo - May 2018
  • 15. Demo