SlideShare a Scribd company logo
1 of 31
Frontend Architecture
Design for Large(r) team
CHADCHAPOL VITTAVUTKARNVEJ (JEMMY)
Questions & Discussions
Due to the time limit, let’s talk after the session
Self Introduction
Chadchapol Vittavutkarnvej (Jemmy)
◦ Siberian Husky fan
◦ Software engineer
◦ Occasional technical speaker & writer
Contact
◦ https://www.linkedin.com/in/chadchapol/
◦ https://twitter.com/ijemmy
Why should I care?
More developers to touch frontend code
◦ Frontend is getting more complex
◦ Static -> Dynamic -> Ajax -> Responsive -> SPA -> Progressive
◦ More full-stack developers
More developers = less productivity
In this session:
◦ Generalized patterns & how they evolved due to the team size
◦ (Usual) Pros & Cons of each patterns
#1 Server-generated frontend
Characteristics:
◦ Server generated JavaScript/HTML content
◦ Cannot build/run separately
Generated HTML Content
Generated JavaScript
Cons
Tightly coupled
◦ “Backend is broken again, I have to work on last week’s commit”
◦ “Let’s create backend first”
Frontend development speed
◦ “I have to wait for 1 minutes to test 1 line of JavaScript change”
Unit testing
◦ “It takes me 5 times of coding to write tests”
Reusability
◦ “How can we get data from the new mobile app?”
Performance
◦ “We cannot utilize CDN much”
Pros?
Yes, there are!!
#2 Separated-Frontend Pattern
Characteristics:
◦ Frontend code is separated from Backend code
◦ Might live in a different repository
◦ (Mostly) Served as static resources
◦ Data passing via AJAX
In practice…
Static
Content
server
In action…
Browser Backend
CDN
Index.
html
JS
CSS
Browser BackendProxy
Index.
html
JS
CSS
Pros
Loose coupling
◦ “My frontend can run on mock API”
◦ “Let’s add a new mock response to test that error”
Frontend development speed
◦ “Livereload tool refreshes the page immediately”
Unit testing
◦ “I still hate writing unit tests, but still suffer less”
Reusability
◦ “Let’s check our existing API and see what we could tweak for mobile team”
Performance
◦ “Most of our resources are static. We can cache at CDN”
Design trade-off: Server-generated index
page?
Static
◦ (+) Frontend can live in a separate repository
◦ (+) (slightly) Less load on server
◦ (+) Easier to adopt Serverless approach
◦ (-) Extra Ajax call for initial data
Server-generated
◦ (+) Have all required initial data => no one extra Ajax call
◦ (+) Easier to A/B Testing
◦ (-) Not fully separated, people usually inject global variable
What about 10, 15, 20 developers?
Regression
◦ “Oops, I broke your feature again today. That was unintentional, really…”
Conflicts
◦ “Why do always we change the same file?”
Dependencies
◦ “Please don’t make any change in your code while I’m working on this”
1. Continuous Integration
CI Server
CI Software
Version Control
Repository
(Git, SVN, etc.)
commit/push Trigger
• Build (Lint, concat, uglify)
• Unit test (+ coverage check)
• Integration test
• End to end test
What are the challenges when
you have a large team doing CI?
CI with many developer
~3 people commit in the same integration window
◦ The build fails…
◦ Who broke the integation?
Troubleshooting when Integration is
broken
CI Server
CI Software
Version Control
Repository
(Git, SVN, etc.)
commit/push Trigger
• Build (Lint, concat, uglify)
• Unit test (+ coverage check)
• Integration test
• End to end test
Troubleshooting when Integration is
broken
CI Server
CI Software
Version Control
Repository
(Git, SVN, etc.)
commit/push Trigger
• Build (Lint, concat, uglify)
• Unit test (+ coverage check)
• Integration test
• End to end test
Troubleshooting when Integration is
broken
CI Server
CI Software
Version Control
Repository
(Git, SVN, etc.)
commit/push Trigger
• Build (Lint, concat, uglify)
• Unit test (+ coverage check)
• Integration test
• End to end test
2. Separate modules by repository
Result:
◦ Force developers to design clear interface between module (loose coupling)
◦ Each module has their own unit and partial integration test
◦ Each repository can become an NPM module which we could manage the version dependency
Problem:
◦ How are we going to integrate them into a single site?
#3 MicroPage Pattern
Characteristics:
◦ Not SPA
◦ Each team own page(s)
◦ Each page passes data via
◦ Backend
◦ Cookies
◦ Get/Post params
MicroPages - Pros
1. Full autonomy
◦ Technology
◦ Module1 uses React, Module2 uses Angular2, Module3 uses jQuery + Bootstrap
◦ Building/Testing
2. Less communication b/w page = Loose coupling
3. Simple module integration
4. Microservice soulmate
MicroPages - Con
1. Handling duplication
◦ Duplicated features: Header (auth/login), Menu bar, Footer, CSRF, Ajax call, Data Model
2. Inconsistent UI and UX
◦ ex. Button, Modal, Date Picker, Page Layout, Alignment, Loader, etc.
3. Page refresh
◦ UX
◦ More resources to load (ex. Angular, React, jQuery)
4. Sharing data between modules
#4 Portal and Widgets Pattern
Characteristics:
◦ Each team own Widget(s)
◦ Portal handles common features
◦ Each widget passes data via
◦ Backend
◦ Portal
Visualize
Portal and Widget - Pros
1. Centralized control
◦ Can force all widgets to use same library/convention (if not iframe)
2. Consistent UI/UX
3. Can use SPA
4. Easier to share data between modules
◦ Portal as a message broker (pub/sub)
Portal and Widget - Cons
1. Widgets depends on Portal feature, except:
◦ Mocked index page
◦ Iframe
2. Complicated integration
◦ Integration test on module level requires Portal
3. Requires careful control of libraries & modules’ versions
Recap
Bottom Lines
In practice, the multiple patterns are usually applied
◦ ex. Facebook
Design is a trade-off. I hope this will help you in your future project !!

More Related Content

What's hot

React brief introduction
React brief introductionReact brief introduction
React brief introductionPrograils.com
 
Bundling your front-end with Webpack
Bundling your front-end with WebpackBundling your front-end with Webpack
Bundling your front-end with WebpackDanillo Corvalan
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks ComparisonDeepu S Nath
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejsVaisakh Babu
 
[Mas 500] Web Basics
[Mas 500] Web Basics[Mas 500] Web Basics
[Mas 500] Web Basicsrahulbot
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS LimitationsValeri Karpov
 
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJSSrijan Technologies
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupMarakana Inc.
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02Paul Bele
 
One step in the future: CSS variables
One step in the future: CSS variablesOne step in the future: CSS variables
One step in the future: CSS variablesGiacomo Zinetti
 
Lessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMLessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMValeri Karpov
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015Valeri Karpov
 
A New Vue for Web Development
A New Vue for Web DevelopmentA New Vue for Web Development
A New Vue for Web DevelopmentChad Campbell
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveChris O'Brien
 
Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondSpike Brehm
 
React - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVCReact - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVCStfalcon Meetups
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesedm00se
 

What's hot (20)

React brief introduction
React brief introductionReact brief introduction
React brief introduction
 
Bundling your front-end with Webpack
Bundling your front-end with WebpackBundling your front-end with Webpack
Bundling your front-end with Webpack
 
Intro to Vue
Intro to Vue Intro to Vue
Intro to Vue
 
Javascript Frameworks Comparison
Javascript Frameworks ComparisonJavascript Frameworks Comparison
Javascript Frameworks Comparison
 
Web development using nodejs
Web development using nodejsWeb development using nodejs
Web development using nodejs
 
[Mas 500] Web Basics
[Mas 500] Web Basics[Mas 500] Web Basics
[Mas 500] Web Basics
 
Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
 
An Overview on Nuxt.js
An Overview on Nuxt.jsAn Overview on Nuxt.js
An Overview on Nuxt.js
 
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
[Srijan Wednesday Webinars] Developing Large Scale Applications in AngularJS
 
JClouds at San Francisco Java User Group
JClouds at San Francisco Java User GroupJClouds at San Francisco Java User Group
JClouds at San Francisco Java User Group
 
Introduction to Vue.js DevStaff Meetup 13.02
Introduction to Vue.js  DevStaff Meetup 13.02Introduction to Vue.js  DevStaff Meetup 13.02
Introduction to Vue.js DevStaff Meetup 13.02
 
One step in the future: CSS variables
One step in the future: CSS variablesOne step in the future: CSS variables
One step in the future: CSS variables
 
Lessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODMLessons in Open Source from the MongooseJS ODM
Lessons in Open Source from the MongooseJS ODM
 
MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015MongoDB MEAN Stack Webinar October 7, 2015
MongoDB MEAN Stack Webinar October 7, 2015
 
MEAN Stack
MEAN StackMEAN Stack
MEAN Stack
 
A New Vue for Web Development
A New Vue for Web DevelopmentA New Vue for Web Development
A New Vue for Web Development
 
SharePoint Ribbon Deep Dive
SharePoint Ribbon Deep DiveSharePoint Ribbon Deep Dive
SharePoint Ribbon Deep Dive
 
Building a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and BeyondBuilding a Single-Page App: Backbone, Node.js, and Beyond
Building a Single-Page App: Backbone, Node.js, and Beyond
 
React - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVCReact - поглянемо по іншому на V в MVC
React - поглянемо по іншому на V в MVC
 
BP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPagesBP101: A Modernized Workflow w/ Domino/XPages
BP101: A Modernized Workflow w/ Domino/XPages
 

Similar to Frontend architecture design for large(r) team final

State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conferencedmethvin
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project Elad Hirsch
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...Malin Weiss
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...Speedment, Inc.
 
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
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JSFestUA
 
Scalable server component using NodeJS & ExpressJS
Scalable server component using NodeJS & ExpressJSScalable server component using NodeJS & ExpressJS
Scalable server component using NodeJS & ExpressJSAndhy Koesnandar
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Jeremy Likness
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsAndrew Ferrier
 
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)Tech in Asia ID
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleDmytro Semenov
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahiericjamesblackburn
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesDeeptiJava
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeededm00se
 

Similar to Frontend architecture design for large(r) team final (20)

Project Timbit
Project TimbitProject Timbit
Project Timbit
 
State of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront ConferenceState of jQuery - AspDotNetStorefront Conference
State of jQuery - AspDotNetStorefront Conference
 
AngularJS - Architecture decisions in a large project 
AngularJS - Architecture decisionsin a large project AngularJS - Architecture decisionsin a large project 
AngularJS - Architecture decisions in a large project 
 
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
How to JavaOne 2016 - Generate Customized Java 8 Code from Your Database [TUT...
 
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
JavaOne2016 - How to Generate Customized Java 8 Code from Your Database [TUT4...
 
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
 
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
JS Fest 2019/Autumn. Влад Федосов. Technology agnostic microservices at SPA f...
 
Scalable server component using NodeJS & ExpressJS
Scalable server component using NodeJS & ExpressJSScalable server component using NodeJS & ExpressJS
Scalable server component using NodeJS & ExpressJS
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
 
18_Node.js.ppt
18_Node.js.ppt18_Node.js.ppt
18_Node.js.ppt
 
Dust.js
Dust.jsDust.js
Dust.js
 
Node azure
Node azureNode azure
Node azure
 
Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!Single Page Applications: Your Browser is the OS!
Single Page Applications: Your Browser is the OS!
 
Building Real-World Dojo Web Applications
Building Real-World Dojo Web ApplicationsBuilding Real-World Dojo Web Applications
Building Real-World Dojo Web Applications
 
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
 
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
"You Don't Know NODE.JS" by Hengki Mardongan Sihombing (Urbanhire)
 
Node.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scaleNode.js Web Apps @ ebay scale
Node.js Web Apps @ ebay scale
 
Test Automation with Twist and Sahi
Test Automation with Twist and SahiTest Automation with Twist and Sahi
Test Automation with Twist and Sahi
 
Generating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status CodesGenerating the Server Response: HTTP Status Codes
Generating the Server Response: HTTP Status Codes
 
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
AD113  Speed Up Your Applications w/ Nginx and PageSpeedAD113  Speed Up Your Applications w/ Nginx and PageSpeed
AD113 Speed Up Your Applications w/ Nginx and PageSpeed
 

Recently uploaded

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdfChristopherTHyatt
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEarley Information Science
 

Recently uploaded (20)

Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Evaluating the top large language models.pdf
Evaluating the top large language models.pdfEvaluating the top large language models.pdf
Evaluating the top large language models.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptxEIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
EIS-Webinar-Prompt-Knowledge-Eng-2024-04-08.pptx
 

Frontend architecture design for large(r) team final

  • 1. Frontend Architecture Design for Large(r) team CHADCHAPOL VITTAVUTKARNVEJ (JEMMY)
  • 2. Questions & Discussions Due to the time limit, let’s talk after the session
  • 3. Self Introduction Chadchapol Vittavutkarnvej (Jemmy) ◦ Siberian Husky fan ◦ Software engineer ◦ Occasional technical speaker & writer Contact ◦ https://www.linkedin.com/in/chadchapol/ ◦ https://twitter.com/ijemmy
  • 4. Why should I care? More developers to touch frontend code ◦ Frontend is getting more complex ◦ Static -> Dynamic -> Ajax -> Responsive -> SPA -> Progressive ◦ More full-stack developers More developers = less productivity In this session: ◦ Generalized patterns & how they evolved due to the team size ◦ (Usual) Pros & Cons of each patterns
  • 5. #1 Server-generated frontend Characteristics: ◦ Server generated JavaScript/HTML content ◦ Cannot build/run separately
  • 8. Cons Tightly coupled ◦ “Backend is broken again, I have to work on last week’s commit” ◦ “Let’s create backend first” Frontend development speed ◦ “I have to wait for 1 minutes to test 1 line of JavaScript change” Unit testing ◦ “It takes me 5 times of coding to write tests” Reusability ◦ “How can we get data from the new mobile app?” Performance ◦ “We cannot utilize CDN much”
  • 10. #2 Separated-Frontend Pattern Characteristics: ◦ Frontend code is separated from Backend code ◦ Might live in a different repository ◦ (Mostly) Served as static resources ◦ Data passing via AJAX
  • 13. Pros Loose coupling ◦ “My frontend can run on mock API” ◦ “Let’s add a new mock response to test that error” Frontend development speed ◦ “Livereload tool refreshes the page immediately” Unit testing ◦ “I still hate writing unit tests, but still suffer less” Reusability ◦ “Let’s check our existing API and see what we could tweak for mobile team” Performance ◦ “Most of our resources are static. We can cache at CDN”
  • 14. Design trade-off: Server-generated index page? Static ◦ (+) Frontend can live in a separate repository ◦ (+) (slightly) Less load on server ◦ (+) Easier to adopt Serverless approach ◦ (-) Extra Ajax call for initial data Server-generated ◦ (+) Have all required initial data => no one extra Ajax call ◦ (+) Easier to A/B Testing ◦ (-) Not fully separated, people usually inject global variable
  • 15. What about 10, 15, 20 developers? Regression ◦ “Oops, I broke your feature again today. That was unintentional, really…” Conflicts ◦ “Why do always we change the same file?” Dependencies ◦ “Please don’t make any change in your code while I’m working on this”
  • 16. 1. Continuous Integration CI Server CI Software Version Control Repository (Git, SVN, etc.) commit/push Trigger • Build (Lint, concat, uglify) • Unit test (+ coverage check) • Integration test • End to end test
  • 17. What are the challenges when you have a large team doing CI?
  • 18. CI with many developer ~3 people commit in the same integration window ◦ The build fails… ◦ Who broke the integation?
  • 19. Troubleshooting when Integration is broken CI Server CI Software Version Control Repository (Git, SVN, etc.) commit/push Trigger • Build (Lint, concat, uglify) • Unit test (+ coverage check) • Integration test • End to end test
  • 20. Troubleshooting when Integration is broken CI Server CI Software Version Control Repository (Git, SVN, etc.) commit/push Trigger • Build (Lint, concat, uglify) • Unit test (+ coverage check) • Integration test • End to end test
  • 21. Troubleshooting when Integration is broken CI Server CI Software Version Control Repository (Git, SVN, etc.) commit/push Trigger • Build (Lint, concat, uglify) • Unit test (+ coverage check) • Integration test • End to end test
  • 22. 2. Separate modules by repository Result: ◦ Force developers to design clear interface between module (loose coupling) ◦ Each module has their own unit and partial integration test ◦ Each repository can become an NPM module which we could manage the version dependency Problem: ◦ How are we going to integrate them into a single site?
  • 23. #3 MicroPage Pattern Characteristics: ◦ Not SPA ◦ Each team own page(s) ◦ Each page passes data via ◦ Backend ◦ Cookies ◦ Get/Post params
  • 24. MicroPages - Pros 1. Full autonomy ◦ Technology ◦ Module1 uses React, Module2 uses Angular2, Module3 uses jQuery + Bootstrap ◦ Building/Testing 2. Less communication b/w page = Loose coupling 3. Simple module integration 4. Microservice soulmate
  • 25. MicroPages - Con 1. Handling duplication ◦ Duplicated features: Header (auth/login), Menu bar, Footer, CSRF, Ajax call, Data Model 2. Inconsistent UI and UX ◦ ex. Button, Modal, Date Picker, Page Layout, Alignment, Loader, etc. 3. Page refresh ◦ UX ◦ More resources to load (ex. Angular, React, jQuery) 4. Sharing data between modules
  • 26. #4 Portal and Widgets Pattern Characteristics: ◦ Each team own Widget(s) ◦ Portal handles common features ◦ Each widget passes data via ◦ Backend ◦ Portal
  • 28. Portal and Widget - Pros 1. Centralized control ◦ Can force all widgets to use same library/convention (if not iframe) 2. Consistent UI/UX 3. Can use SPA 4. Easier to share data between modules ◦ Portal as a message broker (pub/sub)
  • 29. Portal and Widget - Cons 1. Widgets depends on Portal feature, except: ◦ Mocked index page ◦ Iframe 2. Complicated integration ◦ Integration test on module level requires Portal 3. Requires careful control of libraries & modules’ versions
  • 30. Recap
  • 31. Bottom Lines In practice, the multiple patterns are usually applied ◦ ex. Facebook Design is a trade-off. I hope this will help you in your future project !!