Is There Still Room for Backbone.js

  • 1,326 views
Uploaded on

Backbone.js is one of the original MV* libraries, but since it's introduction there have been many new MV* solutions made available. Find out why Backbone.js still has an important part to play in …

Backbone.js is one of the original MV* libraries, but since it's introduction there have been many new MV* solutions made available. Find out why Backbone.js still has an important part to play in JavaScript application development.

More in: Software
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,326
On Slideshare
0
From Embeds
0
Number of Embeds
5

Actions

Shares
Downloads
6
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide

Transcript

  • 1. Is there still room for backbone.js? of course there is! what would we do without it …
  • 2. Principal Front End Architect at Carma AUthor of Beginning Backbone.js @SUGRUE www.jamessugrue.ie
  • 3. HELPS STRUCTURE CODE MODEL VIEW CONTROLLER LIGHTWEIGHT 6.4KB MATURE 2010 UNOPINIONATED
  • 4. WHY DO WE NEED MODEL VIEW WHATEVER
  • 5. 2005
  • 6. 2006
  • 7. 10 MINUTES LATER
  • 8. EVEN JAVASCRIPT NEEDS STUCTURE
  • 9. Controller View Model DOM
  • 10. BACK TO BACKBONE
  • 11. DEPENDS ON OPTIONAL
  • 12. REpRESENts A SINGLE DATA OBJECT ! CONNECTS TO SERVER URL TO POPULATE / PERSIST ! WHEN DATA CHANGES, EVENTS FIRE BACKBONE MODEL
  • 13. BACKBONE MODEL Tweet = Backbone.Model.extend({ });
  • 14. BACKBONE MODEL: BASICS DEFAULT VARIABLES CONSTRUCTOR BUILT-IN FUNCTIONS YOUR OWN FUNCTIONS
  • 15. BACKBONE MODEL: USAGE
  • 16. BACKBONE MODEL: CHANGE EVENTS
  • 17. BACKBONE COLLECTION BULK OPERATIONS ON MODELS ! CONNECTS TO SERVER URL TO POPULATE / PERSIST ! WHEN DATA CHANGES, EVENTS FIRE ! LOTS OF QUERY and FILTER FUNCTIONS
  • 18. BACKBONE COLLECTION Timeline = Backbone.Collection.extend({ });
  • 19. BACKBONE COLLECTION: BASICS MODEL CONSTRUCTOR URL
  • 20. BACKBONE VIEW CHANGES THE DOM ! CAN HANDLE DOM EVENTS ! SUBSCRIBE TO CHANGE EVENTS IN THE DATA LAYER ! USE TEMPLATE FOR EFFICIENT RENDERING
  • 21. BACKBONE VIEW: THE DOM
  • 22. BACKBONE VIEW: THE TEMPLATE
  • 23. BACKBONE VIEW TimelineView = Backbone.View.extend({ });
  • 24. BACKBONE VIEW: BASICS DOM ELEMENT TEMPLATE DOM EVENT HANDLING RETRIEVE THE COLLECTION
  • 25. BACKBONE VIEW: RENDERING APPEND TO DOM
  • 26. BACKBONE ROUTER HANDLES APPLICATION STATE ! PROVIDES BOOKMARKABLE STATE ! SUBSCRIBE TO CHANGE EVENTS IN THE DATA LAYER [CONTROLLER]
  • 27. BACKBONE ROUTER CONTROLLER AppRouter = Backbone.Router.extend({ });
  • 28. BACKBONE ROUTER: BASICS ROUTES EVENTS HANDLERS
  • 29. DOM Model Collection ROUTER VIEW
  • 30. THINGS TO WATCH OUT FOR
  • 31. ZOMBIE VIEWS
  • 32. BAckBONE EYE
  • 33. BREAK DOWN 
 RENDER FUNCTION
  • 34. PRECOMPILE TEMPLATES
  • 35. HOW DOES BACKBONE STAND OUT?
  • 36. UNOPINIONATED === CONTROL
  • 37. ECO SYSTEM
  • 38. MATURITY
  • 39. TOOLING
  • 40. WANT TO USE BACKBONE TONIGHT?