Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
3  
PW is for issues related to running a site, not building it. This would be a great StackOverflow question. –  Andres Jaan Tack Jul 9 '10 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 ;-) –  Mark Hatton Jul 9 '10 at 16:03
add comment

1 Answer 1

up vote 2 down vote accepted

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.

share|improve this answer
    
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 Jul 13 '10 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 Jul 13 '10 at 13:59
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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