SlideShare a Scribd company logo
Best practices
FOR CREATING MODULAR WEB APPLICATIONS
Iliyan Peychev
HERE GmbH
@ipeychev
CHALLENGES
CHALLENGES
handling the Events
Subscribing and unsubscribing to events
Manipulating the dom
Manually? Virtual DOM? Re-DOM?
UNIT TESTS
Mock everything? Staying as close to the reality as possible?
maintaining the state
State might be spread among different services or components




CHALLENGES
OPTIMIZE APPLICATION
How to achieve maximum performance? Rendering on the server
too?
Integration and end2end tests
How do we keep them in sync with the code?
CONTINUOUS DEPLOYMENT AND DELIVERY
How easy is to make releases? How do we keep the documentation
in sync?
MAKING CHANGES TO THE SYSTEM
How to prevent the “Software rot”?




There is no silver bullet
Some of these challenges are technical, others aren’t
(Technical challenges are easier to solve)
FRAMEWORKS
Someone tells you how to write an application and
gives you the tools for writing it
FRAMEWORKS
and
libraries 2006
2010backbone
Model–view–presenter (MVP)
application design paradigm
YUI
Powerful and rich, deprecated now
jQuery
Shaped the model for writing
applications for years
2006
2011
2013
2010
react
Revolutionized the way Web
applications were built
ember
Model–view–viewmodel (MVVM) pattern
angular 1
Complete and rich, but complex and
hard for maintenance and support
FRAMEWORKS
and
libraries
2017
2016angular 2
Complete and rich, better than
Angular1
FRAMEWORKS
and
libraries
?
FUNDAMENTALS OF DESIGNING
YOUR APPLICATION ARCHITECTURE
COMPONENTS AND MODULES
WHAT IS A MODULE?
MODULE
A “module” is a piece of
functionality, which could be
plugged to the application,
replaced if needed and
possibly reused
a piece of functionality
A module consists from
one or more components
One component should
stay in one module
LET’S TAKE A LOOK AT THE REAL WORLD
COMPONENTS AND MODULES
Best practices for creating modular Web applications
Components
Modules
Modules
Best practices for creating modular Web applications
Best practices for creating modular Web applications
INTERNATIONAL SPACE STATION
International space station
International space station
Apply the same model to your
applications
(This is where things go wrong usually)
PRACTICAL GUIDELINES
features as modules
Separate the features of the application in modules
One module may consist from multiple components
The feature should be tested individually
Then included to the application
COMPONENTS
Prefer to create components, which only render data
Create a few components to maintain the state
They will provide data to the rendering components
When testing, mock the external dependencies
Avoid framework dependencies when possible
Try to make your classes framework agnostic
Then “glue” them to you framework of choice
maintaining the state
Maintaining the state properly is the key to keep the
whole application maintainable
Use Flux pattern and some implementation like
Redux, MobX, or write your own
Do not follow blindly
documentation/examples

Test each component separately
component 1
Module 2
Component 2 Component 3
Module 1
Component 4
   
}
}
Then test the whole system
component 1
Module 2
Component 2
Component 3
Module 1
Component 4



pack the
module and
distribute
It might be NPM
or any other
module system
SHARE CODE
Design the system
with the idea to
share code with
other people
Module systems
in JavaScript world
ES2015 Commonjs
module
systems
amd
Made popular
by Node, in
2013 they said
its dead
Standard, not
implemented in
the browsers
yet, but used
widely with
transpilers
Originally split
from
CommonJS, the
difference is the
async loading
ES2015
features
Re-exporting
Export an imported module
cyclic dependencies
better handled than in CommonJS
single default export
export function circle(x, y) {}
multiple named exports
export const sqrt = Math.sqrt;
CREATING MODULAR Web applications IN PRACTICE
Could be part of an Indoor Positioning System
Let’s create an application for
monitoring iBeacons in range
PARTS OF AN indoor positioning system
Venue maps
Indoor Radio Mapping tool
Detecting and monitoring Wi-Fi and Beacons
Positioning API
Location services/ End user applications

iBeacons
Location
Services
Indoor
detect send Enrich Anchor Services
Monitoring beacons
1 2
3 4
5 6
1 2 3 4 5 6
Architecture
Main parts of the system
 Mobile application
Mobile application created with ReactNative
 Web Application
Web application, created with React
 Storage
Data storage
 Server
NodeJS server to serve the Web application
Which parts could be reused?
The Communication with the server
Isolate it in a module
It could be implemented using WebSockets, WeDeploy, etc.

Location
Services
Indoor
Location
Services
Indoor
Detecting the beacons on iOS and android
Isolate the logic in modules with same API
and expose it to React Native
1 2
3 4
5 6
1 2
3 4
5 6
rendering the beacons on the screen
Isolate the logic in a module
1 2
3 4
5 6
1 2 3 4 5 6
More things
to considerMake the Web
application
isomorphic

Replacing the
communication
part on the fly

DEMO
Questions?
Thanks!
ipeychev
ipeychev

More Related Content

PPTX
Flutter session 01
DSC IEM
 
PPTX
Dependency Injection and Autofac
meghantaylor
 
PPTX
Adam Clegg - An alternative method for modelling flare emissions - DMUG17
IES / IAQM
 
PPT
Software Coding- Software Coding
Nikhil Pandit
 
PPT
Object Oriented Analysis and Design - Overview
rmk_rrj
 
PPTX
Google QUIC
Felipe Rayel
 
PDF
The Future is Modular, Jonathan Snook
Future Insights
 
PDF
Lean Microservices with OSGi - Christian Schneider
mfrancis
 
Flutter session 01
DSC IEM
 
Dependency Injection and Autofac
meghantaylor
 
Adam Clegg - An alternative method for modelling flare emissions - DMUG17
IES / IAQM
 
Software Coding- Software Coding
Nikhil Pandit
 
Object Oriented Analysis and Design - Overview
rmk_rrj
 
Google QUIC
Felipe Rayel
 
The Future is Modular, Jonathan Snook
Future Insights
 
Lean Microservices with OSGi - Christian Schneider
mfrancis
 

Similar to Best practices for creating modular Web applications (20)

PDF
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
PDF
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Enea Gabriel
 
PDF
Clean architecture with asp.net core
Sam Nasr, MCSA, MVP
 
PPT
Spring ppt
Mumbai Academisc
 
PDF
Stateful mock servers to the rescue on REST ecosystems
Nuno Caneco
 
PPTX
Twelve factor-app
José Javier Vélez Colón
 
PPTX
Twelve Factor - Designing for Change
Eric Wyles
 
PDF
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
VMware Tanzu
 
PPTX
Application Model for Cloud Deployment
Jim Kaskade
 
PPTX
MMS2011_BC34_Plas_Final
mentvanderplas
 
DOCX
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
 
DOCX
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
 
PPTX
Spring Framework Rohit
Rohit Prabhakar
 
PDF
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
PPT
Spring - a framework written by developers
MarcioSoaresPereira1
 
PPT
Developing applications using Embedded Rich Client Platform (eRCP)
Gorkem Ercan
 
PDF
Lublin Startup Festival - Mobile Architecture Design Patterns
Karol Szmaj
 
PPTX
"Up-Down Development & DSL-first approach", Владимир Мельник, DataArt
DataArt
 
PPTX
Ncrafts.io - Refactor your software architecture
Julien Lavigne du Cadet
 
PPT
Spring Framework
nomykk
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
Elements of DDD with ASP.NET MVC & Entity Framework Code First
Enea Gabriel
 
Clean architecture with asp.net core
Sam Nasr, MCSA, MVP
 
Spring ppt
Mumbai Academisc
 
Stateful mock servers to the rescue on REST ecosystems
Nuno Caneco
 
Twelve factor-app
José Javier Vélez Colón
 
Twelve Factor - Designing for Change
Eric Wyles
 
Tools and Recipes to Replatform Monolithic Apps to Modern Cloud Environments
VMware Tanzu
 
Application Model for Cloud Deployment
Jim Kaskade
 
MMS2011_BC34_Plas_Final
mentvanderplas
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
 
Actively looking for an opportunity to work as a challenging Dot Net Developer
Karthik Reddy
 
Spring Framework Rohit
Rohit Prabhakar
 
Spring Framework Tutorial | VirtualNuggets
Virtual Nuggets
 
Spring - a framework written by developers
MarcioSoaresPereira1
 
Developing applications using Embedded Rich Client Platform (eRCP)
Gorkem Ercan
 
Lublin Startup Festival - Mobile Architecture Design Patterns
Karol Szmaj
 
"Up-Down Development & DSL-first approach", Владимир Мельник, DataArt
DataArt
 
Ncrafts.io - Refactor your software architecture
Julien Lavigne du Cadet
 
Spring Framework
nomykk
 
Ad

More from peychevi (7)

PPTX
Client Extensions 101 - DEVCON 2023
peychevi
 
PDF
Extending Kubernetes with Operators
peychevi
 
PDF
Modern Web Developement
peychevi
 
PDF
Creating a WYSIWYG Editor with React
peychevi
 
PDF
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
peychevi
 
PDF
Implementing AutoComplete for Freemarker and Velocity languages in ACE Editor
peychevi
 
PDF
Dynamic User Interfaces for Desktop and Mobile
peychevi
 
Client Extensions 101 - DEVCON 2023
peychevi
 
Extending Kubernetes with Operators
peychevi
 
Modern Web Developement
peychevi
 
Creating a WYSIWYG Editor with React
peychevi
 
HTTP/2 and QUICK protocols. Optimizing the Web stack for HTTP/2 era
peychevi
 
Implementing AutoComplete for Freemarker and Velocity languages in ACE Editor
peychevi
 
Dynamic User Interfaces for Desktop and Mobile
peychevi
 
Ad

Recently uploaded (20)

PDF
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
PDF
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
PDF
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
PPTX
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
PDF
Queuing formulas to evaluate throughputs and servers
gptshubham
 
PPTX
22PCOAM21 Data Quality Session 3 Data Quality.pptx
Guru Nanak Technical Institutions
 
PPTX
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
PDF
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
PPTX
Inventory management chapter in automation and robotics.
atisht0104
 
PDF
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
PDF
Activated Carbon for Water and Wastewater Treatment_ Integration of Adsorptio...
EmilianoRodriguezTll
 
PDF
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
PDF
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
PDF
Software Testing Tools - names and explanation
shruti533256
 
PPTX
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
PPTX
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
PPT
Lecture in network security and mobile computing
AbdullahOmar704132
 
PDF
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
PPTX
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
PPTX
easa module 3 funtamental electronics.pptx
tryanothert7
 
flutter Launcher Icons, Splash Screens & Fonts
Ahmed Mohamed
 
July 2025: Top 10 Read Articles Advanced Information Technology
ijait
 
dse_final_merit_2025_26 gtgfffffcjjjuuyy
rushabhjain127
 
database slide on modern techniques for optimizing database queries.pptx
aky52024
 
Queuing formulas to evaluate throughputs and servers
gptshubham
 
22PCOAM21 Data Quality Session 3 Data Quality.pptx
Guru Nanak Technical Institutions
 
business incubation centre aaaaaaaaaaaaaa
hodeeesite4
 
2010_Book_EnvironmentalBioengineering (1).pdf
EmilianoRodriguezTll
 
Inventory management chapter in automation and robotics.
atisht0104
 
top-5-use-cases-for-splunk-security-analytics.pdf
yaghutialireza
 
Activated Carbon for Water and Wastewater Treatment_ Integration of Adsorptio...
EmilianoRodriguezTll
 
Principles of Food Science and Nutritions
Dr. Yogesh Kumar Kosariya
 
settlement FOR FOUNDATION ENGINEERS.pdf
Endalkazene
 
Software Testing Tools - names and explanation
shruti533256
 
EE3303-EM-I 25.7.25 electrical machines.pptx
Nagen87
 
MSME 4.0 Template idea hackathon pdf to understand
alaudeenaarish
 
Lecture in network security and mobile computing
AbdullahOmar704132
 
67243-Cooling and Heating & Calculation.pdf
DHAKA POLYTECHNIC
 
Module2 Data Base Design- ER and NF.pptx
gomathisankariv2
 
easa module 3 funtamental electronics.pptx
tryanothert7
 

Best practices for creating modular Web applications