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

Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integrationmarketing932765
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityIES VE
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observabilityitnewsafrica
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Nikki Chapple
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 

Recently uploaded (20)

Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS:  6 Ways to Automate Your Data IntegrationBridging Between CAD & GIS:  6 Ways to Automate Your Data Integration
Bridging Between CAD & GIS: 6 Ways to Automate Your Data Integration
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Decarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a realityDecarbonising Buildings: Making a net-zero built environment a reality
Decarbonising Buildings: Making a net-zero built environment a reality
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security ObservabilityGlenn Lazarus- Why Your Observability Strategy Needs Security Observability
Glenn Lazarus- Why Your Observability Strategy Needs Security Observability
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
Microsoft 365 Copilot: How to boost your productivity with AI – Part one: Ado...
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 

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.