Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

By default MVC 4 will return JSON so you don't need to specify the content-type unless you want something that isn't JSON.


It's not the return type, it was the request type. It didn't like if you requested it with plain/text instead of application/json. Which was jQuery's json method's default.


plain/text gives you JSON in MVC 4. I understood what you were saying, the default in MVC 4 is now to return JSON unless you specify otherwise.


Yeah, but this is my whole point. Finally in version 4 they stop mucking around with the requests before they give it to you. Someone, somewhere in the depths of MS clearly believe they understand HTTP better than you do. And keep guessing what you really 'meant'.

Even though they quite clearly don't understand and actually really don't get HTTP. For example take the fact that it's nigh impossible to get the actual request body in ASP.Net. Who's bright idea was that?

In reality every single interface, every single framework they've produced so far has shown a woeful lack of understanding about the web in general and pretty much how it's used outside their world. And I say this as someone who's primarily programmed in VBScript, VB6, C#, Silverlight, ASP.Net and ASP.Net MVC.

I keep almost jumping ship and then they just kinda fix it and I stick around hoping they're not going to make the same mistakes. But they do, jeesus, MVCs ajax stuff is unsurprisingly fucking awful.

But that's the problem with MVC and anything MS led, they don't get the web, they don't get javascript, they keep making incredibly silly decisions.

A good example. Every time I hear 'unobtrusive' js, I just want to scream. They're the cause of this made up problem. No-one else was doing js like that in 2010, no-one else needed unobtrusive javascript. Just MS. There's no such thing as unobtrusive javascript, there's just not writing idiotic magic code like a fucking retard like MS constantly do when it comes to javascript.

And don't even get me started on their 'web services' or WCF. Both deserve to die in a fire.

TL;DR; I love C#, think it's the best language available today by far. I hate asp.net though.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: