SlideShare a Scribd company logo
1 of 11
Download to read offline
Learn how to architect,
not just framework
Javascript framework overview
Why jQuery is not enough
Let’s assume that we need remote registration form. Pretty simple one..
$(‘#register.btn’).click(function(e) {
e.preventDefault();
var data = {username: $(‘#username’).val(), fullname: $(‘#fullname’).val};
$.ajax({
type: “post”,
url: “/register”,
data: data
})
})
It doesn’t look difficult...
However today is not a year 2000..
That’s why our form should be able to:
1. Check username availability while user types it
2. Show message that username is unavailable
3. Show the indicator when checking is in progress
4. Block registration button until all required fields are filled
5. Block registration button until username is unavailable
6. Block registration button until checking is not performed
7. Prevent double submit
8. Show indicator while registration is performing
9. Show feedback
In general it is something like that:
Existent JS framework solutions
1. MVC - Ember, Angular, Backbone...
2. Flux - Flux, ReFlux, Marty, Delorean, McFly, …
3. Reactive(do not mix up with react.js) - Rx, Bacon, Kefir
4. Reactive + Flux, Reactive + MVC - rx-flux, react-flux, thundercats,
RxEmber
It is obviously that we
need architecture
1. Define application status by url
2. Save data and interact with server
3. Keep application up-to-date - when data is changed it should be
displayed and vice versa, when user does something data should be
changed accordingly
4. Application architecture should be accurate - all elements in proper
place
5. Suggest solutions for basic features
Which problems should framework solve
MVC using Ember.js as a example - status change
1. URL is changed
2. Router chooses condition
3. Model is linked to
controller
4. HTML elements are
linked to controller
States
Controllers Models
Views HTML
MVC using Ember.js as an example - events peocessing
1. User generates an
event
2. Appropriate engine is
searched in current
context (it can be in
View or Controller or
Route)
3. Event changes model
4. Model is aware about
all linked data and
changes them as well
5. Changes render HTML
States
Controllers Models
Views/Components HTML
Связь идет через методы
Flux architecture
1. User generates Event
2. View is subscribed to Store
changes
3. View gets Event and creates
Action.
4. Dispatcher gets Action,
determines what should be done.
5. Dispatcher requests required
Store methods
6. Store changes saved data
7. Store reports that data is updated
8. Subscribed Views get new data
from Store and show new
interface.
HTML
View
ActionCreator
Dispatcher
Store 1
Store 2
Data
Observers
Javascript event(onClick)
Action: addItem
Observers
Reactive architecture HTML
View
Dispatcher
Storage
HTML
View
HTML
View
Stream
1. View generates Actions
which fall into Stream
2. Stream falls into
Dispatcher
3. Being filtered and
intersected streams
generate conditions
system
4. Observers are
subscribed to Conditions
5. After Condition is being
performed Observer
changes database
6. And changes View.
7. View renders HTML
Code examples
1. http://todomvc.com/examples/emberjs/
2. https://github.com/facebook/flux/tree/master/examples/flux-todomvc
3. https://github.com/AlexMost/RxReact/tree/master/hello_world/hello_world
4. https://github.
com/AlexMost/RxReact/tree/master/hello_world2/hello_world2

More Related Content

What's hot

Ember.js for Big Profit
Ember.js for Big ProfitEmber.js for Big Profit
Ember.js for Big ProfitCodeCore
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarAppfinz Technologies
 
Part 26 login type2 using binding source count
Part 26 login type2 using binding source countPart 26 login type2 using binding source count
Part 26 login type2 using binding source countGirija Muscut
 
Adventures in Facebook®: Lessons Learned from a Landmark webOS App
Adventures in Facebook®: Lessons Learned from a Landmark webOS AppAdventures in Facebook®: Lessons Learned from a Landmark webOS App
Adventures in Facebook®: Lessons Learned from a Landmark webOS AppKevin Decker
 
Part23 parameter query using multiple record vb.net
Part23 parameter query using multiple record vb.netPart23 parameter query using multiple record vb.net
Part23 parameter query using multiple record vb.netGirija Muscut
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSDavid Parsons
 
Part24 filter using string or char search in vb.net
Part24 filter using string or char search in vb.netPart24 filter using string or char search in vb.net
Part24 filter using string or char search in vb.netGirija Muscut
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesMohamad Al Asmar
 
"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton Paisov"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton PaisovPivorak MeetUp
 
Trailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick SuttererTrailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick SuttererPivorak MeetUp
 
Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9breccan
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentationbuildmaster
 

What's hot (19)

Ember.js for Big Profit
Ember.js for Big ProfitEmber.js for Big Profit
Ember.js for Big Profit
 
Introduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumarIntroduction to Angularjs : kishan kumar
Introduction to Angularjs : kishan kumar
 
Part 26 login type2 using binding source count
Part 26 login type2 using binding source countPart 26 login type2 using binding source count
Part 26 login type2 using binding source count
 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
 
Jsp session 3
Jsp   session 3Jsp   session 3
Jsp session 3
 
Adventures in Facebook®: Lessons Learned from a Landmark webOS App
Adventures in Facebook®: Lessons Learned from a Landmark webOS AppAdventures in Facebook®: Lessons Learned from a Landmark webOS App
Adventures in Facebook®: Lessons Learned from a Landmark webOS App
 
Ajax Highlights
Ajax HighlightsAjax Highlights
Ajax Highlights
 
ajax_pdf
ajax_pdfajax_pdf
ajax_pdf
 
Starting with angular js
Starting with angular js Starting with angular js
Starting with angular js
 
Part23 parameter query using multiple record vb.net
Part23 parameter query using multiple record vb.netPart23 parameter query using multiple record vb.net
Part23 parameter query using multiple record vb.net
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Part24 filter using string or char search in vb.net
Part24 filter using string or char search in vb.netPart24 filter using string or char search in vb.net
Part24 filter using string or char search in vb.net
 
AngularJS: Overview & Key Features
AngularJS: Overview & Key FeaturesAngularJS: Overview & Key Features
AngularJS: Overview & Key Features
 
Html web workers
Html web workersHtml web workers
Html web workers
 
"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton Paisov"Ruby meets Event Sourcing" by Anton Paisov
"Ruby meets Event Sourcing" by Anton Paisov
 
Trailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick SuttererTrailblazer Introduction by Nick Sutterer
Trailblazer Introduction by Nick Sutterer
 
Jsp intro
Jsp introJsp intro
Jsp intro
 
Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9Wellrailed - Be9's Acl9
Wellrailed - Be9's Acl9
 
ASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp PresentationASP.net MVC CodeCamp Presentation
ASP.net MVC CodeCamp Presentation
 

Viewers also liked

Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burntAmir Moghimi
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetesLiran Cohen
 
Kubernetes in 20 minutes - HDE Monthly Technical Session 24
Kubernetes in 20 minutes - HDE Monthly Technical Session 24Kubernetes in 20 minutes - HDE Monthly Technical Session 24
Kubernetes in 20 minutes - HDE Monthly Technical Session 24lestrrat
 
Container Orchestration Wars
Container Orchestration WarsContainer Orchestration Wars
Container Orchestration WarsKarl Isenberg
 
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Thomas Fricke
 
Idea to Production - with Gitlab and Kubernetes
Idea to Production  - with Gitlab and KubernetesIdea to Production  - with Gitlab and Kubernetes
Idea to Production - with Gitlab and KubernetesSimon Dittlmann
 
How to Monitor Microservices
How to Monitor MicroservicesHow to Monitor Microservices
How to Monitor MicroservicesSysdig
 
Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases Krishna-Kumar
 
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017Arjen Wassink
 

Viewers also liked (12)

Kubernetes - training micro-dragons without getting burnt
Kubernetes -  training micro-dragons without getting burntKubernetes -  training micro-dragons without getting burnt
Kubernetes - training micro-dragons without getting burnt
 
Scaling docker with kubernetes
Scaling docker with kubernetesScaling docker with kubernetes
Scaling docker with kubernetes
 
Demystifying kubernetes
Demystifying kubernetesDemystifying kubernetes
Demystifying kubernetes
 
Kubernetes in 20 minutes - HDE Monthly Technical Session 24
Kubernetes in 20 minutes - HDE Monthly Technical Session 24Kubernetes in 20 minutes - HDE Monthly Technical Session 24
Kubernetes in 20 minutes - HDE Monthly Technical Session 24
 
Kubernetes CI/CD with Helm
Kubernetes CI/CD with HelmKubernetes CI/CD with Helm
Kubernetes CI/CD with Helm
 
Container Orchestration Wars
Container Orchestration WarsContainer Orchestration Wars
Container Orchestration Wars
 
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
Endocode Kubernetes Meetup: Architecture Patterns for Microservices in Kubern...
 
Idea to Production - with Gitlab and Kubernetes
Idea to Production  - with Gitlab and KubernetesIdea to Production  - with Gitlab and Kubernetes
Idea to Production - with Gitlab and Kubernetes
 
How to Monitor Microservices
How to Monitor MicroservicesHow to Monitor Microservices
How to Monitor Microservices
 
Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases Stateful set in kubernetes implementation & usecases
Stateful set in kubernetes implementation & usecases
 
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
Continuous delivery of microservices with kubernetes - Quintor 27-2-2017
 
K8S in prod
K8S in prodK8S in prod
K8S in prod
 

Similar to JavaScript framework overview

Mvc interview questions – deep dive jinal desai
Mvc interview questions – deep dive   jinal desaiMvc interview questions – deep dive   jinal desai
Mvc interview questions – deep dive jinal desaijinaldesailive
 
Spring MVC
Spring MVCSpring MVC
Spring MVCyuvalb
 
Intoduction to Play Framework
Intoduction to Play FrameworkIntoduction to Play Framework
Intoduction to Play FrameworkKnoldus Inc.
 
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...Thomas Lee
 
08052917365603
0805291736560308052917365603
08052917365603DSKUMAR G
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCBarry Gervin
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083Divyam Pateriya
 
Asp.net mvc training
Asp.net mvc trainingAsp.net mvc training
Asp.net mvc trainingicubesystem
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end appsZohar Arad
 
servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0megrhi haikel
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
AspMVC4 start101
AspMVC4 start101AspMVC4 start101
AspMVC4 start101Rich Helton
 
Integrating Servlets and JSP (The MVC Architecture)
Integrating Servlets and JSP  (The MVC Architecture)Integrating Servlets and JSP  (The MVC Architecture)
Integrating Servlets and JSP (The MVC Architecture)Amit Ranjan
 

Similar to JavaScript framework overview (20)

ajax_pdf
ajax_pdfajax_pdf
ajax_pdf
 
Mvc interview questions – deep dive jinal desai
Mvc interview questions – deep dive   jinal desaiMvc interview questions – deep dive   jinal desai
Mvc interview questions – deep dive jinal desai
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Intoduction to Play Framework
Intoduction to Play FrameworkIntoduction to Play Framework
Intoduction to Play Framework
 
Asp.NET MVC
Asp.NET MVCAsp.NET MVC
Asp.NET MVC
 
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...
Webformer: a Rapid Application Development Toolkit for Writing Ajax Web Form ...
 
Struts Intro
Struts IntroStruts Intro
Struts Intro
 
08052917365603
0805291736560308052917365603
08052917365603
 
CTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVCCTTDNUG ASP.NET MVC
CTTDNUG ASP.NET MVC
 
MVC
MVCMVC
MVC
 
Server side programming bt0083
Server side programming bt0083Server side programming bt0083
Server side programming bt0083
 
Asp.net mvc training
Asp.net mvc trainingAsp.net mvc training
Asp.net mvc training
 
Jsf presentation
Jsf presentationJsf presentation
Jsf presentation
 
Architecting single-page front-end apps
Architecting single-page front-end appsArchitecting single-page front-end apps
Architecting single-page front-end apps
 
servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0servlet 2.5 & JSP 2.0
servlet 2.5 & JSP 2.0
 
ASP.NET Lecture 1
ASP.NET Lecture 1ASP.NET Lecture 1
ASP.NET Lecture 1
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
AspMVC4 start101
AspMVC4 start101AspMVC4 start101
AspMVC4 start101
 
Angularjs Live Project
Angularjs Live ProjectAngularjs Live Project
Angularjs Live Project
 
Integrating Servlets and JSP (The MVC Architecture)
Integrating Servlets and JSP  (The MVC Architecture)Integrating Servlets and JSP  (The MVC Architecture)
Integrating Servlets and JSP (The MVC Architecture)
 

Recently uploaded

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Developmentvyaparkranti
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceBrainSell Technologies
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalLionel Briand
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxRTS corp
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)jennyeacort
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...OnePlan Solutions
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Mater
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...Akihiro Suda
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based projectAnoyGreter
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 

Recently uploaded (20)

Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
VK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web DevelopmentVK Business Profile - provides IT solutions and Web Development
VK Business Profile - provides IT solutions and Web Development
 
CRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. SalesforceCRM Contender Series: HubSpot vs. Salesforce
CRM Contender Series: HubSpot vs. Salesforce
 
Precise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive GoalPrecise and Complete Requirements? An Elusive Goal
Precise and Complete Requirements? An Elusive Goal
 
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptxReal-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
Real-time Tracking and Monitoring with Cargo Cloud Solutions.pptx
 
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
Call Us🔝>༒+91-9711147426⇛Call In girls karol bagh (Delhi)
 
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
Tech Tuesday - Mastering Time Management Unlock the Power of OnePlan's Timesh...
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)Ahmed Motair CV April 2024 (Senior SW Developer)
Ahmed Motair CV April 2024 (Senior SW Developer)
 
英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
20240415 [Container Plumbing Days] Usernetes Gen2 - Kubernetes in Rootless Do...
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
MYjobs Presentation Django-based project
MYjobs Presentation Django-based projectMYjobs Presentation Django-based project
MYjobs Presentation Django-based project
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 

JavaScript framework overview

  • 1. Learn how to architect, not just framework Javascript framework overview
  • 2. Why jQuery is not enough Let’s assume that we need remote registration form. Pretty simple one.. $(‘#register.btn’).click(function(e) { e.preventDefault(); var data = {username: $(‘#username’).val(), fullname: $(‘#fullname’).val}; $.ajax({ type: “post”, url: “/register”, data: data }) }) It doesn’t look difficult...
  • 3. However today is not a year 2000.. That’s why our form should be able to: 1. Check username availability while user types it 2. Show message that username is unavailable 3. Show the indicator when checking is in progress 4. Block registration button until all required fields are filled 5. Block registration button until username is unavailable 6. Block registration button until checking is not performed 7. Prevent double submit 8. Show indicator while registration is performing 9. Show feedback
  • 4. In general it is something like that:
  • 5. Existent JS framework solutions 1. MVC - Ember, Angular, Backbone... 2. Flux - Flux, ReFlux, Marty, Delorean, McFly, … 3. Reactive(do not mix up with react.js) - Rx, Bacon, Kefir 4. Reactive + Flux, Reactive + MVC - rx-flux, react-flux, thundercats, RxEmber It is obviously that we need architecture
  • 6. 1. Define application status by url 2. Save data and interact with server 3. Keep application up-to-date - when data is changed it should be displayed and vice versa, when user does something data should be changed accordingly 4. Application architecture should be accurate - all elements in proper place 5. Suggest solutions for basic features Which problems should framework solve
  • 7. MVC using Ember.js as a example - status change 1. URL is changed 2. Router chooses condition 3. Model is linked to controller 4. HTML elements are linked to controller States Controllers Models Views HTML
  • 8. MVC using Ember.js as an example - events peocessing 1. User generates an event 2. Appropriate engine is searched in current context (it can be in View or Controller or Route) 3. Event changes model 4. Model is aware about all linked data and changes them as well 5. Changes render HTML States Controllers Models Views/Components HTML Связь идет через методы
  • 9. Flux architecture 1. User generates Event 2. View is subscribed to Store changes 3. View gets Event and creates Action. 4. Dispatcher gets Action, determines what should be done. 5. Dispatcher requests required Store methods 6. Store changes saved data 7. Store reports that data is updated 8. Subscribed Views get new data from Store and show new interface. HTML View ActionCreator Dispatcher Store 1 Store 2 Data Observers Javascript event(onClick) Action: addItem
  • 10. Observers Reactive architecture HTML View Dispatcher Storage HTML View HTML View Stream 1. View generates Actions which fall into Stream 2. Stream falls into Dispatcher 3. Being filtered and intersected streams generate conditions system 4. Observers are subscribed to Conditions 5. After Condition is being performed Observer changes database 6. And changes View. 7. View renders HTML
  • 11. Code examples 1. http://todomvc.com/examples/emberjs/ 2. https://github.com/facebook/flux/tree/master/examples/flux-todomvc 3. https://github.com/AlexMost/RxReact/tree/master/hello_world/hello_world 4. https://github. com/AlexMost/RxReact/tree/master/hello_world2/hello_world2