7

MVC seems to be very popular these days, but the "education overhead" of newly learning a chosen MVC framework seems to be quite high. Why should I choose to invest the time to do this, rather than just put my code in with my HTML?

2
  • 3
    PW is for issues related to running a site, not building it. This would be a great StackOverflow question. Commented Jul 9, 2010 at 15:45
  • I disagree. The site proposal clearly states it's for "professional webmasters, professional website operators, SEO experts". Webmasters build and maintain. Operators do the running. And SEO experts - well they just empty wallets out for people ;-) Commented Jul 9, 2010 at 16:03

2 Answers 2

2

As your site grows, it will be easier to manage if your display is separated from your code. You want to modify the design ? It's all separated, you don't have to worry about the code in the HTML. You want to modify the way data are calculated ? It's all separated, you don't have to worry about the HTML in the code.

Your code will also be easier to read and if you want to add other people to the project later, it's easier for them if your code is separated from your HTML.

Once you are used to MVC development, it doesn't really take more time to develop than "normal" development.

2
  • 1
    I agree with all the points noted in this answer. However, one can achieve the excellent goal of separating structure (HTML), presentation (CSS), and logic (JavaScript and server-side programming) in ways other than MVC. So, why MVC specifically?
    – Alan
    Commented Jul 13, 2010 at 13:41
  • To be honest, this question beats me. Mainly because I haven't read about other design pattern other than MVC yet, but I would be interested to know what are the alternative to MVC.
    – HoLyVieR
    Commented Jul 13, 2010 at 13:59
1

MVC splits code into 3 parts your logic that you write in controller,your UI or you can say designing is in view and data related logic is in model so you can easily manage site. It is easy to use as compare to other because if any error occur you can find it easily ,you can use multiple view ad all logic are separated so you can do changes easily.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.