SlideShare a Scribd company logo
Highload JavaScript Framework without Inheritance
Highload JavaScript Framework without Inheritance
Project
 Front-end – UI widgets
 Back-end – services & DB (.Net, MSSQL,
MongoDB), several stand-alone systems that
interact with each other
 Integration with sites of 70+ brands
Project
 Integration with sites of 70+ brands
New cool open source lib
var originalAddEventListener = window.addEventListener;
window.addEventListener = function (){
// some code with from time to time error
originalAddEventListener.apply(/*...*/);
}
Styles overriding
.brandsPage .widgedContainer .linksContainer .superLink.a {
color: red;
}
.superLink.a {
color: red !important;
}
Widgets’ Versions
 Pros:
 We can change everything in new version
 Back compatibility
 Safe deployment to production
 Cons:
 Bugs should be fixed in all version
 Need to force 70+ brands to update widgets version
 We need to support old versions due to the “slowpoke”
brands
Inheritance in JS
if (typeof Object.create !== 'function') {
Object.create = function (o) {
function F() {}
F.prototype = o;
return new F();
};
}
newObject = Object.create(oldObject);
Widget
var TestWidget = (function (){
// ...
// $this - $this.context, $this,settings, ...
// $core
// $, _, Modernizr, ...
return {
render: function (container,
onComplete, isReload){
// ...
onComplete()
}
};
})();
Widget’s usage
OurFramework.createWidget('TestWidget', {
setting1: true,
setting2: "light",
containerId: "testWidget"}, function(widget) {
widget.doSomething(10, "20");
});
OurFramework.addEventListener('UserBar.Login.onLoggedIn',
function(event, object){
// ...
});
Internal widgets
OurFramework.createWidget('UserBar', {
setting1: true,
setting2: "light",
elements: [
{id: 'Login', settings: { /* ... */ }},
{id: 'ShareLinks', settings: { /* ... */ }},
// ...
]
});
Communication
 Events, global for widgets
 Events, bubbling up to the parent
Context
 Widget has access to the cloned context
 On context’s change – reload widgets
 Context’s caching to localStorage
High load?
 AKAMAI rocks
 Report tracking (via pixel)
 Local storage and 3-r party APIs
 AppDynamics & other server profilers
 Client-side profiling
 Jmeter load tests
 Anti spam for comments
 Jasmine
 UI tests - selenium
 Mobile optimized (O_OP is here)
Plans
 Client-side error tracking
 Move more stuff to front-end
 OOP
 MVC
A Slide with no useful
Information at all
 Just filling the gap between previous slide and the
next one (which will be along in just a moment).
 No need to write it down, unless you feel
completed to do so.
 Nothing on this slide is examinable.
 In fact I’m not really sure why I bothered with it.
Highload JavaScript Framework without Inheritance
Highload JavaScript Framework without Inheritance

More Related Content

PDF
Improve monitoring and observability for kubernetes with oss tools
PDF
Kubernetes and Docker Native Deployment Patterns for WSO2 Enterprise Integrator
PDF
Make your animations perform well - Anna Migas - Codemotion Rome 2017
PPTX
Angular 4 Introduction Tutorial
PPTX
Angular 2 and Wijmo 5 - GrapeCity Echo 2016 Tokyo
PDF
Beautifying the Beautiful: Theming WSO2 API Manager
PDF
Dockerize Your Project - GDGBogor
Improve monitoring and observability for kubernetes with oss tools
Kubernetes and Docker Native Deployment Patterns for WSO2 Enterprise Integrator
Make your animations perform well - Anna Migas - Codemotion Rome 2017
Angular 4 Introduction Tutorial
Angular 2 and Wijmo 5 - GrapeCity Echo 2016 Tokyo
Beautifying the Beautiful: Theming WSO2 API Manager
Dockerize Your Project - GDGBogor

What's hot (20)

PDF
ID Android TechTalk Series #6 : Google Service and Gradle - Anton Nurdin Tuha...
PDF
React Context API
PDF
[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless
PDF
Introduction to React Native - Lev Vidrak, Wix
PPTX
Advanced mechanisms for dynamic content delivery
PDF
Implementing GraphQL - Without a Backend
PPTX
Angular Ivy- An Overview
KEY
Building production-quality apps with Node.js
PDF
Angular 2 - Core Concepts
PPTX
Introduction to angular | Concepts and Environment setup
PPTX
Vue.js Use Cases
PDF
Serverless computing in Azure: Functions, Logic Apps and more!
PDF
Kubernetes Native Serverless solution: Kubeless
PDF
All about Context API
PPTX
“ASP.NET Core. Features and architecture”
PPTX
Functional as a service TDC 2020
PPTX
Blazor and Azure Functions - a serverless approach
PDF
The productive developer guide to React
PPTX
Talk for DevFest 2021 - GDG Bénin
PDF
Is React reactive?
ID Android TechTalk Series #6 : Google Service and Gradle - Anton Nurdin Tuha...
React Context API
[Kotlin Serverless 工作坊] 單元 2 - 簡介 Kotlin Serverless
Introduction to React Native - Lev Vidrak, Wix
Advanced mechanisms for dynamic content delivery
Implementing GraphQL - Without a Backend
Angular Ivy- An Overview
Building production-quality apps with Node.js
Angular 2 - Core Concepts
Introduction to angular | Concepts and Environment setup
Vue.js Use Cases
Serverless computing in Azure: Functions, Logic Apps and more!
Kubernetes Native Serverless solution: Kubeless
All about Context API
“ASP.NET Core. Features and architecture”
Functional as a service TDC 2020
Blazor and Azure Functions - a serverless approach
The productive developer guide to React
Talk for DevFest 2021 - GDG Bénin
Is React reactive?
Ad

Similar to Highload JavaScript Framework without Inheritance (20)

PDF
Building a js widget
PPTX
External JavaScript Widget Development Best Practices (updated) (v.1.1)
PDF
jQuery Mobile and JavaScript
KEY
Project Timbit
PPT
GWT is Smarter Than You
PPTX
Google web toolkit web conference presenation
PPT
Vanjs backbone-powerpoint
PPTX
Developing JavaScript Widgets
PDF
Miha Lesjak Mobilizing The Web with Web Runtime
KEY
Next Generation UI
PDF
Build Widgets
PPT
Building Rich User Experiences Without JavaScript Spaghetti
PPTX
External JavaScript Widget Development Best Practices
PPTX
Java scriptwidgetdevelopmentjstanbul2012
PDF
YUI - HackU 2010 IIT Mumbai
PDF
User-tailored Inter-Widget Communication Extending the Shared Data Interface ...
PPTX
Mobile gotcha
KEY
Approaches to mobile site development
PDF
GWT widget development
PPTX
Pros and Cons of developing a Thick Clientside App
Building a js widget
External JavaScript Widget Development Best Practices (updated) (v.1.1)
jQuery Mobile and JavaScript
Project Timbit
GWT is Smarter Than You
Google web toolkit web conference presenation
Vanjs backbone-powerpoint
Developing JavaScript Widgets
Miha Lesjak Mobilizing The Web with Web Runtime
Next Generation UI
Build Widgets
Building Rich User Experiences Without JavaScript Spaghetti
External JavaScript Widget Development Best Practices
Java scriptwidgetdevelopmentjstanbul2012
YUI - HackU 2010 IIT Mumbai
User-tailored Inter-Widget Communication Extending the Shared Data Interface ...
Mobile gotcha
Approaches to mobile site development
GWT widget development
Pros and Cons of developing a Thick Clientside App
Ad

More from FDConf (20)

PPT
Антон Киршанов - «Квант изменения. Реактивные реакции на React.
PDF
Игорь Еростенко - Создаем виртуальный тур
PDF
Илья Климов - Reason: маргиналы против хайпа
PDF
Максим Щепелин - Доставляя веб-контент в игру
PDF
Александр Черноокий - Как правило "победитель получает все" работает и не раб...
PDF
Михаил Волчек - Что такое Цифровая мастерская?
PDF
Radoslav Stankov - Handling GraphQL with React and Apollo
PDF
Виктор Русакович - Выборы, выборы, все фреймворки… приторны
PDF
Slobodan Stojanovic - 8 1/2 things about serverless
PPTX
Тимофей Лавренюк - Почему мне зашел PWA?
PDF
В погоне за производительностью
PPTX
Если у вас нету тестов...
PPTX
Migrate your React.js application from (m)Observable to Redux
PPTX
Dart: питание и сила для вашего проекта
PDF
Scalable Angular 2 Application Architecture
PPTX
JavaScript: прошлое, настоящее и будущее.
PDF
CSSO — сжимаем CSS
PDF
Redux. From twitter hype to production
PDF
Будь первым
PDF
"Service Worker: Let Your Web App Feel Like a Native "
Антон Киршанов - «Квант изменения. Реактивные реакции на React.
Игорь Еростенко - Создаем виртуальный тур
Илья Климов - Reason: маргиналы против хайпа
Максим Щепелин - Доставляя веб-контент в игру
Александр Черноокий - Как правило "победитель получает все" работает и не раб...
Михаил Волчек - Что такое Цифровая мастерская?
Radoslav Stankov - Handling GraphQL with React and Apollo
Виктор Русакович - Выборы, выборы, все фреймворки… приторны
Slobodan Stojanovic - 8 1/2 things about serverless
Тимофей Лавренюк - Почему мне зашел PWA?
В погоне за производительностью
Если у вас нету тестов...
Migrate your React.js application from (m)Observable to Redux
Dart: питание и сила для вашего проекта
Scalable Angular 2 Application Architecture
JavaScript: прошлое, настоящее и будущее.
CSSO — сжимаем CSS
Redux. From twitter hype to production
Будь первым
"Service Worker: Let Your Web App Feel Like a Native "

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
cuic standard and advanced reporting.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Encapsulation theory and applications.pdf
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PDF
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
PPTX
Spectroscopy.pptx food analysis technology
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Spectral efficient network and resource selection model in 5G networks
Agricultural_Statistics_at_a_Glance_2022_0.pdf
cuic standard and advanced reporting.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Encapsulation theory and applications.pdf
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
MIND Revenue Release Quarter 2 2025 Press Release
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Understanding_Digital_Forensics_Presentation.pptx
Review of recent advances in non-invasive hemoglobin estimation
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
sap open course for s4hana steps from ECC to s4
Dropbox Q2 2025 Financial Results & Investor Presentation
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Encapsulation_ Review paper, used for researhc scholars
Network Security Unit 5.pdf for BCA BBA.
Reach Out and Touch Someone: Haptics and Empathic Computing
Optimiser vos workloads AI/ML sur Amazon EC2 et AWS Graviton
Spectroscopy.pptx food analysis technology
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Spectral efficient network and resource selection model in 5G networks

Highload JavaScript Framework without Inheritance

  • 3. Project  Front-end – UI widgets  Back-end – services & DB (.Net, MSSQL, MongoDB), several stand-alone systems that interact with each other  Integration with sites of 70+ brands
  • 4. Project  Integration with sites of 70+ brands
  • 5. New cool open source lib var originalAddEventListener = window.addEventListener; window.addEventListener = function (){ // some code with from time to time error originalAddEventListener.apply(/*...*/); }
  • 6. Styles overriding .brandsPage .widgedContainer .linksContainer .superLink.a { color: red; } .superLink.a { color: red !important; }
  • 7. Widgets’ Versions  Pros:  We can change everything in new version  Back compatibility  Safe deployment to production  Cons:  Bugs should be fixed in all version  Need to force 70+ brands to update widgets version  We need to support old versions due to the “slowpoke” brands
  • 8. Inheritance in JS if (typeof Object.create !== 'function') { Object.create = function (o) { function F() {} F.prototype = o; return new F(); }; } newObject = Object.create(oldObject);
  • 9. Widget var TestWidget = (function (){ // ... // $this - $this.context, $this,settings, ... // $core // $, _, Modernizr, ... return { render: function (container, onComplete, isReload){ // ... onComplete() } }; })();
  • 10. Widget’s usage OurFramework.createWidget('TestWidget', { setting1: true, setting2: "light", containerId: "testWidget"}, function(widget) { widget.doSomething(10, "20"); }); OurFramework.addEventListener('UserBar.Login.onLoggedIn', function(event, object){ // ... });
  • 11. Internal widgets OurFramework.createWidget('UserBar', { setting1: true, setting2: "light", elements: [ {id: 'Login', settings: { /* ... */ }}, {id: 'ShareLinks', settings: { /* ... */ }}, // ... ] });
  • 12. Communication  Events, global for widgets  Events, bubbling up to the parent
  • 13. Context  Widget has access to the cloned context  On context’s change – reload widgets  Context’s caching to localStorage
  • 14. High load?  AKAMAI rocks  Report tracking (via pixel)  Local storage and 3-r party APIs  AppDynamics & other server profilers  Client-side profiling  Jmeter load tests  Anti spam for comments  Jasmine  UI tests - selenium  Mobile optimized (O_OP is here)
  • 15. Plans  Client-side error tracking  Move more stuff to front-end  OOP  MVC
  • 16. A Slide with no useful Information at all  Just filling the gap between previous slide and the next one (which will be along in just a moment).  No need to write it down, unless you feel completed to do so.  Nothing on this slide is examinable.  In fact I’m not really sure why I bothered with it.