SlideShare a Scribd company logo
Large Scale JavaScript
     applications
@alexbeletsky
http://beletsky.net
http://github.com/alexanderbeletsky
Big Credits to:

 Addy Osmani
 Addy Osmani is a rebel JavaScript blogger, speaker and a
 UI Developer for AOL (yes, we're still around!). He is also a
 member of the jQuery [Bug Triage/Docs/Front-end] teams
 where he assists with bugs, documentation and developer
 evangelism. His recent open-source projects include
 TodoMVC, which helps developers compare JavaScript
 MVC frameworks. For more on Addy’s work, check out his
 official website AddyOsmani.com for tutorials and
 magazines such as .net for his thoughts and commentaries
 on the state of the web.
JavaScript apps
   evolution
Early JavaScript application

●   Mainly for web design
●   Copy/Paste pattern commonly used
●   Very poor browser support
●   Lack of “community” knowledge base
●   Low performace
Modern JavaScript application

●   AJAX era started
●   Adoption and respect by masses
●   Huge improvement on standard and vendors
●   Performance boosted
●   New web assembly language
●   Expertice & Best practices
Modern web app: GMail
Modern web app: Yandex Maps
Modern web app: Debitoor
“Modern web apps
tend to be more (or
equaly) complex
on front end
rather on back end”
In fact,

JavaScript language
is important...

Front-end development
could be complex...
What is Large scale app?


“In my view, large-scale JavaScript apps are non-
trivial applications requiring significant developer
effort to maintain, where most heavy lifting of data
manipulation and display falls to the browser.”

                                  - Addy Osmani
Complexity is handled by
applying architectural
approach
Patterns &
Frameworks
Namespace
  Module
    Facade
       Mediator
          Observer
Namespace pattern
 “Namespacing is a technique employed to avoid
 collisions with other objects or variables in the global
 namespace”


 Goal: avoid names collision and provide facilities
 to organize blocks of functionality into easily
 managable groups
Namespace pattern implementation
Namespace
  Module
    Facade
       Mediator
          Observer
Module pattern
 “The module pattern is a popular design that pattern that
 encapsulates 'privacy', state and organization using
 closures”


 Goal: It provides a way of wrapping a mix of
 public and private methods and variables,
 protecting pieces from leaking into the global
 scope and accidentally colliding with another
 developer's interface
Module pattern implementation
Namespace
  Module
    Facade
       Mediator
          Observer
Facade pattern
 “ The facade pattern provides a convenient higher-level
 interface to a larger body of code, hiding its true
 underlying complexity. Think of it as simplifying the API
 being presented to other developers”
 Goal: to hide implementation-specific details
 about a body of functionality contained in
 individual modules. The implementation of a
 module can change without the clients really
 even knowing about it.
Facade pattern implementation
Facade pattern implementation




           Provides the open API for the rest of the
           application
Namespace
  Module
    Facade
       Mediator
          Observer
Mediator pattern
 “ The mediator is a behavioral design pattern that allows
 us to expose a unified interface through which the
 different parts of a system may communicate”
 Goal: promotes loose coupling by ensuring that
 instead of components referring to each other
 explicitly, their interaction is handled through
 this central point. This can help us decouple
 systems and improve the potential for component
 reusability.
Mediator pattern implementation
Facade pattern implementation




            Subscribe for particular event / Publish
            this event
Namespace
  Module
    Facade
       Mediator
          Observer
Observer pattern
 “ The Observer is a design pattern which allows an object
 (known as a subscriber) to watch another object (the
 publisher), where we provide a means for the subscriber
 and publisher form a listen and broadcast relationship”
 Goal: the promotion of loose coupling. Rather
 than single objects calling on the methods of
 other objects directly, they instead subscribe to a
 specific task or activity of another object and are
 notified when it occurs.
Observer pattern implementation




                  https://gist.github.com/661855
Observer pattern implementation
RequireJS and AMD
RequireJS: file and module loader
RequreJS: Usage example
RequireJS: Main script
RequireJS uses
Asynchronous Module
Definition
to load modules
AMD: module example
Putting thing
  together
Proposed Architecture


       Module            Facade         Mediator


          RequireJS                   AMD



●   Loosely coupled
●   Broken into independent modules
●   Flexible (framework agnostic)
Demo application
backbone-aura
Further reading:
●   Learning JavaScript Design Patterns
    http://addyosmani.com/resources/essentialjsdesignpatterns/book/

●   Patterns For Large-Scale JavaScript Application
    Architecture
    http://addyosmani.com/largescalejavascript

●   Writing Modular JavaScript With AMD,
    CommonJS & ES Harmony
    http://addyosmani.com/writing-modular-js/

●   Scalable JavaScript Application Architecture
    http://www.youtube.com/watch?v=vXjVFPosQHw&feature=youtu.be
Thank you.

http://beletsky.net
@alexbeletsky

More Related Content

PDF
Structuring web applications with Backbone.js
PPTX
Javascrip frameworks
PDF
Micro frontends
PDF
JS Framework Comparison - An infographic
PPTX
Latest Javascript MVC & Front End Frameworks 2017
PPTX
Frontend War: Angular vs React vs Vue
PDF
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
PPTX
Difference between-angular js-nodejs
Structuring web applications with Backbone.js
Javascrip frameworks
Micro frontends
JS Framework Comparison - An infographic
Latest Javascript MVC & Front End Frameworks 2017
Frontend War: Angular vs React vs Vue
Dicoding Developer Coaching #34: Android | Modular Android App dengan Dynamic...
Difference between-angular js-nodejs

What's hot (20)

PPT
Javascript Frameworks
PDF
Vue3: nuove funzionalità, differenze e come migrare
PPTX
ngStockholm #8 at NetEnt - Micro Frontend Architecture
PDF
Modern UI Architecture_ Trends and Technologies in Web Development
PDF
State of Micro Frontend
PPT
PDF
Developing WordPress Plugins : For Begineers
PDF
FEVR - Micro Frontend
PPTX
Difference between MVC 3, 4, 5 and 6
PPT
Comparative analysis of java script framework
PDF
Micro Frontends Architecture - Jitendra kumawat (Guavus)
PDF
AngularJS: A framework to make your life easier
PPTX
Angular,react,vue
PPTX
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
PDF
Developing SPI applications using Grails and AngularJS
PPTX
Single-page applications and Grails
PDF
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
PDF
Understanding Microservices
PPTX
Creating Tomorrow’s Web Applications Using Today’s Technologies
PPTX
Javascript Frameworks
Vue3: nuove funzionalità, differenze e come migrare
ngStockholm #8 at NetEnt - Micro Frontend Architecture
Modern UI Architecture_ Trends and Technologies in Web Development
State of Micro Frontend
Developing WordPress Plugins : For Begineers
FEVR - Micro Frontend
Difference between MVC 3, 4, 5 and 6
Comparative analysis of java script framework
Micro Frontends Architecture - Jitendra kumawat (Guavus)
AngularJS: A framework to make your life easier
Angular,react,vue
Shift Remote FRONTEND: Micro Frontend Architecture: A Look Into the Future - ...
Developing SPI applications using Grails and AngularJS
Single-page applications and Grails
Angular vs React vs Vue | Javascript Frameworks Comparison | Which One You Sh...
Understanding Microservices
Creating Tomorrow’s Web Applications Using Today’s Technologies
Ad

Viewers also liked (7)

PPT
Максим Дорофеев, выступление на DEV Labs 2010 в Киеве про GTD
PPT
Максим Дорофеев, выступление на DEV Labs 2010 в Киеве про цифры и прогнозы в ...
PDF
Балансируем развитие продукта и баги
PDF
Project Manager - Глупая идея
PPTX
Дмитрий Коткин «Коварство манипуляций. Жесткие переговоры под маской дружелюб...
PPTX
Цель, модель и все такое
PPTX
Диаграмма разрешения конфликтов
Максим Дорофеев, выступление на DEV Labs 2010 в Киеве про GTD
Максим Дорофеев, выступление на DEV Labs 2010 в Киеве про цифры и прогнозы в ...
Балансируем развитие продукта и баги
Project Manager - Глупая идея
Дмитрий Коткин «Коварство манипуляций. Жесткие переговоры под маской дружелюб...
Цель, модель и все такое
Диаграмма разрешения конфликтов
Ad

Similar to Александр Белецкий "Архитектура Javascript приложений" (20)

PDF
Building Scalable JavaScript Apps
PPTX
Javascript frameworks
PPT
Top java script frameworks ppt
PPT
Design pattern
PDF
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
PPTX
9 Best JavaScript Frameworks To Choose
PPTX
Trending Popular JavaScript Frameworks.pptx
PDF
Node.js Development Tools
DOCX
Top 10 Javascript Frameworks For Easy Web Development
DOCX
Effective Use of React, Angular & Vue.js
PDF
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
DOCX
A report on mvc using the information
PPT
Design patterns
PDF
Developing large scale JavaScript applications
PPT
Blast Mojo Overview
PDF
Selecting the Best Javascript Web Framework
PDF
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
PDF
Getting Started with Spring Framework
PPTX
Software Architecture for Agile Development
PPTX
Micro-Frontends JSVidCon
Building Scalable JavaScript Apps
Javascript frameworks
Top java script frameworks ppt
Design pattern
Why do JavaScript enthusiast think of Vue.js for building real-time web appli...
9 Best JavaScript Frameworks To Choose
Trending Popular JavaScript Frameworks.pptx
Node.js Development Tools
Top 10 Javascript Frameworks For Easy Web Development
Effective Use of React, Angular & Vue.js
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
A report on mvc using the information
Design patterns
Developing large scale JavaScript applications
Blast Mojo Overview
Selecting the Best Javascript Web Framework
Comparing AngularJS and ReactJS_ Finding the Best Framework for your Next Pro...
Getting Started with Spring Framework
Software Architecture for Agile Development
Micro-Frontends JSVidCon

More from Agile Base Camp (20)

PDF
Алексей Колупаев "За что ещё платят менеджеру?"
KEY
Сергей Кудряшов "Делайте продукт и ничего более"
PDF
Максим Ткачук "Hard Rock Design"
PPTX
Daniel Lewis "How to build a motivational system"
PPTX
Мark Phillips "Intoduction to Silicon Valley"
PPTX
JDaniel Lewis "How to build a motivational system"
PPTX
Алексей Колупаев "Неочевидная разница между фальстартом, стартапом и страпоном"
PDF
Боремся со сложностью по-функциональному
PDF
Саша Белецкий "Continuous Delivery в продуктовой разработке"
PDF
Brad Hoover "Differences between building a consumer vs. enterprise product"
PDF
Сергей Кудряшов "Небольшие команды побеждают мир"
ODP
Решение коммуникативных проблем в распределенных командах
PDF
Deadline management
PDF
Paper prototyping
PPTX
Роман Чернышев “Организационные риски в коммерческих проектах”
PPT
Игорь Лужанский - Динамика развития отношений в команде разработчиков
PPTX
Nadia Zemskova - Invention of bicycle
PPT
Yuriy malyi testinginscrumagile
PPT
Testing in Scrum - Yuriy Malyi
PDF
Доклад Гапонова "За двумя требованиями погонишься"
Алексей Колупаев "За что ещё платят менеджеру?"
Сергей Кудряшов "Делайте продукт и ничего более"
Максим Ткачук "Hard Rock Design"
Daniel Lewis "How to build a motivational system"
Мark Phillips "Intoduction to Silicon Valley"
JDaniel Lewis "How to build a motivational system"
Алексей Колупаев "Неочевидная разница между фальстартом, стартапом и страпоном"
Боремся со сложностью по-функциональному
Саша Белецкий "Continuous Delivery в продуктовой разработке"
Brad Hoover "Differences between building a consumer vs. enterprise product"
Сергей Кудряшов "Небольшие команды побеждают мир"
Решение коммуникативных проблем в распределенных командах
Deadline management
Paper prototyping
Роман Чернышев “Организационные риски в коммерческих проектах”
Игорь Лужанский - Динамика развития отношений в команде разработчиков
Nadia Zemskova - Invention of bicycle
Yuriy malyi testinginscrumagile
Testing in Scrum - Yuriy Malyi
Доклад Гапонова "За двумя требованиями погонишься"

Recently uploaded (20)

PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PPT
Teaching material agriculture food technology
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
Programs and apps: productivity, graphics, security and other tools
PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Machine learning based COVID-19 study performance prediction
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
cuic standard and advanced reporting.pdf
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Teaching material agriculture food technology
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Unlocking AI with Model Context Protocol (MCP)
MIND Revenue Release Quarter 2 2025 Press Release
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
The Rise and Fall of 3GPP – Time for a Sabbatical?
Digital-Transformation-Roadmap-for-Companies.pptx
Programs and apps: productivity, graphics, security and other tools
20250228 LYD VKU AI Blended-Learning.pptx
Machine learning based COVID-19 study performance prediction
Building Integrated photovoltaic BIPV_UPV.pdf
sap open course for s4hana steps from ECC to s4
Advanced methodologies resolving dimensionality complications for autism neur...
Encapsulation_ Review paper, used for researhc scholars
cuic standard and advanced reporting.pdf
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Diabetes mellitus diagnosis method based random forest with bat algorithm
Profit Center Accounting in SAP S/4HANA, S4F28 Col11

Александр Белецкий "Архитектура Javascript приложений"