Slide 6
Slide 6 text
What problems does this
solve? Well, just as how
having separated
functions solve the
problems of readability,
modularity, and coupling,
so does MVC.
WHY MVC?
Well, like doing many things in life, it always helpful to be
well organized. Models, Views and Controllers are
distinctly different pieces of code that helps to provide
different functions to your overall project. Because of that,
they are kept separate and organized.
Imagine if you were designing a program. You wouldn't
put all your code into one function, would you? No, you
would divide them up into separate smaller functions that
solve very specific tasks. Likewise, as programmers,
we're constantly looking for ways to separate and divide
our large applications to smaller bits of pieces.
Say if you wanted to change a piece of code, you can tackle
it in a smaller subset that is more or less isolated from the
larger piece of code. This allows you to add, modify or
remove code more efficiently and logically. It also helps in
testing, since similar code is sectioned into groups,