Backbone.js
Upcoming SlideShare
Loading in...5
×
 

Backbone.js

on

  • 858 views

 

Statistics

Views

Total Views
858
Views on SlideShare
799
Embed Views
59

Actions

Likes
1
Downloads
70
Comments
0

1 Embed 59

http://www.ivanomalavolta.com 59

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Backbone.js Backbone.js Presentation Transcript

  • •••
  • ••
  • •–•–•–
  • ••–
  • •object.on(event, callback, [context])•object.off([event], [callback], [context])•object.once(event, callback, [context])•object.trigger(event, [*args])
  • •object.listenTo(other, event, callback)•object.stopListening([other], [event], [callback])•object.listenToOnce(other, event, callback)
  • onofflistenTostopListeningchangechange:attributedestroysyncinvaliderrorchangechange:attributedestroyaddremoveDOM events
  • •••••
  • ••••
  • •–––•–•–
  • sync(method, model, [options])•••
  • •–––•––
  • •••
  • get(attributes)set(attributes)changechange:attributedestroyaddremovesyncvia JSONfetchdestroyvalidateidurlurlRoot
  • •••
  • model
  • •••••••
  • add(model)remove(model)changechange:attributedestroyaddremovesyncvia JSONfetchsortpluckfindWherepush/popremoveaturl
  • 
  • this.el•– body, ul, span, img•–•–<div>
  • render()this.elrender()
  • eventsrender()remove()initializeundelegateEventstagNameclassNameidtouchend
  • •–•–
  • •–•–
  • Backbone.history.start()
  • routesactionsroutenavigate