|
|
|
|
|
by dos1
5197 days ago
|
|
Sorry, wait - how is this different than the RoR magic. Where you can do stuff like MyObject.findByArbitraryProperty and it just works? That's PFM if you ask me. Django, RoR, and Node all have lots of magic bits. You don't have to use any of the magic, which also goes for MVC. (I do agree with you though - just because other frameworks have magic bits doesn't mean I like it in MVC. I would also prefer it not be there. I just don't think you can really pick on MS in this case.) |
|
ASP.NET MVC is way too much of a RoR clone than is good for them. C# programmers aren't used to magic: they're used to compilers telling them about typos. Convention over configuration is nice, but it's essentially the concept of dynamic typing translated to frameworks. It fits badly in a statically typed language.
I'd have much preferred ASP.NET MVC to have less magic and, for instance, decent, controllable, IDE-supported and compiler-guarded routing.
Example: in an action method, parameter names are mapped to URL parameters. This is horrible, I should be able to change the parameter name in any method without calling code being affected. Or, when this is not the case (e.g. when C# 4's named arguments feature is used in calling code), I want a compiler error saying that calling code can't find the parameter anymore.
In ASP.NET MVC, I get neither of those things. I might have as well gone Ruby all the way, then.
In short, it's brittle.
Compiled languages have pros and cons, but if you're compiling anyway, please use all the pros to the max. APS.NET MVC doesn't, and that's a shame.
It's still a nice enough framework, but it screams "missed opportunity", much like all those Java libraries that were ported over to C# back when .NET was new.