SlideShare a Scribd company logo
Architecting Web Applications
Build Modular Web Applications Using Backbone.js and RequireJS
Naresh Bhatia
CTO, Sapient Global Markets
Co-lead Visualization Practice
Experience
Trading and Risk Management applications using
JavaScript, Java and .NET
Founder Archfirst (http://archfirst.org)
A place for software developers to learn and compare
technologies through real world examples
A case study in visualization
A technologist’s side-project that was
functional, but lacked finesse.

Recommended for you

React js basics
React js basicsReact js basics
React js basics

This document provides an introduction to ReactJS, including what it is, why people use it, and some basic concepts. It discusses how React is a declarative, efficient JavaScript library for building user interfaces. It also highlights some common use cases for React like building presentations, virtual reality experiences, shopping carts, online editors, and mobile apps. The document then covers prerequisites for learning React and introduces some of the main components that make up the React ecosystem like JSX, Babel, and module bundlers. It concludes with a quick "Hello World" example and outlines further topics to explore like components, state management, and other advanced React patterns.

javascriptreactjsweb
React js, node js & angular js which one is the best for web development
React js, node js & angular js  which one is the best for web development React js, node js & angular js  which one is the best for web development
React js, node js & angular js which one is the best for web development

This document compares three popular JavaScript frameworks: AngularJS, ReactJS, and NodeJS. AngularJS is a full-featured front-end framework maintained by Google that uses HTML templates and directives. ReactJS is maintained by Facebook and used for building user interfaces with a component-based approach. NodeJS is a runtime environment that allows JavaScript to be used on the server-side to build scalable web applications. The document discusses the benefits and disadvantages of each framework to help determine which one is best suited for different types of web development projects.

angular jsangularjs vs react js vs node jsfull stack developer react js
React js for beginners
React js for beginnersReact js for beginners
React js for beginners

React is a JavaScript library for building user interfaces. It is not a full framework and only handles the view layer. React uses a component-based approach where UI is broken into independent, reusable pieces. Components render HTML and have their own internal state. This makes components predictable and easier to debug. However, React alone is not enough to build full applications and must be used with other libraries for functionality like data fetching and routing. While React takes more time to learn initially, it can improve development speed and code quality for larger teams through its patterns and emphasis on component design.

reactjsnode.jsjavascript
Before
In Between
After
What does it take to build such
applications?

Recommended for you

Internal workshop react-js-mruiz
Internal workshop react-js-mruizInternal workshop react-js-mruiz
Internal workshop react-js-mruiz

This document provides an introduction to React, a JavaScript library for building user interfaces. It discusses React's fundamentals like components and unidirectional data flow. It also covers topics like JSX, props, state, lifecycles, and demos creating a component. The document aims to explain what React is, its core concepts, and how to get started using it to build user interfaces.

es6reactjsreact
Reactjs
Reactjs Reactjs
Reactjs

Getting started with the reactjs, basics of reactjs, introduction of reactjs, core concepts of reactjs and comparison with the other libraries/frameworks

javascriptreactjsintroduction of reactjs
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS

React is a declarative, efficient, and flexible JavaScript library for building user interfaces. It uses virtual DOM which improves performance and can render on both client and server. React encourages a component-based approach where UI is broken into independent reusable pieces that accept external data through properties. Components manage their own state which allows the UI to update over time in response to user input. This makes React code more predictable and easier to debug than traditional two-way data binding.

reactjsreactuser experience
JavaScript Space used to be
The Wild West
Sliding banners
5000 lines of procedural code in a single file
Complex DOM spaghetti
The landscape is changing now
Recent Advances in JavaScript
• AJAX enables changing of content without refreshing the entire page
• Browsers implement better and faster JavaScript engines
• Rise of smart web “applications” (vs. static web sites)
– Gmail
– Facebook
– Twitter
• People start talking about “architecture” of their JavaScript applications
– Object-orientation
– Design patterns
– MVC
– In-application messaging
– Modularity
JavaScript is a respectable
platform today
Serious JavaScript developers do worry
about architecture these days!

Recommended for you

Intro to React
Intro to ReactIntro to React
Intro to React

The document provides an introduction to React, a JavaScript library for building user interfaces. It discusses key React concepts like components, properties, state, one-way data flow, and JSX syntax. It also covers setting up a development environment with Create React App and shows how to create a basic React component with state. The target audience appears to be people new to React who want to learn the fundamentals.

reactjavascriptopen source
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !

This document provides an introduction to ReactJS including what it is, its key features, and how it works. Some main points: - ReactJS is a UI library built by Facebook that uses a virtual DOM to selectively update the browser DOM and improve performance. - It allows building of interactive and reusable UI components in a declarative way. - React uses a one-way data flow and unidirectional data binding which keeps complexity low. - Components are the core building blocks and can be composed to build UIs in a modular way. - The virtual DOM enables fast re-renders by only updating parts of the real DOM that changed.

reactjs flux react
Say Hello to React day2 presentation
Say Hello to React   day2 presentationSay Hello to React   day2 presentation
Say Hello to React day2 presentation

This is the ppt for day 2 of learning react from scratch. Presentation given for girlscript punjab date: 23 October 2020 Topics covered basic react app setup functional components and class components.

reactreactjsjavascript
Model-View-Controller (MVC)
A pattern that encourages separation of concerns and code reuse
MVC Philosophy
Separate application state from
its presentation
Separate models from their views
Get the truth out of the DOM
MVC Philosophy – Get the truth out of the DOM
Doesn’t matter what flavor of MVC you are using
MVC, MVP, MVVM, MV*, MVWhatever
Models
Views

Recommended for you

Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js

This document provides an introduction to ReactJS, including: - Why React is simple, declarative, and allows building of composable components - React's popularity, with over 900,000 downloads in the last month - How React addresses issues with traditional web development through its use of virtual DOM and componentization - An example component is demonstrated to show how to: render in JSX, make components dynamic and interactive through props and event handling, access the DOM through refs, and manage state.

Developing dynamic ui using react
Developing dynamic ui using reactDeveloping dynamic ui using react
Developing dynamic ui using react

“develop a Developing dynamic UI using React” that is powerful, fast, user-friendly, reactive web apps.

uidynamic uireactjs
Muhammad azamuddin introduction-to-reactjs
Muhammad azamuddin   introduction-to-reactjsMuhammad azamuddin   introduction-to-reactjs
Muhammad azamuddin introduction-to-reactjs

ReactJS is a JavaScript library for building user interfaces. It uses a component-based approach to build modular and reusable UI components that make code more maintainable and boost productivity. Some key advantages of React include its simplicity, ability to easily create reusable UI components, support for one-way data binding that makes the data flow clear, ability to render on both client and server sides, and strong performance due to its use of a virtual DOM. It is used by many large companies including Facebook, Instagram, Netflix, and Airbnb.

web developmenteventsphpindonesia
Introducing Backbone – A Lightweight MV* Framework
• Organize your interface into logical views backed by models
– Each view responsible for one DOM element
– Each view can be updated independently when the model changes
– Reduces DOM traversal, increasing performance
• See here for an example (slide 8)
• No need to dig into a JSON object, look up an element in the DOM, and
update the HTML by hand
– Bind your view's render function to the model's "change" event
– Now every view that displays this model is updated immediately on a change
Backbone MVC Example
http://archfirst.googlecode.com/svn/trunk/html/examples/backbone-mvc-example/index.html
Tile
color: F89F1B
Backbone Models
• Models are Backbone objects that contain “attributes”
• Whenever an attribute’s value changes, the model triggers a change event
// Define a model
var Tile = Backbone.Model.extend({
});
// Create an instance of the model
var tile = new Tile( );
// Set an attribute to fire the change event
tile.set({color: 0xF89F1B});
“change”
eventTile
color: F89F1B
Updating views from change events
tile
tileRectView
color: F89F1B
el:
model:
// 1. Create an instance of the model
var tile = new Tile( );
// 2. Create a view, attach it to the model & DOM
var tileRectView =
new TileRectView ({el: '#tile‘, model: tile});
// 3. (constructor) Bind view to model change event
this.model.on('change', this.render);
// 4. Change a model attribute
tile.set({color: 0xF89F1B});
// 5. Model fires a ‘change’ event
// 6. View catches the event & calls render( )
this.$el.css(
'background-color', '#' +
color2hex(this.model.get('color')));
1
2
render( )
4
‘change’
event
6
DOM
<div id="tile" ></div>
5
3

Recommended for you

Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS

React (or React Js) is a declarative, component-based JS library to build SPA(single page applications) which was created by Jordan Walke, a software engineer at Facebook. It is flexible and can be used in a variety of projects.

reactjsweb developmentknoldus
Say hello to react js - Day 1
Say hello to react js   - Day 1Say hello to react js   - Day 1
Say hello to react js - Day 1

It is the Day 1 power point presentation for seven days of react learning jam. Session organized by GirlScript Punjab Date of the session 22nd Oct 2020

reactjsjsxjavasccript
Angular vs. React
Angular vs. ReactAngular vs. React
Angular vs. React

www.opitz-consulting.com How do Angular and React compare? Can we compare them at all? Actually, it's like comparing apples to oranges, but even so, we have to compare them. As it turns out, both frameworks are a nice example of co-evolution. They aren't as different as they used to be a few years ago. After showing the key concepts of both frameworks, our experts Dr. Marius Hofmeister and Stephan Rauh presented a small list of criteria helping to decide when to use which at iJS Conference in Munich on 25/10/17.

javascriptjavasoftware development
Collections
brokerageAccounts
accountTableView
el:
collection:
this.$el.empty();
this.collection.each(function(account, i) {
var view = new AccountView({model: account});
this.$el.append(view.render().el);
}, this);
DOM
<table id="accounts_table">
<thead>...</thead>
<tbody></tbody>
</table>
initialize( )
render( )
this.collection.bind('reset', this.render);
brokerageAccount
brokerageAccount
brokerageAccount
Composing an interface from multiple views – View Hierarchy
AccountsPage
AccountsTab
UserPageHeaderWidget
AccountTableWidget AccountChartWidget
AccountView
FooterWidget
AccountView
AccountView
AccountView
Inserting pages and widgets dynamically
index.html
<!DOCTYPE html>
<html>
<head>
...
</head>
<body>
<div id="container">

</div>
</body>
</html>
A typical page
AccountsPage.js
BaseView.extend({
postRender: function() {
this.addChildren([
{
viewClass: UserPageHeaderWidget,
parentElement: this.$el
},
{
viewClass: AccountsTab,
parentElement: this.$el
},
{
viewClass: FooterWidget,
parentElement: this.$el
}
]);
}
}

Recommended for you

Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM

The document discusses React JS and provides an introduction and overview. It defines React as a JavaScript library for building user interfaces that renders UI and responds to events using the virtual DOM. It describes some key features of React including being able to perform on both the client-side and server-side. It also discusses components, JSX syntax, pros and cons of React, and reasons why one may or may not want to use React.

reactjsdomvirtualdom
Introduction to react
Introduction to reactIntroduction to react
Introduction to react

The document summarizes Kiran Abburi's presentation on React. It covers: 1. The agenda includes basics of React, composition, data flow, JSX, React APIs, and building a todo app. 2. React is a JavaScript library for building user interfaces and uses a component-based approach to build encapsulated pieces. 3. Data in React flows in a uni-directional way through properties (props) and state, where props are passed from parent to child components and state is internal to a component.

reactweb developmentjavascript
Erlang factory layered architecture - final
Erlang factory   layered architecture - finalErlang factory   layered architecture - final
Erlang factory layered architecture - final

The document describes a new layered architecture for a social and casual gaming platform. The key points are: 1) The previous architecture had inconsistent designs, unclear responsibilities, technical debt, and scaling issues with 7 layers of caching. 2) The new architecture aims to be flexible, predictable, scalable, simple with clean separation and no horizontal dependencies. 3) It has four main layers - client, interface, service, and storage - each with clear responsibilities around integration, authorization, composition, and persistence. Building blocks are small, simple applications and a platform to abstract complexity.

A typical widget
UserPageHeaderWidget.js
BaseView.extend({
tagName: 'header',
className: 'user-page-header',
template: {
name: 'UserPageHeaderTemplate',
source: UserPageHeaderTemplate
}
});
UserPageHeaderTemplate.html
<div class="user-info">
<span>{{firstName}} {{lastName}}</span>
<img src="img/person-icon-small.png" alt="seperator" />
<a class="js-signOut" href="#">Sign Out</a>
</div>
<h1 class="ir">Bullsfirst</h1>
Classic Server-Side Layered Architecture
User Interface
Layer
Accepts user commands and presents
information back to the user
Application
Layer
Manages transactions, translates DTOs,
coordinates application activities, creates and
accesses domain objects
Domain
Layer
Contains the state and behavior of the domain
Infrastructure
Layer
Supports all other layers, includes repositories,
adapters, frameworks etc.
Bullsfirst Client-Side Layered ArchitectureFrameworkPresentationLayerDomain
In-Application Messaging
• Interactions between table and chart
• If theses widgets interacted directly, the coupling would be too tight
• Use a message bus (a.k.a. pub/sub) to decouple the components
Account :
mouseover

Recommended for you

Layered Architecture 03 Format
Layered Architecture 03 FormatLayered Architecture 03 Format
Layered Architecture 03 Format

The document discusses layered architecture and protocols. It describes a 7-layer OSI reference model consisting of physical, data link, network, transport, and application layers. The TCP and IP protocols are presented as operating at the transport and internet layers. HTTP is described as using TCP to transmit data over the internet according to protocols that organize communication into layers.

Sa 008 patterns
Sa 008 patternsSa 008 patterns
Sa 008 patterns

The document discusses architectural patterns. It defines what patterns are and provides a taxonomy of patterns including idioms, design patterns, and architectural patterns. Architectural patterns express fundamental structural organizations for software systems and include patterns like layers, pipes and filters, and blackboard. The rest of the document describes various architectural styles and provides examples of architectural patterns within each style.

architecture patternstactics
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio

The document discusses the benefits of exercise for mental health. Regular physical activity can help reduce anxiety and depression and improve mood and cognitive function. Exercise causes chemical changes in the brain that may help alleviate symptoms of mental illness and boost overall mental well-being.

codeenforcementarchitecture
JavaScript Modularity
A pattern that supports large scale application development
How much of your application can
you hold in your head at once?
Bullsfirst is about 2000 lines of JS
Have you ever been in
Dependency Hell?
<script src="js/form2js.js"></script>
<script src="js/toObject.js"></script>
<script src="js/base64_encode.js"></script>
<script src="js/utf8_encode.js"></script>
<script src="js/format.js"></script>
<script src="js/treeTable.js"></script>
<script src="js/jalerts.js"></script>
AMD and RequireJS to the rescue
AMD: Asynchronous Module Definition
(an API for defining and loading JS modules)
RequireJS: A popular implementation of AMD

Recommended for you

Soa Overview
Soa OverviewSoa Overview
Soa Overview

The document provides an overview of service-oriented architecture (SOA) including definitions of key concepts like services, service types, and the SOA layered model. It discusses what SOA is, defines a service, outlines five main service types (application, business, intermediary, process-centric, public enterprise), and describes the fundamental, networked, and process-enabled SOA layered models. It also briefly discusses SOA elements like services, service repositories, and application frontends, as well as technical considerations for supporting SOA.

Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns

This slideshow walks through common and popular Architectural design patterns such as Data-Driven Architecture, Micro-Services, Layered Architecture, and Micro-Kernel Architecture. I also go over the pros and cons and in which scenario each architecture is preferable

softwaremicro servicessoftware architecture
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...

Few days ago I gave a talk about software architectures. My goal was to explain as easy as possible the main ideas behind the most popular software architectures like the client-server model, the 3-tier and multi-tier layered models, the idea behind SOA architecture and cloud computing, and few widely used architectural patterns like MVC (Model-View-Controller), MVP (Model-View-Presenter), PAC (Presentation Abstraction Control), MVVM (Model-View-ViewModel). In my talk I explain that MVC, MVP and MVVM are not necessary bound to any particular architectural model like client-server, 3-tier of SOA. MVC, MVP and MVVM are architectural principles applicable when we need to separate the presentation (UI), the data model and the presentation logic. Additionally I made an overview of the popular architectural principals IoC (Inversion of Control) and DI (Dependency Injection) and give examples how to build your own Inversion of Control (IoC) container.

mvvm3-tier architecturemvc
Modules allow you to break large
applications into bite-size chunks
Code reuse & separation of concerns
Complements the MVC pattern
Structure of a Modular App
src
|-- js
| |-- app
| | |-- domain
| | | |-- Repository.js
| | | |-- BrokerageAccount.js
| | | `-- ...
| | |-- pages
| | | |-- home
| | | |-- accounts
| | | `-- ...
| | `-- widgets
| | `-- account-table
| | `-- account-chart
| | `-- ...
| |-- framework
| | |-- Baseview.js
| | |-- Router.js
| | `-- ...
| `-- vendor
| |-- backbone.js
| |-- jquery.js
| `-- ...
|-- sass
|-- img
`-- index.html
60+ JavaScript files
2000 lines of code
But much easier to find things!
JavaScript and
templates (markup)
JavaScript and
templates (markup)
Defining a Module
RequireJS loads all code relative to a baseUrl
(set to the same directory as the script used in a data-main)
// app/widgets/login/LoginWidget
// Defines a widget called LoginWidget
define(
[],
function() {
return BaseView.extend({
...
});
}
);
Using a Module
Defining dependency on a module makes sure that the
module is pulled in before the dependent code.
// app/pages/home/HomePage
// Defines the home page that uses the LoginWidget
define(
['app/widgets/login/LoginWidget'],
function(LoginWidget) {
return BaseView.extend({
postRender: function() {
this.addChild({
id: 'LoginWidget',
viewClass: LoginWidget,
parentElement: this.$el
});
}
...
});
}
);

Recommended for you

Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns

This presentation talks about some commonly used software architecture patterns. The main features of the following architectural patterns are described: - Layered architecture - Event-driven architecture (both mediator and broker topology) - Microservices architecture (API-REST based, REST based, Centralized message topology) Each pattern is analyzed in terms of: - Overall agility - Ease of deployment - Testability - Performance - Scalability - Ease of develpment. The slide refers to the online book "Software Architecture Patterns", Mark Richards, 2015, O’Reilly. The presentation is took from the Software Engineering course I run in the bachelor-level informatics curriculum at the University of Padova.

design patternsoftware engineeringarchitectural design pattern
MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!

HTML5 is the playing area, the strip, Javascript presentation frameworks are the fences and they are fierce and proud. In this presentation we will attend an interesting match between two of the emerging contenders in the MV* family: KnockoutJS and BackboneJS. We'll try to understand how they solve the same issues in modern web software development to better decide which one is suitable in our scenario.

mvvmbackbonejsmvc
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js

In this presentation you will learn the basics of knockout and make a deep dive by building a chat app.

knockoutjs javascript azure chat mvvm
Moving templates into text modules
<td class="name">
{{name}}
</td>
<td class="market-value">
{{formatMoney marketValue}}
</td>
<td class="cash">
{{formatMoney cashPosition}}
</td>
...
AccountTemplate.html
Using templates defined in text modules
define(
['text!app/widgets/account-table/AccountTemplate.html'],
function(AccountTemplate) {
return BaseView.extend({
template: {
name: 'AccountTemplate',
source: AccountTemplate
},
...
});
}
);
AccountView.js
Optimizing for Production – The Build System
• A web application consisting of hundreds of JavaScript files could have
severe performance implications in a production environment
• RequireJS comes with an optimizer that walks the dependency tree and
concatenates all the required JavaScript files into one
• The Bullsfirst build system runs the RequireJS optimizer plus other
optimizations such as yuicompressor and uglifyjs to reduce the download
size of the application
– The build system is based on Grunt.js, a task-based command line build tool for
JavaScript projects
– It cuts down application load time to approximately 2 seconds on a 3 Mbps network
Summary

Recommended for you

MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)

A guest lecture I presented to MSc Level Enterprise Systems Development students within the Department of Computing at the University of Surrey. This was a very similar presentation to the L2 lecture delivered the week earlier, but also included more advanced material.

Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications

Developing large scale JavaScript applications 24/11/11 @ Front end meetup, Budapest (Hungary) www.milankorsos.com www.twitter.com/korsosm www.sowink.com

large scale applicationjquerysowink.com
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsRefactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js

Have you ever starting working on a large, existing web application and jQuery spaghetti-code is all over the place? Your mind swirls as you try to figure out what code belongs to what component on what page. There are no JavaScript unit tests and you're terrified of making a change and breaking everything? I'm going to talk through the real life story of how Backbone.js helped to bring organization/structure, modularity, and testability to a large multi-page web application.

backbone.jsjasminebrowserify
Summary
• Use the MVC pattern to enforce separation of concerns
• Compose your application using smaller Reusable Components
• Create a Domain Layer as a central place for views to access information
• Use In-Application Messaging to decouple application components
• Use Modules to break large applications into bite-size chunks
A strong architecture is key to building engaging web applications
References
References
• Backbone.js – https://github.com/documentcloud/backbone
• RequireJS – https://github.com/jrburke/requirejs
• Bullsfirst is an open-source project under http://archfirst.org
– Sharing best practices with the developer community
– Live demo at http://archfirst.org/apps/bullsfirst-jquery-backbone
– Source repository: https://github.com/archfirst/bullsfirst-jquery-backbone
– Discussion/feedback at http://archfirst.org/forums/general-discussion
43

More Related Content

What's hot

React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
Learntek1
 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop
Ahmed rebai
 
React-js
React-jsReact-js
React-js
Avi Kedar
 
React js basics
React js basicsReact js basics
React js basics
Maulik Shah
 
React js, node js &amp; angular js which one is the best for web development
React js, node js &amp; angular js  which one is the best for web development React js, node js &amp; angular js  which one is the best for web development
React js, node js &amp; angular js which one is the best for web development
Concetto Labs
 
React js for beginners
React js for beginnersReact js for beginners
React js for beginners
Alessandro Valenti
 
Internal workshop react-js-mruiz
Internal workshop react-js-mruizInternal workshop react-js-mruiz
Internal workshop react-js-mruiz
Miguel Ruiz Rodriguez
 
Reactjs
Reactjs Reactjs
Reactjs
Neha Sharma
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
Bethmi Gunasekara
 
Intro to React
Intro to ReactIntro to React
Intro to React
Justin Reock
 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !
Ritesh Kumar
 
Say Hello to React day2 presentation
Say Hello to React   day2 presentationSay Hello to React   day2 presentation
Say Hello to React day2 presentation
Smile Gupta
 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
Aeshan Wijetunge
 
Developing dynamic ui using react
Developing dynamic ui using reactDeveloping dynamic ui using react
Developing dynamic ui using react
sushmita bhor
 
Muhammad azamuddin introduction-to-reactjs
Muhammad azamuddin   introduction-to-reactjsMuhammad azamuddin   introduction-to-reactjs
Muhammad azamuddin introduction-to-reactjs
PHP Indonesia
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
Knoldus Inc.
 
Say hello to react js - Day 1
Say hello to react js   - Day 1Say hello to react js   - Day 1
Say hello to react js - Day 1
Smile Gupta
 
Angular vs. React
Angular vs. ReactAngular vs. React
Angular vs. React
OPITZ CONSULTING Deutschland
 
Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM
Tamir Azrab
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
kiranabburi
 

What's hot (20)

React js Online Training
React js Online TrainingReact js Online Training
React js Online Training
 
Reactjs workshop
Reactjs workshop Reactjs workshop
Reactjs workshop
 
React-js
React-jsReact-js
React-js
 
React js basics
React js basicsReact js basics
React js basics
 
React js, node js &amp; angular js which one is the best for web development
React js, node js &amp; angular js  which one is the best for web development React js, node js &amp; angular js  which one is the best for web development
React js, node js &amp; angular js which one is the best for web development
 
React js for beginners
React js for beginnersReact js for beginners
React js for beginners
 
Internal workshop react-js-mruiz
Internal workshop react-js-mruizInternal workshop react-js-mruiz
Internal workshop react-js-mruiz
 
Reactjs
Reactjs Reactjs
Reactjs
 
Introduction to React JS
Introduction to React JSIntroduction to React JS
Introduction to React JS
 
Intro to React
Intro to ReactIntro to React
Intro to React
 
Welcome to React & Flux !
Welcome to React & Flux !Welcome to React & Flux !
Welcome to React & Flux !
 
Say Hello to React day2 presentation
Say Hello to React   day2 presentationSay Hello to React   day2 presentation
Say Hello to React day2 presentation
 
Introduction to react js
Introduction to react jsIntroduction to react js
Introduction to react js
 
Developing dynamic ui using react
Developing dynamic ui using reactDeveloping dynamic ui using react
Developing dynamic ui using react
 
Muhammad azamuddin introduction-to-reactjs
Muhammad azamuddin   introduction-to-reactjsMuhammad azamuddin   introduction-to-reactjs
Muhammad azamuddin introduction-to-reactjs
 
Introduction to ReactJS
Introduction to ReactJSIntroduction to ReactJS
Introduction to ReactJS
 
Say hello to react js - Day 1
Say hello to react js   - Day 1Say hello to react js   - Day 1
Say hello to react js - Day 1
 
Angular vs. React
Angular vs. ReactAngular vs. React
Angular vs. React
 
Reactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOMReactjs Introduction - Virtual DOM
Reactjs Introduction - Virtual DOM
 
Introduction to react
Introduction to reactIntroduction to react
Introduction to react
 

Viewers also liked

Erlang factory layered architecture - final
Erlang factory   layered architecture - finalErlang factory   layered architecture - final
Erlang factory layered architecture - final
Dennis Docter
 
Layered Architecture 03 Format
Layered Architecture 03 FormatLayered Architecture 03 Format
Layered Architecture 03 Format
anishgoel
 
Sa 008 patterns
Sa 008 patternsSa 008 patterns
Sa 008 patterns
Frank Gielen
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
Srini Penchikala
 
Soa Overview
Soa OverviewSoa Overview
Soa Overview
Terry Cho
 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns
Assaf Gannon
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Svetlin Nakov
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
Riccardo Cardin
 

Viewers also liked (8)

Erlang factory layered architecture - final
Erlang factory   layered architecture - finalErlang factory   layered architecture - final
Erlang factory layered architecture - final
 
Layered Architecture 03 Format
Layered Architecture 03 FormatLayered Architecture 03 Format
Layered Architecture 03 Format
 
Sa 008 patterns
Sa 008 patternsSa 008 patterns
Sa 008 patterns
 
Domain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring PortfolioDomain Driven Design Development Spring Portfolio
Domain Driven Design Development Spring Portfolio
 
Soa Overview
Soa OverviewSoa Overview
Soa Overview
 
Software Architecture Patterns
Software Architecture PatternsSoftware Architecture Patterns
Software Architecture Patterns
 
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
Architectural Patterns and Software Architectures: Client-Server, Multi-Tier,...
 
Software architecture patterns
Software architecture patternsSoftware architecture patterns
Software architecture patterns
 

Similar to Rp 6 session 2 naresh bhatia

MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
Roberto Messora
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
Flavius-Radu Demian
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
Daniel Bryant
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
Milan Korsos
 
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsRefactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js
Stacy London
 
Refactor Large apps with Backbone
Refactor Large apps with BackboneRefactor Large apps with Backbone
Refactor Large apps with Backbone
devObjective
 
Refactor Large applications with Backbone
Refactor Large applications with BackboneRefactor Large applications with Backbone
Refactor Large applications with Backbone
ColdFusionConference
 
MVC
MVCMVC
MVC
akshin
 
Jinal desai .net
Jinal desai .netJinal desai .net
Jinal desai .net
rohitkumar1987in
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
Soós Gábor
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
jonknapp
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
Acquisio
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
Mike Wilcox
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
Sunil Patil
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
Sunil Patil
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
Mark Gu
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
Rasel Khan
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
Fabio Franzini
 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
Mohammed Arif
 
Intro lift
Intro liftIntro lift
Intro lift
Knoldus Inc.
 

Similar to Rp 6 session 2 naresh bhatia (20)

MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!MV* presentation frameworks in Javascript: en garde, pret, allez!
MV* presentation frameworks in Javascript: en garde, pret, allez!
 
Fundaments of Knockout js
Fundaments of Knockout jsFundaments of Knockout js
Fundaments of Knockout js
 
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
MSc Enterprise Systems Development Guest Lecture at UniS (2/12/09)
 
Developing large scale JavaScript applications
Developing large scale JavaScript applicationsDeveloping large scale JavaScript applications
Developing large scale JavaScript applications
 
Refactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.jsRefactoring Large Web Applications with Backbone.js
Refactoring Large Web Applications with Backbone.js
 
Refactor Large apps with Backbone
Refactor Large apps with BackboneRefactor Large apps with Backbone
Refactor Large apps with Backbone
 
Refactor Large applications with Backbone
Refactor Large applications with BackboneRefactor Large applications with Backbone
Refactor Large applications with Backbone
 
MVC
MVCMVC
MVC
 
Jinal desai .net
Jinal desai .netJinal desai .net
Jinal desai .net
 
Javascript frameworks: Backbone.js
Javascript frameworks: Backbone.jsJavascript frameworks: Backbone.js
Javascript frameworks: Backbone.js
 
From Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) AgainFrom Backbone to Ember and Back(bone) Again
From Backbone to Ember and Back(bone) Again
 
Planbox Backbone MVC
Planbox Backbone MVCPlanbox Backbone MVC
Planbox Backbone MVC
 
Web Components v1
Web Components v1Web Components v1
Web Components v1
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
Developing Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web ApplicationDeveloping Next-Gen Enterprise Web Application
Developing Next-Gen Enterprise Web Application
 
ASP.NET Presentation
ASP.NET PresentationASP.NET Presentation
ASP.NET Presentation
 
WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...WebNet Conference 2012 - Designing complex applications using html5 and knock...
WebNet Conference 2012 - Designing complex applications using html5 and knock...
 
MVC & backbone.js
MVC & backbone.jsMVC & backbone.js
MVC & backbone.js
 
Intro lift
Intro liftIntro lift
Intro lift
 

More from sapientindia

Redefining Perspectives - June 2015
Redefining Perspectives - June 2015Redefining Perspectives - June 2015
Redefining Perspectives - June 2015
sapientindia
 
Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2
sapientindia
 
Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1
sapientindia
 
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
sapientindia
 
Redefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath FordeRedefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath Forde
sapientindia
 
Risk managementusinghadoop
Risk managementusinghadoopRisk managementusinghadoop
Risk managementusinghadoop
sapientindia
 
Analyticsand bigdata
Analyticsand bigdataAnalyticsand bigdata
Analyticsand bigdata
sapientindia
 
Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1
sapientindia
 

More from sapientindia (8)

Redefining Perspectives - June 2015
Redefining Perspectives - June 2015Redefining Perspectives - June 2015
Redefining Perspectives - June 2015
 
Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2Redefining Perspectives edition 12 and 13 session 2
Redefining Perspectives edition 12 and 13 session 2
 
Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1Redefining Perspectives 12th edition Session 1
Redefining Perspectives 12th edition Session 1
 
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
Redefining Perspectives 4 - Metro ui Session 2 ver 3 5 (5)
 
Redefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath FordeRedefining Perspectives 6 - Session 1 Jarlath Forde
Redefining Perspectives 6 - Session 1 Jarlath Forde
 
Risk managementusinghadoop
Risk managementusinghadoopRisk managementusinghadoop
Risk managementusinghadoop
 
Analyticsand bigdata
Analyticsand bigdataAnalyticsand bigdata
Analyticsand bigdata
 
Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1Redefining Perspectives 4 - Metro ui Session 1
Redefining Perspectives 4 - Metro ui Session 1
 

Recently uploaded

WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
ArgaBisma
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
Larry Smarr
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
Toru Tamaki
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
Adam Dunkels
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
Kief Morris
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
Vijayananda Mohire
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
welrejdoall
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Erasmo Purificato
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
Mark Billinghurst
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Bert Blevins
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
Larry Smarr
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
SynapseIndia
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
shanthidl1
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
Andrey Yasko
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
Yevgen Sysoyev
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
Matthew Sinclair
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
ScyllaDB
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
rajancomputerfbd
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
KAMAL CHOUDHARY
 

Recently uploaded (20)

WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdfWhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
WhatsApp Image 2024-03-27 at 08.19.52_bfd93109.pdf
 
The Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU CampusesThe Increasing Use of the National Research Platform by the CSU Campuses
The Increasing Use of the National Research Platform by the CSU Campuses
 
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
論文紹介:A Systematic Survey of Prompt Engineering on Vision-Language Foundation ...
 
How to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptxHow to Build a Profitable IoT Product.pptx
How to Build a Profitable IoT Product.pptx
 
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
[Talk] Moving Beyond Spaghetti Infrastructure [AOTB] 2024-07-04.pdf
 
Quantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLMQuantum Communications Q&A with Gemini LLM
Quantum Communications Q&A with Gemini LLM
 
Manual | Product | Research Presentation
Manual | Product | Research PresentationManual | Product | Research Presentation
Manual | Product | Research Presentation
 
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
Paradigm Shifts in User Modeling: A Journey from Historical Foundations to Em...
 
Research Directions for Cross Reality Interfaces
Research Directions for Cross Reality InterfacesResearch Directions for Cross Reality Interfaces
Research Directions for Cross Reality Interfaces
 
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly DetectionAdvanced Techniques for Cyber Security Analysis and Anomaly Detection
Advanced Techniques for Cyber Security Analysis and Anomaly Detection
 
The Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive ComputingThe Rise of Supernetwork Data Intensive Computing
The Rise of Supernetwork Data Intensive Computing
 
How RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptxHow RPA Help in the Transportation and Logistics Industry.pptx
How RPA Help in the Transportation and Logistics Industry.pptx
 
Pigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdfPigging Solutions Sustainability brochure.pdf
Pigging Solutions Sustainability brochure.pdf
 
Cookies program to display the information though cookie creation
Cookies program to display the information though cookie creationCookies program to display the information though cookie creation
Cookies program to display the information though cookie creation
 
Comparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdfComparison Table of DiskWarrior Alternatives.pdf
Comparison Table of DiskWarrior Alternatives.pdf
 
DealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 editionDealBook of Ukraine: 2024 edition
DealBook of Ukraine: 2024 edition
 
20240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 202420240704 QFM023 Engineering Leadership Reading List June 2024
20240704 QFM023 Engineering Leadership Reading List June 2024
 
Mitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing SystemsMitigating the Impact of State Management in Cloud Stream Processing Systems
Mitigating the Impact of State Management in Cloud Stream Processing Systems
 
Choose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presenceChoose our Linux Web Hosting for a seamless and successful online presence
Choose our Linux Web Hosting for a seamless and successful online presence
 
Recent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS InfrastructureRecent Advancements in the NIST-JARVIS Infrastructure
Recent Advancements in the NIST-JARVIS Infrastructure
 

Rp 6 session 2 naresh bhatia

  • 1. Architecting Web Applications Build Modular Web Applications Using Backbone.js and RequireJS
  • 2. Naresh Bhatia CTO, Sapient Global Markets Co-lead Visualization Practice Experience Trading and Risk Management applications using JavaScript, Java and .NET Founder Archfirst (http://archfirst.org) A place for software developers to learn and compare technologies through real world examples
  • 3. A case study in visualization
  • 4. A technologist’s side-project that was functional, but lacked finesse.
  • 8. What does it take to build such applications?
  • 9. JavaScript Space used to be The Wild West Sliding banners 5000 lines of procedural code in a single file Complex DOM spaghetti
  • 10. The landscape is changing now
  • 11. Recent Advances in JavaScript • AJAX enables changing of content without refreshing the entire page • Browsers implement better and faster JavaScript engines • Rise of smart web “applications” (vs. static web sites) – Gmail – Facebook – Twitter • People start talking about “architecture” of their JavaScript applications – Object-orientation – Design patterns – MVC – In-application messaging – Modularity
  • 12. JavaScript is a respectable platform today Serious JavaScript developers do worry about architecture these days!
  • 13. Model-View-Controller (MVC) A pattern that encourages separation of concerns and code reuse
  • 15. Separate application state from its presentation Separate models from their views Get the truth out of the DOM
  • 16. MVC Philosophy – Get the truth out of the DOM Doesn’t matter what flavor of MVC you are using MVC, MVP, MVVM, MV*, MVWhatever Models Views
  • 17. Introducing Backbone – A Lightweight MV* Framework • Organize your interface into logical views backed by models – Each view responsible for one DOM element – Each view can be updated independently when the model changes – Reduces DOM traversal, increasing performance • See here for an example (slide 8) • No need to dig into a JSON object, look up an element in the DOM, and update the HTML by hand – Bind your view's render function to the model's "change" event – Now every view that displays this model is updated immediately on a change
  • 19. Backbone Models • Models are Backbone objects that contain “attributes” • Whenever an attribute’s value changes, the model triggers a change event // Define a model var Tile = Backbone.Model.extend({ }); // Create an instance of the model var tile = new Tile( ); // Set an attribute to fire the change event tile.set({color: 0xF89F1B}); “change” eventTile color: F89F1B
  • 20. Updating views from change events tile tileRectView color: F89F1B el: model: // 1. Create an instance of the model var tile = new Tile( ); // 2. Create a view, attach it to the model & DOM var tileRectView = new TileRectView ({el: '#tile‘, model: tile}); // 3. (constructor) Bind view to model change event this.model.on('change', this.render); // 4. Change a model attribute tile.set({color: 0xF89F1B}); // 5. Model fires a ‘change’ event // 6. View catches the event & calls render( ) this.$el.css( 'background-color', '#' + color2hex(this.model.get('color'))); 1 2 render( ) 4 ‘change’ event 6 DOM <div id="tile" ></div> 5 3
  • 21. Collections brokerageAccounts accountTableView el: collection: this.$el.empty(); this.collection.each(function(account, i) { var view = new AccountView({model: account}); this.$el.append(view.render().el); }, this); DOM <table id="accounts_table"> <thead>...</thead> <tbody></tbody> </table> initialize( ) render( ) this.collection.bind('reset', this.render); brokerageAccount brokerageAccount brokerageAccount
  • 22. Composing an interface from multiple views – View Hierarchy AccountsPage AccountsTab UserPageHeaderWidget AccountTableWidget AccountChartWidget AccountView FooterWidget AccountView AccountView AccountView
  • 23. Inserting pages and widgets dynamically index.html <!DOCTYPE html> <html> <head> ... </head> <body> <div id="container"> <!-- Pages go here --> </div> </body> </html>
  • 24. A typical page AccountsPage.js BaseView.extend({ postRender: function() { this.addChildren([ { viewClass: UserPageHeaderWidget, parentElement: this.$el }, { viewClass: AccountsTab, parentElement: this.$el }, { viewClass: FooterWidget, parentElement: this.$el } ]); } }
  • 25. A typical widget UserPageHeaderWidget.js BaseView.extend({ tagName: 'header', className: 'user-page-header', template: { name: 'UserPageHeaderTemplate', source: UserPageHeaderTemplate } }); UserPageHeaderTemplate.html <div class="user-info"> <span>{{firstName}} {{lastName}}</span> <img src="img/person-icon-small.png" alt="seperator" /> <a class="js-signOut" href="#">Sign Out</a> </div> <h1 class="ir">Bullsfirst</h1>
  • 26. Classic Server-Side Layered Architecture User Interface Layer Accepts user commands and presents information back to the user Application Layer Manages transactions, translates DTOs, coordinates application activities, creates and accesses domain objects Domain Layer Contains the state and behavior of the domain Infrastructure Layer Supports all other layers, includes repositories, adapters, frameworks etc.
  • 27. Bullsfirst Client-Side Layered ArchitectureFrameworkPresentationLayerDomain
  • 28. In-Application Messaging • Interactions between table and chart • If theses widgets interacted directly, the coupling would be too tight • Use a message bus (a.k.a. pub/sub) to decouple the components Account : mouseover
  • 29. JavaScript Modularity A pattern that supports large scale application development
  • 30. How much of your application can you hold in your head at once? Bullsfirst is about 2000 lines of JS
  • 31. Have you ever been in Dependency Hell? <script src="js/form2js.js"></script> <script src="js/toObject.js"></script> <script src="js/base64_encode.js"></script> <script src="js/utf8_encode.js"></script> <script src="js/format.js"></script> <script src="js/treeTable.js"></script> <script src="js/jalerts.js"></script>
  • 32. AMD and RequireJS to the rescue AMD: Asynchronous Module Definition (an API for defining and loading JS modules) RequireJS: A popular implementation of AMD
  • 33. Modules allow you to break large applications into bite-size chunks Code reuse & separation of concerns Complements the MVC pattern
  • 34. Structure of a Modular App src |-- js | |-- app | | |-- domain | | | |-- Repository.js | | | |-- BrokerageAccount.js | | | `-- ... | | |-- pages | | | |-- home | | | |-- accounts | | | `-- ... | | `-- widgets | | `-- account-table | | `-- account-chart | | `-- ... | |-- framework | | |-- Baseview.js | | |-- Router.js | | `-- ... | `-- vendor | |-- backbone.js | |-- jquery.js | `-- ... |-- sass |-- img `-- index.html 60+ JavaScript files 2000 lines of code But much easier to find things! JavaScript and templates (markup) JavaScript and templates (markup)
  • 35. Defining a Module RequireJS loads all code relative to a baseUrl (set to the same directory as the script used in a data-main) // app/widgets/login/LoginWidget // Defines a widget called LoginWidget define( [], function() { return BaseView.extend({ ... }); } );
  • 36. Using a Module Defining dependency on a module makes sure that the module is pulled in before the dependent code. // app/pages/home/HomePage // Defines the home page that uses the LoginWidget define( ['app/widgets/login/LoginWidget'], function(LoginWidget) { return BaseView.extend({ postRender: function() { this.addChild({ id: 'LoginWidget', viewClass: LoginWidget, parentElement: this.$el }); } ... }); } );
  • 37. Moving templates into text modules <td class="name"> {{name}} </td> <td class="market-value"> {{formatMoney marketValue}} </td> <td class="cash"> {{formatMoney cashPosition}} </td> ... AccountTemplate.html
  • 38. Using templates defined in text modules define( ['text!app/widgets/account-table/AccountTemplate.html'], function(AccountTemplate) { return BaseView.extend({ template: { name: 'AccountTemplate', source: AccountTemplate }, ... }); } ); AccountView.js
  • 39. Optimizing for Production – The Build System • A web application consisting of hundreds of JavaScript files could have severe performance implications in a production environment • RequireJS comes with an optimizer that walks the dependency tree and concatenates all the required JavaScript files into one • The Bullsfirst build system runs the RequireJS optimizer plus other optimizations such as yuicompressor and uglifyjs to reduce the download size of the application – The build system is based on Grunt.js, a task-based command line build tool for JavaScript projects – It cuts down application load time to approximately 2 seconds on a 3 Mbps network
  • 41. Summary • Use the MVC pattern to enforce separation of concerns • Compose your application using smaller Reusable Components • Create a Domain Layer as a central place for views to access information • Use In-Application Messaging to decouple application components • Use Modules to break large applications into bite-size chunks A strong architecture is key to building engaging web applications
  • 43. References • Backbone.js – https://github.com/documentcloud/backbone • RequireJS – https://github.com/jrburke/requirejs • Bullsfirst is an open-source project under http://archfirst.org – Sharing best practices with the developer community – Live demo at http://archfirst.org/apps/bullsfirst-jquery-backbone – Source repository: https://github.com/archfirst/bullsfirst-jquery-backbone – Discussion/feedback at http://archfirst.org/forums/general-discussion 43