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

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfjimielynbastida
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
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
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfngoud9212
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 

Recently uploaded (20)

Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Science&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdfScience&tech:THE INFORMATION AGE STS.pdf
Science&tech:THE INFORMATION AGE STS.pdf
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort ServiceHot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
Hot Sexy call girls in Panjabi Bagh 🔝 9953056974 🔝 Delhi escort Service
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
Transcript: #StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
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
 
Bluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdfBluetooth Controlled Car with Arduino.pdf
Bluetooth Controlled Car with Arduino.pdf
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 

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 !!