Ask HN: The current state of DotNet Web development
I've been out of DotNet development for a few years (was pretty experienced with 2.0). What are people's current favourite frameworks / approaches for DN development these days. Definitely keen to hear about what people are doing in the land of alt.net as things were starting to get pretty useful even back in the 2.0 days.
BTW, I'm not looking for 'best practice' as I actually don't think such a thing exists, and when people say things like 'best practice approach' I break out in a nasty rash ;)
Nice to have features would be RESTful support and having simple lightweight JSON serialization would be a plus. If the best option is just vanilla DN MVC then I'll go and check it out, but I was interested to hear about alternative options before I start deeper investigation...
Thanks in advance for any suggestions :)
Cheers, Damon.
16 comments
[ 2.4 ms ] story [ 39.2 ms ] threadAside from ASP.NET MVC, there's a few other frameworks out there. You can check out the web parts of Spring.Net ( http://www.springframework.net/docs/1.3.0/reference/html/spr... ) or MonoRail from Castle ( http://www.castleproject.org/castle/projects.html )
Kayak also looks pretty nifty, but seems to be in a bit of state of flux at the moment (more so than OpenRasta).
Both added to the shortlist though :)
http://manosdemono.org (nothing really there right now) https://github.com/jacksonh/manos/blob/master/docs/tutorial/...
JSON is still a mess in .NET. System.Json should be the answer, but it's not everywhere (it's in Silverlight but not the desktop or phone frameworks). JSON.NET is still the best option. There are some other up and coming JSON libs as well.
Any other questions or areas of concern?
Exposing your models as RESTful endpoints that return JSON is still accomplished easily enough easy via controller actions that return JsonResult. You can return any object that JavaScriptSerializer can serialize by simply using `return Json(object);`.
Except for DateTime types. Since it uses JavaScriptSerializer under the hood, Json() serializes DateTime values as \/Date(ticks)\/. That, of course, is more the fault of JavaScript lacking a Date literal than Microsoft's serializer. Everyone has to solve that problem some way or another.
Server Frameworks
- ASP.NET MVC3 (http://www.asp.net/mvc/mvc3)
- OpenRasta (http://trac.caffeine-it.com/openrasta)
- Kayak (http://kayakhttp.com/)
REST Clients (not needed straight away but will be handy)
- Hammock (http://hammock.codeplex.com/)
- RestSharp (http://restsharp.org/)
Thanks for the comments so far, it's going to make things a lot simpler.
Cheers, Damon.
On the MVC side, ASP.NET MVC 3 is due out any day now, and they have a new rails-like Razor syntax that can really cut down on the coding, if you're into that sort of thing. These days, I do most of my work in Silverlight, because I like rich applications.
If you want to learn how to do these things, Channel9 on MSDN is a HUGE help, with plenty of videos and training on a variety of topics.
I personally think that now is the best time to be a .NET developer... .NET 4 really makes things easy without a whole lot of effort. If you get the option to start from scratch and not have to take a lot of legacy, BS decisions with you, you'll go far quickly.
HTH!
Robert McLaws http://www.windows-now.com
http://mikehadlow.blogspot.com/2010/12/explosion-of-alternat...