Part1



UNDERSTANDING MVC?



  • Why do we need MVC?
  • Use DOM changing libs like jQuery
  • Another alternative of jQuery?
  • Lost in nested pile of jQuery callbacks and DOM elements
  • No real structure

SPAGHETTI CODE

  • COMPLEX AND TANGLED CONTROL STRUCTURE


WHAT is MVC? (or MV*)


Traditional MVC

  • Model - Domain-specific knowledge and data
  • View - UI of the application
  • Controllers - Handle the input and updates the state

MV* in JS


  • AVOID COMPLEX UI
  • REDUCE HTTP REQUEST NUMBER
  • AVOID SPAGHETTI CODE


SINGLE PAGE APPLICATIONS

EXAMPLES?
WHY?





LETS TAKE AN EXAMPLE


TO DO LIST
Made with Slides.com