A few weeks ago, someone posted a response to one of my blog posts. At first glance, it looked like some nice troll-bait. It amounted to this: why are .NET programmers so whiney about MVC? I had to laugh (on the inside) because, sometimes, I forget how spoiled I am by my dev tools.
My friend Dave, does most of his programming in Java. When he works in .NET, he finds it pretty irritating. I’m usually surprised by this.
Dave’s complaints are usually stuff like:
- “Editing .NETcode in VI is pretty clunky”
- “I don’t like the command-line options for the .NET compiler”
- “Your deployment packages are strange”
- “I can’t find the source-code to IIS, so I can’t truly be sure what it is doing”.
Of course, all of this is pretty baffling to me, because I’m thinking, “what in the heck are you doing? Just let VStudio do that for you.” I forget that he is used to doing things “the Java way”. To me, that sounds like “the hard way”, but not to him. He is used to it and he feels comfortable with it.
A few years ago, I got a new droid phone and I felt compelled to write a few programs for it. (how could I show my face, if I didn’t. Right?). After messing around with the Java dev tools and the droid project templates, I found it pretty irritating. There was a bunch of stuff that the dev tools didn’t do. Some aspects of the project were really fragile and seemed to brake if you even looked at it wrong. Also, it was wicked-slow. I felt like I was on Win95 again.
I asked Dave if he had any suggestions for me that would help. He said 1) You aren’t doing this on Windows, are you? It works better in Linux (I’m already like: oh jeez). 2) why aren’t you using the command-line stuff? 3) You should build your model, with some NUnit, before you mess with your view or controller. You are doing this the hard way.
I told him that it seemed like a lot of hoops to jump though. He pointed-out that: “this is how people do this”. The way that I was trying, wasn’t going to work very well. If I start to embrace the preferred way, then things will just work better. I need to let go of my notions of how it should work and just do it this way. This is how everybody does it.
And there you have it. This is why MVC is so hard in .NET. I’m just not accustomed to doing things that way.
MVC is a carry-over from people who are used to doing it that way. People who love MVC, love it because it will work the same (pretty much) in Java and in .NET (or any other language). There is no point in fretting over it. That’s just how it is. If you learn it and become comfortable with MVC, it will work the same, wherever you go. You cannot say the same for nearly any (other) .NET or ASP.NET dev stuff.
So, if I sound like I am opposed to MVC, let me set the record straight. MVC has its merits and it is the right solution for some problems. I would even go so far as to say: even if you plan on never-ever-EVER touching Java (even if .NET is banished from the earth), then you still should not ignore MVC. It is a good idea to give MVC a fair shake and acknowledge that it has a place. Of course, that place might not be everywhere (like, for instance, the place that you work today). However, you shouldn’t say that you don’t like something until you actually know about it.
Looking and learning is good. You don’t have to drink the cool-aid. Just look at it and try to understand it. Be informed. That’s all I’m saying. Someday, your wallet might thank you.