SlideShare a Scribd company logo
1 of 17
Javascript MV*
Bruno Félix
Software Engineer @ White Road Software
bruno.felix@whiteroad.pt
@felix19350
Why you should care
Topics
• Why is client side MV* relevant
• Libraries / Frameworks
• Backbone.js in the wild
Disclaimer
I don’t think Javascript is a bad language, but it
had a rough childhood (and some very stupid
design decisions thrown in the mix)
The world’s most popular programming language
0
50
100
150
200
250
20/01/11
20/02/11
20/03/11
20/04/11
20/05/11
20/06/11
20/07/11
20/08/11
20/09/11
20/10/11
20/11/11
20/12/11
20/01/12
20/02/12
20/03/12
20/04/12
20/05/12
20/06/12
20/07/12
20/08/12
20/09/12
20/10/12
20/11/12
20/12/12
20/01/13
20/02/13
20/03/13
20/04/13
20/05/13
Average js size over time (kb)
Source: http://httparchive.org
We are expected to build enduring apps, that
provide user experiences on par with native
apps.
That goes well beyond DOM manipulation.
Using only jQuery (for instance), it’s easy to
create a mess of callbacks and selectors.
We need to focus on higher level concerns right
from the start:
– Structure;
– Persistence strategies;
– Dependency management;
– Code re-use (DRY);
– Testing;
These types of frameworks help us do just that.
JS MV* frameworks offer a simple way to
separate concerns and provide much needed
structure to web apps.
We have a lot of choice, to name a few:
You can view a comple list @ http://todomvc.com
Categorizing libraries/frameworks
Flexible
Barebones
Low learning curve
Opinionated
Lots of features out-of-the box
Higher learning curve
Backbone.js in the wild
Major wins:
• Javascript templating decouples your JS code
from the DOM specifics;
• Code re-use to deal with common patterns;
• Overriding Backbone Sync, to tailor the
persistence strategies to your needs;
Sure, you could do a large web-app using just a
DOM manipulation library… or no libraries at
all…
A Javascript MV* allows you and your team to
be more productive:
– You don’t spend time re-inventing the wheel;
– Helps establishing a clear structure for your
project.
Allows you to integrate new people onto team
easily.
An interesting side effect was that we started
looking at our server side code more like an API:
– We could re-use the exact same API for a mobile
app, delivering it very rapidly;
– At a “macro” level, it helps separate the concerns
even further: server side stuff should just provide
a clean API, the web browser is a delivery
mechanism, just like a mobile app or the
command line.
Resources
About Javascript:
http://www.youtube.com/watch?v=v2ifWcnQs6M&list=PL5586336C26
BDB324
Linters are your friends (but they will hurt your feelings):
– JS Lint: http://www.jslint.com/
– JS Hint: http://www.jshint.com
Backbone Fundamentals:
https://github.com/addyosmani/backbone-fundamentals
A nice introduction to Angular Js:
http://stephanebegaudeau.tumblr.com/post/48776908163/ever
ything-you-need-to-understand-to-start-with
Noteworthy backbone plugins:
Synapse (data binding – seems to have been discontinued):
https://github.com/bruth/synapse
Validation:
https://github.com/thedersen/backbone.validation
Backbone fetch cache:
https://github.com/mrappleton/backbone-fetch-cache
Marionette:
https://github.com/marionettejs/backbone.marionette
Thanks!
Bruno Félix
Software Engineer @ White Road Software
bruno.felix@whiteroad.pt
@felix19350

More Related Content

What's hot

Thin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationThin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationDavid Amend
 
Magento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASSMagento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASSBartek Igielski
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016jancbeck
 
Progressive Web APP ( PWA )
Progressive Web APP ( PWA ) Progressive Web APP ( PWA )
Progressive Web APP ( PWA ) Bijaya Oli
 
What is a good technology stack today?
What is a good technology stack today?What is a good technology stack today?
What is a good technology stack today?Netlight Consulting
 
Lecture 11 - Web components
Lecture 11 - Web componentsLecture 11 - Web components
Lecture 11 - Web componentsBryan Ollendyke
 
HTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for ChangeHTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for ChangeJan Jongboom
 
How to make your site 5 times faster in 10 minutes
How to make your site 5 times faster in 10 minutesHow to make your site 5 times faster in 10 minutes
How to make your site 5 times faster in 10 minutesGal Baras
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introductionshaojung
 
Workspace on asp.net web aplication development
Workspace on asp.net  web aplication developmentWorkspace on asp.net  web aplication development
Workspace on asp.net web aplication developmentKBA Systems
 
Fundamentals of TempDB
Fundamentals of TempDBFundamentals of TempDB
Fundamentals of TempDBBrent Ozar
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack DiscussionZaiyang Li
 
Mean full stack development
Mean full stack developmentMean full stack development
Mean full stack developmentScott Lee
 
Php training in chandigarh - CBitss Technologies
Php training in chandigarh  - CBitss Technologies Php training in chandigarh  - CBitss Technologies
Php training in chandigarh - CBitss Technologies Cbitss Technologies
 
Jakarta js meetup - Real time web apps with vue & firebase - may 17, 2017
Jakarta js meetup  - Real time web apps with vue & firebase - may 17, 2017Jakarta js meetup  - Real time web apps with vue & firebase - may 17, 2017
Jakarta js meetup - Real time web apps with vue & firebase - may 17, 2017Septian Tama
 
WordPress 4.7 と 今後の開発ロードマップ
WordPress 4.7 と 今後の開発ロードマップWordPress 4.7 と 今後の開発ロードマップ
WordPress 4.7 と 今後の開発ロードマップNaoko Takano
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap
 
Introduction to Web Technology Stacks
Introduction to Web Technology StacksIntroduction to Web Technology Stacks
Introduction to Web Technology StacksPrakarsh -
 

What's hot (19)

Thin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentationThin Server Architecture SPA, 5 years old presentation
Thin Server Architecture SPA, 5 years old presentation
 
Magento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASSMagento 2 Community Project - Moving from LESS to SASS
Magento 2 Community Project - Moving from LESS to SASS
 
Windows 8
Windows 8Windows 8
Windows 8
 
WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016WordPress Theme Performance - WP Vienna meetup 8.6.2016
WordPress Theme Performance - WP Vienna meetup 8.6.2016
 
Progressive Web APP ( PWA )
Progressive Web APP ( PWA ) Progressive Web APP ( PWA )
Progressive Web APP ( PWA )
 
What is a good technology stack today?
What is a good technology stack today?What is a good technology stack today?
What is a good technology stack today?
 
Lecture 11 - Web components
Lecture 11 - Web componentsLecture 11 - Web components
Lecture 11 - Web components
 
HTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for ChangeHTML5 for mobile - DiGi Challenge for Change
HTML5 for mobile - DiGi Challenge for Change
 
How to make your site 5 times faster in 10 minutes
How to make your site 5 times faster in 10 minutesHow to make your site 5 times faster in 10 minutes
How to make your site 5 times faster in 10 minutes
 
Web Application Introduction
Web Application  IntroductionWeb Application  Introduction
Web Application Introduction
 
Workspace on asp.net web aplication development
Workspace on asp.net  web aplication developmentWorkspace on asp.net  web aplication development
Workspace on asp.net web aplication development
 
Fundamentals of TempDB
Fundamentals of TempDBFundamentals of TempDB
Fundamentals of TempDB
 
Technology Stack Discussion
Technology Stack DiscussionTechnology Stack Discussion
Technology Stack Discussion
 
Mean full stack development
Mean full stack developmentMean full stack development
Mean full stack development
 
Php training in chandigarh - CBitss Technologies
Php training in chandigarh  - CBitss Technologies Php training in chandigarh  - CBitss Technologies
Php training in chandigarh - CBitss Technologies
 
Jakarta js meetup - Real time web apps with vue & firebase - may 17, 2017
Jakarta js meetup  - Real time web apps with vue & firebase - may 17, 2017Jakarta js meetup  - Real time web apps with vue & firebase - may 17, 2017
Jakarta js meetup - Real time web apps with vue & firebase - may 17, 2017
 
WordPress 4.7 と 今後の開発ロードマップ
WordPress 4.7 と 今後の開発ロードマップWordPress 4.7 と 今後の開発ロードマップ
WordPress 4.7 と 今後の開発ロードマップ
 
Usersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJSUsersnap and the javascript magic behind the scenes - ViennaJS
Usersnap and the javascript magic behind the scenes - ViennaJS
 
Introduction to Web Technology Stacks
Introduction to Web Technology StacksIntroduction to Web Technology Stacks
Introduction to Web Technology Stacks
 

Similar to Javascript mvc

Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of TechnologiesChris Mitchell
 
There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014jbandi
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleIT Arena
 
Boilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development ProcessBoilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development ProcessFibonalabs
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraLINAGORA
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppSt. Petersburg College
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The CloudGatsbyjs
 
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Vadym Kazulkin
 
The Server Side of Responsive Web Design
The Server Side of Responsive Web DesignThe Server Side of Responsive Web Design
The Server Side of Responsive Web DesignDave Olsen
 
2015 - Introduction to building enterprise web applications using Angular.js
2015 - Introduction to building enterprise web applications using Angular.js2015 - Introduction to building enterprise web applications using Angular.js
2015 - Introduction to building enterprise web applications using Angular.jsWebF
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Vadym Kazulkin
 
SignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSam Basu
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | IntroductionJohnTaieb
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web ApplicationSachin Walvekar
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do ThatNathan Smith
 
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Vadym Kazulkin
 

Similar to Javascript mvc (20)

How backbone.js is different from ember.js?
How backbone.js is different from ember.js?How backbone.js is different from ember.js?
How backbone.js is different from ember.js?
 
Transforming the web into a real application platform
Transforming the web into a real application platformTransforming the web into a real application platform
Transforming the web into a real application platform
 
Over view of Technologies
Over view of TechnologiesOver view of Technologies
Over view of Technologies
 
Hybrid mobile apps
Hybrid mobile appsHybrid mobile apps
Hybrid mobile apps
 
There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014There is something about JavaScript - Choose Forum 2014
There is something about JavaScript - Choose Forum 2014
 
Meetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech PeopleMeetup. Technologies Intro for Non-Tech People
Meetup. Technologies Intro for Non-Tech People
 
Boilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development ProcessBoilerplates: Step up your Web Development Process
Boilerplates: Step up your Web Development Process
 
Angular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - LinagoraAngular (v2 and up) - Morning to understand - Linagora
Angular (v2 and up) - Morning to understand - Linagora
 
Best Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile AppBest Practices in Mobile Development: Building Your First jQuery Mobile App
Best Practices in Mobile Development: Building Your First jQuery Mobile App
 
The Future Is The Cloud
The Future Is The CloudThe Future Is The Cloud
The Future Is The Cloud
 
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021Writing less code with Serverless on AWS at AWS Community Day DACH 2021
Writing less code with Serverless on AWS at AWS Community Day DACH 2021
 
The Server Side of Responsive Web Design
The Server Side of Responsive Web DesignThe Server Side of Responsive Web Design
The Server Side of Responsive Web Design
 
2015 - Introduction to building enterprise web applications using Angular.js
2015 - Introduction to building enterprise web applications using Angular.js2015 - Introduction to building enterprise web applications using Angular.js
2015 - Introduction to building enterprise web applications using Angular.js
 
Mvc3 part1
Mvc3   part1Mvc3   part1
Mvc3 part1
 
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
Measure and Increase Developer Productivity with Help of Serverless at AWS Co...
 
SignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ CodetockSignalR Intro + WPDev integration @ Codetock
SignalR Intro + WPDev integration @ Codetock
 
Front End Development | Introduction
Front End Development | IntroductionFront End Development | Introduction
Front End Development | Introduction
 
Making Of PHP Based Web Application
Making Of PHP Based Web ApplicationMaking Of PHP Based Web Application
Making Of PHP Based Web Application
 
HTML5 Can't Do That
HTML5 Can't Do ThatHTML5 Can't Do That
HTML5 Can't Do That
 
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
Measure and Increase Developer Productivity with Help of Serverless at JCON 2...
 

Recently uploaded

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Angeliki Cooney
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 

Recently uploaded (20)

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 

Javascript mvc

  • 1. Javascript MV* Bruno Félix Software Engineer @ White Road Software bruno.felix@whiteroad.pt @felix19350 Why you should care
  • 2. Topics • Why is client side MV* relevant • Libraries / Frameworks • Backbone.js in the wild
  • 3. Disclaimer I don’t think Javascript is a bad language, but it had a rough childhood (and some very stupid design decisions thrown in the mix)
  • 4. The world’s most popular programming language 0 50 100 150 200 250 20/01/11 20/02/11 20/03/11 20/04/11 20/05/11 20/06/11 20/07/11 20/08/11 20/09/11 20/10/11 20/11/11 20/12/11 20/01/12 20/02/12 20/03/12 20/04/12 20/05/12 20/06/12 20/07/12 20/08/12 20/09/12 20/10/12 20/11/12 20/12/12 20/01/13 20/02/13 20/03/13 20/04/13 20/05/13 Average js size over time (kb) Source: http://httparchive.org
  • 5. We are expected to build enduring apps, that provide user experiences on par with native apps. That goes well beyond DOM manipulation.
  • 6. Using only jQuery (for instance), it’s easy to create a mess of callbacks and selectors.
  • 7. We need to focus on higher level concerns right from the start: – Structure; – Persistence strategies; – Dependency management; – Code re-use (DRY); – Testing; These types of frameworks help us do just that.
  • 8. JS MV* frameworks offer a simple way to separate concerns and provide much needed structure to web apps.
  • 9. We have a lot of choice, to name a few: You can view a comple list @ http://todomvc.com
  • 10. Categorizing libraries/frameworks Flexible Barebones Low learning curve Opinionated Lots of features out-of-the box Higher learning curve
  • 11. Backbone.js in the wild Major wins: • Javascript templating decouples your JS code from the DOM specifics; • Code re-use to deal with common patterns; • Overriding Backbone Sync, to tailor the persistence strategies to your needs;
  • 12. Sure, you could do a large web-app using just a DOM manipulation library… or no libraries at all…
  • 13. A Javascript MV* allows you and your team to be more productive: – You don’t spend time re-inventing the wheel; – Helps establishing a clear structure for your project. Allows you to integrate new people onto team easily.
  • 14. An interesting side effect was that we started looking at our server side code more like an API: – We could re-use the exact same API for a mobile app, delivering it very rapidly; – At a “macro” level, it helps separate the concerns even further: server side stuff should just provide a clean API, the web browser is a delivery mechanism, just like a mobile app or the command line.
  • 15. Resources About Javascript: http://www.youtube.com/watch?v=v2ifWcnQs6M&list=PL5586336C26 BDB324 Linters are your friends (but they will hurt your feelings): – JS Lint: http://www.jslint.com/ – JS Hint: http://www.jshint.com Backbone Fundamentals: https://github.com/addyosmani/backbone-fundamentals A nice introduction to Angular Js: http://stephanebegaudeau.tumblr.com/post/48776908163/ever ything-you-need-to-understand-to-start-with
  • 16. Noteworthy backbone plugins: Synapse (data binding – seems to have been discontinued): https://github.com/bruth/synapse Validation: https://github.com/thedersen/backbone.validation Backbone fetch cache: https://github.com/mrappleton/backbone-fetch-cache Marionette: https://github.com/marionettejs/backbone.marionette
  • 17. Thanks! Bruno Félix Software Engineer @ White Road Software bruno.felix@whiteroad.pt @felix19350

Editor's Notes

  1. Do a show of hands of how many attendees regularly have to “deal” with javascript
  2. The graph is comes as no surprise. Just in the last two and a half years the average script size (for the Alexa top 1.000.000 sites) has doubled. So like it or not we are going to have to live with JS.
  3. Add an aside to the problem definition: and these apps should be maintanable in the long run!Refer the fact that in terms of DOM manipulation jQuery is the clear winner, so that issue is pretty much solved.
  4. But jQuery does not give you any structure, so it’s fairly easy to fall into the trap of creating spagetthi code (with a mess of plugins and event listeners, network calls, you name it…)
  5. Basically we have to apply the same standards we use on our server side code.
  6. Make a remark about the fact that not all of these frameworks strictly follow the MVC pattern, but rather adapt it to its needs. Usually you end up with a model and a view, but might not have a controller in the mix (ergo the MV*).Remember: JS MV* is only a tool, for simple web-pages where you need to add a little bit of flair, it might be overkill.
  7. Choice is a double edged knife: you can use a JS stack that is a great fit for your needs, just be ready to spend some time looking for the right plugins etc. On the other hand, frameworks like ember just make those decisions for you, so you’re ready to start focusing on your app right away.Note thatBackbone already comes with a Js templating lib – via Underscore.js, although you are free to use any other library such as Handlebars;In my oppinion this is a great library to get started with because with a moderate investment in time you can do some interesting thingsAngular stands appart from backbone and ember by the fact that it uses the DOM structure (via directives) to drive the app’s behaviour, instead of the JS code (Backbone views and Ember controllers)Refer that ember uses: Models, Views, Controllers, Routers, Templates, persistence, and for each of these deals with the most common issues (e.g. managing nested views, something that backbone doesn´t do).Although it relies heavily on conventions (e.g. you have to name the variables in a certain way in your handlebars templates so that databinding actually works) usually those are quite sensible.
  8. In the next few slides I’ll talk a little bit about my experience with backbone when going beyond the simple TODO list app.
  9. Remember, YOU are the bottleneck, take everything that helps in that front.