4 ms·
I think this guy has never heard of Web API (http://www.asp.net/web-api http://www.asp.net/web-api). He's saying MVC is bad, then he writes code that just retu
by skrowl 13y ago
I think this guy has never heard of Web API (http://www.asp.net/web-api http://www.asp.net/web-api). He's saying MVC is bad, then he writes code that just returns serialized data instead of views.... which is exactly what Web API does.
- jchannon 13y agoYeah but WebAPI sucks :)
- sremani 13y ago"Which basically means it can be used as a viable replacement for WebAPI or MVC". He does know about WebAPI.
- skrowl 13y agoOh I agree that he mentions it in his article, but everything he says is good about his library is already done (better, I might add) by Web API.
- philliphaydon 13y agoHow is anything WebAPI does, better? Its routing is rubbish - waiting for V2 for fixed routing (AttributeRouting support so its not hidden away) Its terrible to extend. Its slower than Nancy. Its hard to test out of the box.
- jchannon 13y agoHave you used Nancy? When you have then you can say WebAPI is better. Until then, keep your MS Fanboy comments to yourself
- red__square 13y agoskrowl, can you quantify your arguments as to why you think Web API is better? In what way? What do you not like about Nancy, where does it fall short?
- untog 13y agoI'm pretty sure Nancy predates the Web API by a decent amount of time. So it wasn't "already done" when Nancy was written. They both have differences, and are equally valid choices. Aside from anything else, I give Nancy time because I'd love to see more open source independent development on the .NET platform.
- philliphaydon 13y agoAhh, WebAPI. The thing that MVC should have been, but still falls short. Promoted as an 'API' despite the fact it does the same thing as MVC, only slightly better. Guess what, your website is an API, it just happens to return text/html instead of some other format you specify. If you use MVC and WebAPI, you're doing it wrong. Also... http://weblogs.asp.net/shijuvarghese/archive/2013/07/30/writing-unit-tests-for-asp-net-web-api-controller.aspx http://weblogs.asp.net/shijuvarghese/archive/2013/07/30/writ... vs http://www.marcusoft.net/2013/01/NancyTesting3.html http://www.marcusoft.net/2013/01/NancyTesting3.html Sums up WebAPI for me.
- edwinnathaniel 13y agoMany people develop a web-app using MVC-based framework and have a separate API endpoints using lightweight library. SpringMVC + JAX-RS1/2 RoR + Sinatra A web-app using some framework + NodeJS for API There's nothing wrong with that as you may want to have different models or different configurations (throttling or whatnot). Using MVC-based framework for your API endpoint is overkill.
- corresation 13y agoIsn't this what WCF does as well? WCF will happily interact with JSON clients, and make spinning out services blissfully easy and efficient.
- jchannon 13y agoReally? WCF? Really, you're sticking up for WCF?
- philliphaydon 13y agoHahaha, have you actually used WCF? You may as well just use SOAP. You wont end up slitting your wrists. WCF's only benefit is TCP bindings. If you're doing any HTTP stuff, stay clear of WCF.
- corresation 13y agoI'm wondering if you've ever actually used WCF, or if you're simply incredibly ignorant about how to use it (why understand existing systems when you can recreate them -- poorly -- yourself), as creating a JSON-friendly web service in WCF is absolutely trivial. Through some very large scale systems I have had absolutely no issues, whatsoever, with it. Your issues with it might have more to do with you. Odd that the two single replies I got are a couple of bulldogs desperately shooting any alternative to this submission down.
- philliphaydon 13y agoCurrently in the process of ripping out WCF and replacing it with ServiceStack. Because WCF is such a pile of shit. If you seriously think WCF is good, and 'trivial' then you're clearly a MS fanboy who've never tried alternatives. I used to be like you, think WCF was the bee's knees. WCF promote poor service design, in an untestable manner, has no real support for DI, has terrible configuration, unhelpful exceptions, faults, message size limitations that cause headaches, horrifically slow. The only benefit to WCF is TCP endpoints. End of story.
- 13y ago