Backbone.js

  • 586 views
Uploaded on

 

More in: Technology , Business
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
586
On Slideshare
0
From Embeds
0
Number of Embeds
1

Actions

Shares
Downloads
74
Comments
0
Likes
1

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. •••
  • 2. ••
  • 3. •–•–•–
  • 4. ••–
  • 5. •object.on(event, callback, [context])•object.off([event], [callback], [context])•object.once(event, callback, [context])•object.trigger(event, [*args])
  • 6. •object.listenTo(other, event, callback)•object.stopListening([other], [event], [callback])•object.listenToOnce(other, event, callback)
  • 7. onofflistenTostopListeningchangechange:attributedestroysyncinvaliderrorchangechange:attributedestroyaddremoveDOM events
  • 8. •••••
  • 9. ••••
  • 10. •–––•–•–
  • 11. sync(method, model, [options])•••
  • 12. •–––•––
  • 13. •••
  • 14. get(attributes)set(attributes)changechange:attributedestroyaddremovesyncvia JSONfetchdestroyvalidateidurlurlRoot
  • 15. •••
  • 16. model
  • 17. •••••••
  • 18. add(model)remove(model)changechange:attributedestroyaddremovesyncvia JSONfetchsortpluckfindWherepush/popremoveaturl
  • 19. 
  • 20. this.el•– body, ul, span, img•–•–<div>
  • 21. render()this.elrender()
  • 22. eventsrender()remove()initializeundelegateEventstagNameclassNameidtouchend
  • 23. •–•–
  • 24. •–•–
  • 25. Backbone.history.start()
  • 26. routesactionsroutenavigate
  • 27.