SlideShare ist ein Scribd-Unternehmen logo
1 von 27
Downloaden Sie, um offline zu lesen
Adopting with Change:
Frontend Architecture
and Patterns
MJT
wwktm.c
o
Early Web and JavaScript
● AJAX based applications
● All JavaScript bundled into
one file
● jQuery
● IIFEs everywhere
● Imperative code
Moving to JS Modules
No more
IIFEs
JS Modules in Brief
● ES6 syntax + New Features
● Creating smaller functions is
easy
● Default exports / Named
exports
● Import creates immutable
bindings
JS Modules to Components
● One component should focus on one
section of the UI.
● Shouldn’t access another’s html
directly.
● Encapsulates its Output(html), Style
(css) and Functionality (javascript).
● Each component has some way to
interact with others.
JS Modules to Components
● Separation of concerns
● Major framework (React, Angular, Vue
or <insert your framework here>)
use this concepts
Service Layers
● How to make our components communicate with the backend?
● Building boundaries with modules
● Each task needs to be encapsulated
● The component should not know more than what it requires
● Centralizes external access to data and functions
Service Layers
Publish - Subscribe Pattern
State Management
● Global application state or Local component state?
● Libraries for state management
○ Redux
○ MobX
○ Vuex
○ …
Example: Redux
Redux the popular state management library uses the publisher /
subscriber pattern
Redux - Publish Subscribe Pattern
User clicks
something
An action
triggers
Ok the state has
changed
Repaint where
state changes need
to be shown
Middleware Pattern (A Backend
Example)
Middleware Pattern
● Middlewares are written to be
composable, meaning that multiple
middleware functions can be run one
after the other
● Example: A logging middleware
● Popular Example: redux-thunk (dispatch
side-effects)
Multiple Middlewares Working Together
All That Aside: How do we
structure all these
patterns?
Early
days
Today
Structuring The Modules
● Better separation of concern
● Feature based
● Components bundled together
● Easy to understand (but you need to know a lot more)
But
Modules
Still
Don’t
Work on
Browser
s?
Build Tools (Webpack, Rollup, …)
Task Runners to Build Tools
Toda
y
Webpack
Configuration
● Build configuration as
per your environment
(production /
development)
● Use webpack plugins to
extend your
configuration
Final
Optimized
Output
Conclusion
● The JavaScript ecosystem is ever changing
● Adopt new changes along the way (not
necessarily follow the hype)
● JavaScript is moving to a functional /
modular approach with better frameworks,
libraries and build tools
● The ecosystem is getting better
● Cope along, follow the community
Thank You

Weitere ähnliche Inhalte

Was ist angesagt?

Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...OdessaJS Conf
 
React web development
React web developmentReact web development
React web developmentRully Ramanda
 
Business layer and transactions
Business layer and transactionsBusiness layer and transactions
Business layer and transactionsOndrej Mihályi
 
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...ddrschiw
 
Geek Time Juin 2016 : React
Geek Time Juin 2016 : ReactGeek Time Juin 2016 : React
Geek Time Juin 2016 : ReactOLBATI
 
Choosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our projectChoosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our projectHristo Chakarov
 
“Microservices: how to avoid making the same mistake twice.”
“Microservices: how to avoid making the same mistake twice.”“Microservices: how to avoid making the same mistake twice.”
“Microservices: how to avoid making the same mistake twice.”HYS Enterprise
 
Introduction to VB
Introduction to VBIntroduction to VB
Introduction to VBMukesh Das
 
Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Rocco Georgi
 
Export pdf with puppeteer
Export pdf with puppeteerExport pdf with puppeteer
Export pdf with puppeteerKnoldus Inc.
 
CQRS and Event Sourcing with PHP
CQRS and Event Sourcing with PHPCQRS and Event Sourcing with PHP
CQRS and Event Sourcing with PHPMarcelo Santos
 
CQRS and Event Sourcing with PHP - shorter version
CQRS and Event Sourcing with PHP - shorter versionCQRS and Event Sourcing with PHP - shorter version
CQRS and Event Sourcing with PHP - shorter versionMarcelo Santos
 

Was ist angesagt? (18)

Node.js basics
Node.js basicsNode.js basics
Node.js basics
 
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
Maciej Treder ''Angular Universal - a medicine for the Angular + SEO/CDN issu...
 
Android Architectures
Android ArchitecturesAndroid Architectures
Android Architectures
 
React web development
React web developmentReact web development
React web development
 
Business layer and transactions
Business layer and transactionsBusiness layer and transactions
Business layer and transactions
 
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
AD111 -- Harnessing the Power of Server-Side JavaScript and Other Advanced XP...
 
Geek Time Juin 2016 : React
Geek Time Juin 2016 : ReactGeek Time Juin 2016 : React
Geek Time Juin 2016 : React
 
Choosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our projectChoosing the right JavaScript library/framework/toolkit for our project
Choosing the right JavaScript library/framework/toolkit for our project
 
“Microservices: how to avoid making the same mistake twice.”
“Microservices: how to avoid making the same mistake twice.”“Microservices: how to avoid making the same mistake twice.”
“Microservices: how to avoid making the same mistake twice.”
 
Introduction to VB
Introduction to VBIntroduction to VB
Introduction to VB
 
Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007Frost - W3C Mobile Ajax Workshop 2007
Frost - W3C Mobile Ajax Workshop 2007
 
Web worker
Web workerWeb worker
Web worker
 
Lesson 09
Lesson 09Lesson 09
Lesson 09
 
AngularJS
AngularJSAngularJS
AngularJS
 
Gwt Presentation1
Gwt Presentation1Gwt Presentation1
Gwt Presentation1
 
Export pdf with puppeteer
Export pdf with puppeteerExport pdf with puppeteer
Export pdf with puppeteer
 
CQRS and Event Sourcing with PHP
CQRS and Event Sourcing with PHPCQRS and Event Sourcing with PHP
CQRS and Event Sourcing with PHP
 
CQRS and Event Sourcing with PHP - shorter version
CQRS and Event Sourcing with PHP - shorter versionCQRS and Event Sourcing with PHP - shorter version
CQRS and Event Sourcing with PHP - shorter version
 

Ähnlich wie FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns

Choosing your frontend web framework.pptx
Choosing your frontend web framework.pptxChoosing your frontend web framework.pptx
Choosing your frontend web framework.pptxAaliyanShaikh
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)Ofer Cohen
 
Flux architecture and Redux - theory, context and practice
Flux architecture and Redux - theory, context and practiceFlux architecture and Redux - theory, context and practice
Flux architecture and Redux - theory, context and practiceJakub Kocikowski
 
Jab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedJab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedOfer Cohen
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice frameworkFabrice Sznajderman
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesJumping Bean
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkAlive Kuo
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"LogeekNightUkraine
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxSHAIKIRFAN715544
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Fwdays
 
Understanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree TechnologiesUnderstanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree TechnologiesWalking Tree Technologies
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react nativeDani Akash
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptxSHAIKIRFAN715544
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React NativeEric Deng
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.jsEugene Vozniuk
 
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
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVMBoulos Dib
 

Ähnlich wie FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns (20)

Choosing your frontend web framework.pptx
Choosing your frontend web framework.pptxChoosing your frontend web framework.pptx
Choosing your frontend web framework.pptx
 
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)Joomla!Day Poland 2013 - Joomla Architecture  (Ofer Cohen)
Joomla!Day Poland 2013 - Joomla Architecture (Ofer Cohen)
 
The Road To Redux
The Road To ReduxThe Road To Redux
The Road To Redux
 
Flux architecture and Redux - theory, context and practice
Flux architecture and Redux - theory, context and practiceFlux architecture and Redux - theory, context and practice
Flux architecture and Redux - theory, context and practice
 
Jab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealedJab12 - Joomla! architecture revealed
Jab12 - Joomla! architecture revealed
 
Lagom : Reactive microservice framework
Lagom : Reactive microservice frameworkLagom : Reactive microservice framework
Lagom : Reactive microservice framework
 
React - The JavaScript Library for User Interfaces
React - The JavaScript Library for User InterfacesReact - The JavaScript Library for User Interfaces
React - The JavaScript Library for User Interfaces
 
JavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web frameworkJavascriptMVC: Another choice of web framework
JavascriptMVC: Another choice of web framework
 
Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"Andrii Sliusar "Module Architecture of React-Redux Applications"
Andrii Sliusar "Module Architecture of React-Redux Applications"
 
JavaFX in Action Part I
JavaFX in Action Part IJavaFX in Action Part I
JavaFX in Action Part I
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
 
Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"Viktor Turskyi "Effective NodeJS Application Development"
Viktor Turskyi "Effective NodeJS Application Development"
 
Understanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree TechnologiesUnderstanding React hooks | Walkingtree Technologies
Understanding React hooks | Walkingtree Technologies
 
Introduction to react native
Introduction to react nativeIntroduction to react native
Introduction to react native
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native20180518 QNAP Seminar - Introduction to React Native
20180518 QNAP Seminar - Introduction to React Native
 
Redux in Angular 2+
Redux in Angular 2+Redux in Angular 2+
Redux in Angular 2+
 
Decoupled drupal + vue.js
Decoupled drupal + vue.jsDecoupled drupal + vue.js
Decoupled drupal + vue.js
 
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
 
Introduction To MVVM
Introduction To MVVMIntroduction To MVVM
Introduction To MVVM
 

Kürzlich hochgeladen

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 

Kürzlich hochgeladen (20)

Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptxThe Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
The Fit for Passkeys for Employee and Consumer Sign-ins: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 

FRU Kathmandu: Adopting with Change Frontend Architecture and Patterns

  • 1. Adopting with Change: Frontend Architecture and Patterns MJT wwktm.c o
  • 2. Early Web and JavaScript ● AJAX based applications ● All JavaScript bundled into one file ● jQuery ● IIFEs everywhere ● Imperative code
  • 3. Moving to JS Modules No more IIFEs
  • 4. JS Modules in Brief ● ES6 syntax + New Features ● Creating smaller functions is easy ● Default exports / Named exports ● Import creates immutable bindings
  • 5. JS Modules to Components ● One component should focus on one section of the UI. ● Shouldn’t access another’s html directly. ● Encapsulates its Output(html), Style (css) and Functionality (javascript). ● Each component has some way to interact with others.
  • 6. JS Modules to Components ● Separation of concerns ● Major framework (React, Angular, Vue or <insert your framework here>) use this concepts
  • 7.
  • 8. Service Layers ● How to make our components communicate with the backend? ● Building boundaries with modules ● Each task needs to be encapsulated ● The component should not know more than what it requires ● Centralizes external access to data and functions
  • 10.
  • 11.
  • 13. State Management ● Global application state or Local component state? ● Libraries for state management ○ Redux ○ MobX ○ Vuex ○ …
  • 14. Example: Redux Redux the popular state management library uses the publisher / subscriber pattern
  • 15. Redux - Publish Subscribe Pattern User clicks something An action triggers Ok the state has changed Repaint where state changes need to be shown
  • 16. Middleware Pattern (A Backend Example)
  • 17. Middleware Pattern ● Middlewares are written to be composable, meaning that multiple middleware functions can be run one after the other ● Example: A logging middleware ● Popular Example: redux-thunk (dispatch side-effects)
  • 19. All That Aside: How do we structure all these patterns? Early days Today
  • 20. Structuring The Modules ● Better separation of concern ● Feature based ● Components bundled together ● Easy to understand (but you need to know a lot more)
  • 22. Build Tools (Webpack, Rollup, …)
  • 23. Task Runners to Build Tools Toda y
  • 24. Webpack Configuration ● Build configuration as per your environment (production / development) ● Use webpack plugins to extend your configuration
  • 26. Conclusion ● The JavaScript ecosystem is ever changing ● Adopt new changes along the way (not necessarily follow the hype) ● JavaScript is moving to a functional / modular approach with better frameworks, libraries and build tools ● The ecosystem is getting better ● Cope along, follow the community