News for hackers. Stuff that matters.
Re:ASP.NET MVC 4 Roadmap by spamizbad on Wednesday July 13, 2011 @08:50PM (#2761281)
I disagree. MVC is quite good, but as both a Django and MVC developer I'm still more productive with Django. Certain niceties of MVC break down once your project falls outside of the mold of a cookie-cutter CRUD app interfacing with a 100% Microsoft ecosystem. People have levied a similar criticism against Django (once you color too far outside the lines, things get hard fast) but with MVC it can creep up on you much faster.

MVC shines if you treat it like a lightweight MVC framework and don't get caught up in doing things the "Microsoft" way -- this is massively counter-intuitive to anyone coming from a Python or Ruby background, who prefer to code in an idiomatic way by default. You can take advantage of its powerful routing system, various helper functions, and a decent templating language: Razor - which I hope Microsoft keeps and doesn't replace like it did to the 2 or 3 other templating syntax systems that proceeded it.

Re:ASP.NET MVC 4 Roadmap by kenjackson on Wednesday July 13, 2011 @09:18PM (#2761345)
Certain niceties of MVC break down once your project falls outside of the mold of a cookie-cutter CRUD app interfacing with a 100% Microsoft ecosystem.

I guess my question would be, what's an example of this. I find MVC with Razor extremely productive. I rarely even think of a framework when I'm using it -- I'm just typing what I'd like to make happen (for the most part).

And for me the tooling makes my life much easier. I know this is controversial statement for Django/Rails devs who are pretty much vi/emacs devs, but simple things like being to jump between quickly seeing all defs/uses/implementations of a method/property/class/assembly is extremely useful. But I hacked away on vi for almost 20 years, so I realize its allure.

Re:ASP.NET MVC 4 Roadmap by spamizbad on Wednesday July 13, 2011 @09:39PM (#2761405)
> I guess my question would be, what's an example of this.

One example that stands out to me in the whole concept of strongly typed views. Nice in theory, but ultimately tightly coupling your view to your model (or your model to your view, depending on your perspective) is very Webforms-ish. You can tell they put in place these practices to ease adoption among the current crop of vanilla ASP.NET developers.

Another example is being able to quickly bake-in full-text-search into your application. With Python/Django you can use something like Haystack. Ruby has equivalents. With MVC, what are your options? Do it by hand with Lucene.NET? Get there a bit faster with .NET connector for Solr? This is more of a .NET ecosystem complaint, but ecosystems matter.

> And for me the tooling makes my life much easier.

I agree. Working with Visual Studio is great. With that said, I missed being able to "edit on the fly" my Python code and immediately pop into the browser to check, so now I just have a build script that builds and stages my projects automatically on an IIS server so I can accomplish what I got for free in Python/Django.

Re:ASP.NET MVC 4 Roadmap by smhinsey on Wednesday July 13, 2011 @09:50PM (#2761428)
I think strongly typed views are an area where things fall down due to lack of guidance rather than design. I don't think a view model is the same thing as the model in MVC.

In my MVC apps, I use them pretty much exclusively, but they exist completely independently from my application model (they represent compositions thereof). This really only makes sense in apps of a certain scale, though, so having the option not to use them, or to use dynamic views (not sure if they count as strongly typed, but they are a weird middle ground) is definitely useful.

Re:ASP.NET MVC 4 Roadmap by lusr on Thursday July 14, 2011 @06:34AM (#2762446)
What's wrong with strongly-typed views? I appreciate having the compiler do type checking for me so that I don't have to write a bunch of unnecessary unit tests to do the checks, and it makes refactoring straightforward. More importantly, on projects with larger teams, a strongly-typed view model means other developers can quickly understand expectations without having to dig into the view details, and designers can work on the view according to a fixed, documented and explicit contract independent of the progress of the implementation.

If you're working on a small, simple application with 2 or 3 other developers maybe it's not that big a deal, but on medium+ sized line of business application teams with 20+ developers it makes a massive difference when you need to fix somebody else's bug in an area you don't have much background in.

And what problems did you have building full-text search into your application? I used SQL Server + Full Text catalog for the first time ever recently and I was up and running in a few minutes. That being said I'm not familiar with what Lucene offers, so maybe you have something in mind that SQL Server does not support.

Re:ASP.NET MVC 4 Roadmap by notJim on Wednesday July 13, 2011 @10:38PM (#2761540)
In reply to your first point, you should really consider using ViewModels. It a) makes views cleaner because it gives you a place to put formatting, and b) provides for some element of decoupling your views and models.

If you're passing models directly to views with Django, don't you have exactly the same problem?

Re:ASP.NET MVC 4 Roadmap by notJim on Wednesday July 13, 2011 @10:42PM (#2761546)
> I guess my question would be, what's an example of this.

I don't know if this is exactly what your parent had in mind, but I found it relatively difficult to make a REST API. I had to work around a lot of things with model binding and routing to come up with my solution, and even after that, I still find it kind of hacky. In addition to that, IIS fights you at several points along the way, for example by adding spurious HTTP headers or doing things like automatically redirecting certain status codes.

With a framework likes rails, this is baked right in. With the PHP framework I used to use, the framework was so transparent and lightweight that it was trivial to bend it to my whim.

A lot of this was exacerbated by the fact that it was much harder than it should be to set up my project to use the source code for the framework that it should be. In thoery, you just grab the project from MS, add it to your solution and change some references, but in practice, if you're using any other libraries that were built against the DLL from Microsoft, you run into issues, because the MS DLL is signed, and the DLL you build from source is not.

Re:ASP.NET MVC 4 Roadmap by raarky on Thursday July 14, 2011 @02:47AM (#2762017)
"and don't get caught up in doing things the "Microsoft" way"

agreed. I've been an ms dev for a while but over the last couple years have branched out into python. Since then, I've really started to hate writing "best practice" code in .net where you get lost in a sea of interfaces and over-used design patterns.

Re:ASP.NET MVC 4 Roadmap by silverbax88 on Wednesday July 13, 2011 @09:18PM (#2761343)
I find that Django doesn't even come close to MVC. But as to your second point, doing lightweight MVC (not the junk that MS has offered as examples) with Razor is by far the slickest, fastest development environment I've worked with for web.
Re:ASP.NET MVC 4 Roadmap by notJim on Wednesday July 13, 2011 @10:46PM (#2761555)
Razor is a part of MVC...
Re:ASP.NET MVC 4 Roadmap by alexro on Thursday July 14, 2011 @05:42AM (#2762330)
Not necessarily, have a look at RazorEngine - this is a standalone dll that lets you use Razor anywhere