SlideShare a Scribd company logo
Modular & Event driven
   UI Architecture
     Vytautas Butkus
Content
•   Modules
•   Event driven architecture
•   Backbone.js - MV* framework
•   Questions
Modules
• What is it?
• Single, solid unit
• Have interfaces defined
• Made of multiple other modules
Modules
• What is it?
• Why use it?
•   Loose coupling
•   Easier maintanance
•   Changes affects only changed modules
•   Removed module does not break page
Modules
• What is it?
• Why use it?
• Modules in real life
Gmail system
Possible modules
Modules structure
Event driven architecture
• What is it?
Publish/Subscribe pattern
Event driven architecture
• What is it?
• Where is it used?
•   Node.js
•   jQuery.events
•   Backbone.js
•   OS interrups

$(“.button”).on(“click”, function(){
$(“body”).on(“click”, function(){
    $(“body”).trigger(“alarm”);
    alert(“Clicked”);
});
$(“body”).on(“alarm”, function(){
    alert(“Alarm alarm!!!”);
});
Modular & Event driven UI Architecture
Backbone.js
                 library
•   Structural framework
•   Very popular
•   Huge community
•   Still under v1.0
•   RESTful JSON interface
•   Based on MVC paradigm
                MV*
Backbone tools
•   Models                         => { } with events & sync

•   Views                          => DOM controller

•   Collections (not controller)   => Array of models

•   Router                         => URL controller

•   Events                         => Extend native { }
Underscore.js
•   Utility-belt library
•   Eases work with collections, arrays & objects
•   Provides function helpers
•   The only one Backbone.js dependency
Other MV* frameworks
•   AngularJS (by Google)
•   Ember.js
•   YUI (by Yahoo!)
•   KnockoutJS
...many more

• Check them out at
Gmail example with Backbone.js
•   Collection -> Message List
•   Model -> Message
•   Views -> Message, Message List
•   Router -> URL
Model
Collection
Message View
Message list view
Router
Init
Source code
• https://github.com/bytasv/gmail-example
Thank you!
Ad

Recommended

PPTX
Wheel.js
baccigalupi
 
PPT
JS, CMS, untangle the mess
Chris Ward
 
PDF
End-to-end W3C APIs
Alexandre Morgaut
 
PDF
An introduction to Node.js
Kasey McCurdy
 
PDF
Advanced jQuery (Ajax Exp 2007)
jeresig
 
PPTX
Edy Dawson Notes on SF HTML5 Dev Conf
Edy Dawson
 
PDF
JavaScript Library Overview (Ajax Exp West 2007)
jeresig
 
PPTX
Going offline with JS (DDD Sydney)
brendankowitz
 
PPTX
Javascript for Wep Apps
Michael Puckett
 
PPTX
Using NodeJS for Real-Time Web
Lalinda Sampath Dias
 
PDF
Drupal point of vue
David Ličen
 
PPTX
Harness jQuery Templates and Data Link
BorisMoore
 
PDF
JClouds at San Francisco Java User Group
Marakana Inc.
 
PPT
Latvia JUG Monthly Update
Dmitry Buzdin
 
PPTX
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp...
Codecamp Romania
 
PPTX
CT presentatie JQuery 7.12.11
virtualsciences41
 
PDF
Nlt 1-terminal-basics
Darren Woodiwiss
 
PPTX
Tampering with JavaScript
Boy Baukema
 
PPT
Php connectivitywithmysql
Bhumivaghasiya
 
PPT
J query presentation
akanksha17
 
PDF
Budapest New Tech Meetup - node-webkit
Robert Szaloki
 
PDF
Node webkit-meetup
EU Edge
 
PDF
Robe - A brand new robe for Dropwizard
Seray Uzgur
 
PDF
jQuery in the [Aol.] Enterprise
Dave Artz
 
PDF
React.js and Flux in details
Artyom Trityak
 
PDF
Create a module bundler from scratch
Sing Ming Chen
 
PPTX
Azure SQL & SQL Server 2016 JSON
Davide Mauri
 
PPTX
Web development using nodejs
Vaisakh Babu
 
PDF
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Naresh Chintalcheru
 
PDF
Functions - complex first class citizen
Vytautas Butkus
 

More Related Content

What's hot (20)

PPTX
Javascript for Wep Apps
Michael Puckett
 
PPTX
Using NodeJS for Real-Time Web
Lalinda Sampath Dias
 
PDF
Drupal point of vue
David Ličen
 
PPTX
Harness jQuery Templates and Data Link
BorisMoore
 
PDF
JClouds at San Francisco Java User Group
Marakana Inc.
 
PPT
Latvia JUG Monthly Update
Dmitry Buzdin
 
PPTX
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp...
Codecamp Romania
 
PPTX
CT presentatie JQuery 7.12.11
virtualsciences41
 
PDF
Nlt 1-terminal-basics
Darren Woodiwiss
 
PPTX
Tampering with JavaScript
Boy Baukema
 
PPT
Php connectivitywithmysql
Bhumivaghasiya
 
PPT
J query presentation
akanksha17
 
PDF
Budapest New Tech Meetup - node-webkit
Robert Szaloki
 
PDF
Node webkit-meetup
EU Edge
 
PDF
Robe - A brand new robe for Dropwizard
Seray Uzgur
 
PDF
jQuery in the [Aol.] Enterprise
Dave Artz
 
PDF
React.js and Flux in details
Artyom Trityak
 
PDF
Create a module bundler from scratch
Sing Ming Chen
 
PPTX
Azure SQL & SQL Server 2016 JSON
Davide Mauri
 
PPTX
Web development using nodejs
Vaisakh Babu
 
Javascript for Wep Apps
Michael Puckett
 
Using NodeJS for Real-Time Web
Lalinda Sampath Dias
 
Drupal point of vue
David Ličen
 
Harness jQuery Templates and Data Link
BorisMoore
 
JClouds at San Francisco Java User Group
Marakana Inc.
 
Latvia JUG Monthly Update
Dmitry Buzdin
 
Vlad Zelinschi - Embrace Native JavaScript (the anti-plugins talk) - Codecamp...
Codecamp Romania
 
CT presentatie JQuery 7.12.11
virtualsciences41
 
Nlt 1-terminal-basics
Darren Woodiwiss
 
Tampering with JavaScript
Boy Baukema
 
Php connectivitywithmysql
Bhumivaghasiya
 
J query presentation
akanksha17
 
Budapest New Tech Meetup - node-webkit
Robert Szaloki
 
Node webkit-meetup
EU Edge
 
Robe - A brand new robe for Dropwizard
Seray Uzgur
 
jQuery in the [Aol.] Enterprise
Dave Artz
 
React.js and Flux in details
Artyom Trityak
 
Create a module bundler from scratch
Sing Ming Chen
 
Azure SQL & SQL Server 2016 JSON
Davide Mauri
 
Web development using nodejs
Vaisakh Babu
 

Viewers also liked (20)

PDF
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Naresh Chintalcheru
 
PDF
Functions - complex first class citizen
Vytautas Butkus
 
PDF
PHP Static Code Review
Damien Seguy
 
DOC
Coding standards php
sagarrautray777
 
PDF
Web UI performance tuning
Andy Pemberton
 
KEY
Php Code Audits (PHP UK 2010)
Damien Seguy
 
PDF
Coding Best practices (PHP)
Christian Baune
 
PDF
PHP CODING STANDARDS
Asheesh Sharma
 
PPTX
Coding Standard And Code Review
Milan Vukoje
 
PDF
PHPcon Poland - Static Analysis of PHP Code – How the Heck did I write so man...
Rouven Weßling
 
PDF
JavaScript and UI Architecture Best Practices
Siarhei Barysiuk
 
PPTX
Modern Static Code Analysis in PHP
Vladimir Reznichenko
 
PDF
Refactoring Legacy Code
Adam Culp
 
PDF
Component Based UI Architecture - Alex Moldovan
ITCamp
 
PDF
Modern UI Architecture_ Trends and Technologies in Web Development
Suresh Patidar
 
PPTX
UI Architecture & Web Performance
Kyle Simpson
 
DOCX
Code review guidelines
Lalit Kale
 
PPT
Selenium Architecture
rohitnayak
 
PDF
Content Design, UI Architecture and Content-UI-Mapping
Wolfram Nagel
 
PPTX
PHP & JavaScript & CSS Coding style
Bo-Yi Wu
 
Lie Cheat & Steal to build Hyper-Fast Applications using Event-Driven Archite...
Naresh Chintalcheru
 
Functions - complex first class citizen
Vytautas Butkus
 
PHP Static Code Review
Damien Seguy
 
Coding standards php
sagarrautray777
 
Web UI performance tuning
Andy Pemberton
 
Php Code Audits (PHP UK 2010)
Damien Seguy
 
Coding Best practices (PHP)
Christian Baune
 
PHP CODING STANDARDS
Asheesh Sharma
 
Coding Standard And Code Review
Milan Vukoje
 
PHPcon Poland - Static Analysis of PHP Code – How the Heck did I write so man...
Rouven Weßling
 
JavaScript and UI Architecture Best Practices
Siarhei Barysiuk
 
Modern Static Code Analysis in PHP
Vladimir Reznichenko
 
Refactoring Legacy Code
Adam Culp
 
Component Based UI Architecture - Alex Moldovan
ITCamp
 
Modern UI Architecture_ Trends and Technologies in Web Development
Suresh Patidar
 
UI Architecture & Web Performance
Kyle Simpson
 
Code review guidelines
Lalit Kale
 
Selenium Architecture
rohitnayak
 
Content Design, UI Architecture and Content-UI-Mapping
Wolfram Nagel
 
PHP & JavaScript & CSS Coding style
Bo-Yi Wu
 
Ad

Similar to Modular & Event driven UI Architecture (20)

PPTX
BackboneJS
Artemii Kravtsov
 
PPT
J query presentation
sawarkar17
 
PPTX
Frameworks Galore: A Pragmatic Review
netc2012
 
PDF
Staying Sane with Drupal (A Develper's Survival Guide)
Oscar Merida
 
PDF
Creating Modular Test-Driven SPAs with Spring and AngularJS
Gunnar Hillert
 
PDF
Backbone.js
Ivano Malavolta
 
PPTX
WebNetConf 2012 - Single Page Apps
Pop Apps
 
PPTX
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
 
PPTX
Getting started with jQuery
Gill Cleeren
 
PPTX
Mvvm knockout vs angular
Basarat Syed
 
PPTX
Knockout implementing mvvm in java script with knockout
Andoni Arroyo
 
PPTX
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
PPTX
JavaScript!
RTigger
 
ZIP
jQuery On Rails
Jonathan Sharp
 
PDF
Client-side MVC with Backbone.js (reloaded)
iloveigloo
 
PPTX
Going Offline with JS
brendankowitz
 
PDF
Client-side MVC with Backbone.js
iloveigloo
 
PDF
End-to-end W3C APIs - tpac 2012
Alexandre Morgaut
 
PDF
[Research] azure ml anatomy of a machine learning service - Sharat Chikkerur
PAPIs.io
 
PDF
Apache Cayenne for WO Devs
WO Community
 
BackboneJS
Artemii Kravtsov
 
J query presentation
sawarkar17
 
Frameworks Galore: A Pragmatic Review
netc2012
 
Staying Sane with Drupal (A Develper's Survival Guide)
Oscar Merida
 
Creating Modular Test-Driven SPAs with Spring and AngularJS
Gunnar Hillert
 
Backbone.js
Ivano Malavolta
 
WebNetConf 2012 - Single Page Apps
Pop Apps
 
ASP.NET MVC 5 - EF 6 - VS2015
Hossein Zahed
 
Getting started with jQuery
Gill Cleeren
 
Mvvm knockout vs angular
Basarat Syed
 
Knockout implementing mvvm in java script with knockout
Andoni Arroyo
 
jQuery - the world's most popular java script library comes to XPages
Mark Roden
 
JavaScript!
RTigger
 
jQuery On Rails
Jonathan Sharp
 
Client-side MVC with Backbone.js (reloaded)
iloveigloo
 
Going Offline with JS
brendankowitz
 
Client-side MVC with Backbone.js
iloveigloo
 
End-to-end W3C APIs - tpac 2012
Alexandre Morgaut
 
[Research] azure ml anatomy of a machine learning service - Sharat Chikkerur
PAPIs.io
 
Apache Cayenne for WO Devs
WO Community
 
Ad

Modular & Event driven UI Architecture