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
Easing offline web application development with GWT
PDF
using Mithril.js + postgREST to build and consume API's
PDF
JavaFX GUI architecture with Clojure core.async
PPTX
20180518 QNAP Seminar - Introduction to React Native
PDF
Intro to Eclipse Che, by Tyler Jewell
PDF
Unit Testing 101
PDF
Spring Cloud Function & Project riff #jsug
PDF
T 0230 Google Wave Powered By Gwt
PPTX
Use Eclipse technologies to build a modern embedded IDE
PPTX
RIA / SPA with ASP.NET
PPT
PPTX
React JS: A Secret Preview
PDF
Javascript Native Interface Build Crossplatform Apps With Native Performance ...
PPT
Plugins 2.0: The Overview
PDF
The fundamental problems of GUI applications and why people choose React
PPTX
Reactive application using meteor
PPTX
Connecting Xamarin Apps with IBM Worklight in Bluemix
 
PDF
From Backbone to Ember and Back(bone) Again
PDF
PhoneGap Introduction
PDF
Itb 2021 - Bulding Quick APIs by Gavin Pickin
Easing offline web application development with GWT
using Mithril.js + postgREST to build and consume API's
JavaFX GUI architecture with Clojure core.async
20180518 QNAP Seminar - Introduction to React Native
Intro to Eclipse Che, by Tyler Jewell
Unit Testing 101
Spring Cloud Function & Project riff #jsug
T 0230 Google Wave Powered By Gwt
Use Eclipse technologies to build a modern embedded IDE
RIA / SPA with ASP.NET
React JS: A Secret Preview
Javascript Native Interface Build Crossplatform Apps With Native Performance ...
Plugins 2.0: The Overview
The fundamental problems of GUI applications and why people choose React
Reactive application using meteor
Connecting Xamarin Apps with IBM Worklight in Bluemix
 
From Backbone to Ember and Back(bone) Again
PhoneGap Introduction
Itb 2021 - Bulding Quick APIs by Gavin Pickin
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)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PPT
Teaching material agriculture food technology
PDF
Network Security Unit 5.pdf for BCA BBA.
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Modernizing your data center with Dell and AMD
PDF
Electronic commerce courselecture one. Pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
cuic standard and advanced reporting.pdf
PPTX
A Presentation on Artificial Intelligence
PPTX
Big Data Technologies - Introduction.pptx
PDF
Encapsulation theory and applications.pdf
PDF
Empathic Computing: Creating Shared Understanding
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
20250228 LYD VKU AI Blended-Learning.pptx
Teaching material agriculture food technology
Network Security Unit 5.pdf for BCA BBA.
MYSQL Presentation for SQL database connectivity
Modernizing your data center with Dell and AMD
Electronic commerce courselecture one. Pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
cuic standard and advanced reporting.pdf
A Presentation on Artificial Intelligence
Big Data Technologies - Introduction.pptx
Encapsulation theory and applications.pdf
Empathic Computing: Creating Shared Understanding
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Diabetes mellitus diagnosis method based random forest with bat algorithm
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Chapter 3 Spatial Domain Image Processing.pdf
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...

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.