• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Backbone.js
 

Backbone.js

on

  • 817 views

 

Statistics

Views

Total Views
817
Views on SlideShare
760
Embed Views
57

Actions

Likes
1
Downloads
69
Comments
0

1 Embed 57

http://www.ivanomalavolta.com 57

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