ASP.NET MVC and WebAPI Tutorials
asp.net
asp.net
Take a look at the great Django manual (https://docs.djangoproject.com/en/1.4/) to see what I mean.
Documentation is one area where it feels like an open source approach is the way to go. Get the community to contribute, along with MS, to a single well-defined structured document.
Can we have support and out of band releases for asp.net mvc without having to go through connect or partner support, which are both to be honest, utter shit?
Also can you get the API right and leave it right so we don't have to piss around for a week with our container and testing environment.
And finally, can you give us something better than razor which has a parser that isn't made of broken twigs and has proper separation of content and programming language (its horrid sorry). Jinja2/django/golang templates FTW.
Oh and sort out SQL 2012 licensing. It's going to cost us £768,000 to upgrade out kit from 2008 to 2012. Postgres migration is an order of magnitude cheaper.
I'm coming from a large asp.net mvc project and its not pleasant, sorry. Welcome to Microsoft centric development!
Content on the web site is pretty good though.
Depending on the kind of support you're looking for, the discussions and issues on CodePlex may help as well. Otherwise, there's community support (often including ASP.NET team members) in the following places: http://forums.asp.net/1146.aspx/1?MVC http://stackoverflow.com/ http://jabbr.net/#/rooms/aspnetmvc
There are some other view engines available if you don't like Razor. Since you mentioned Django, I'm guessing you've looked at NDjango(http://ndjango.org/index.php?title=NDjango_Home). Another one I've been keeping an eye on is Parrot (http://thisisparrot.com/) - still in development, but I really like the syntax.
After that it got kinda ranty so not sure if I missed some other questions.
We've looked at NDjango, but it's based on F# and as we well know, unless a product is a mainstream MS platform then it's liable to go out of the window on a whim or is shrouded constantly with uncertainty (choke silverlight, original workflow foundation, XNA? etc).
Sorry if this is rather critical and slightly ranty, but I'm slightly pissed off with maintaining this mess.
It's crisp concise and fast.
Positives --------- The articles posted on your site are top notch. For eg: In the page I see now, I wanted a beginner article on the latest TypeScript buzz, it's there. The WebAPI and Rosyln were fun to read, so was the MVC with TDD and many more articles listed.
Negatives --------- Someone has mentioned this in a comment here, and I do it again. Why don't we have a community section for Azure, Windows Apps and so on? I find information from the community much easier to understand and practical and makes up for the incomplete MVC and WebAPI documentation. The same goes for other technologies as well.
Is anyone listening?
I do know that the Azure site team's looking at expanding community content. They've contacted me to ask about how we handle the community info on the site home page. In case you're interested, here's the overview: http://weblogs.asp.net/jgalloway/archive/2011/06/22/the-asp-...
Scroll down to New Features for a list of changes: http://www.asp.net/whitepapers/mvc4-release-notes
FYI .NET 4.5 will be supported in all roles later this month.
Here are a few links that may be insightful on how they work:
http://oreilly.com/catalog/progcsharp/chapter/ch18.html
http://msdn.microsoft.com/en-us/library/aa288454%28v=vs.71%2...
I also used T4MVC, which may have fallen by the wayside, but that kept a lot of the "magic strings" out of the code.
Edit: That library looks pretty good as well. It does come down to a personal preference thing.
I've been using it on a huge project (145 controllers)since CTP2. I wouldn't use it again.
we're currently investigating werkzeug, python, sqlalchemy and postgresql as a replacement for a new project, particularly also because we got shafted by SQL 2012 per core licensing.
Stay away - you have been warned.
I did just run into a pretty nasty and obscure bug. (That was the first though.)
In my case it manifested on ajax calls but not the initial page load. I had a custom grid that worked fine on the first load but blew up when the user tried to page or sort it. And it only happened on production, because the prod server had the component mentioned in the link installed, but the dev and stage servers didn't.
Luckily the guy administering the web servers tracked down the configuration difference, googled, and found the above link, and I was able to make a small change to my code to work around it, pre-calculating the url on the initial load and just referencing the resulting string on the ajax call (specifically, using lexical closure instead of calculating the url inside a lambda). That fixed it.
This was on MVC3.
I think it has more to do with getting uptake among the WCF crowd than anything else. IF MS doesn't specifically call it out the folks that had bought into the kool-aid to use WCF for all services probably would never see it. As it is, only 50% of them will see it.
The MS stack has a LOT of 80% developers who are buried in the bowels of some organization happily doing the same thing they've been doing since they first learned .NET.
Heck, I had a call from an organization the other day looking for a senior developer, but they had to have intimate knowledge of a perticular third parties UI control library, because that was what they were using when they wrote the original application in VB6. Couldn't convince them that they probably don't need the 3rd party controls for an HTML app, not could I convince them that any senior developer worth hiring would be able to understand and use said library in a matter of hours if they were truly needed.
Over the last three years I've come to understand that it's I'm not that I'm awesome, it's that most developers are just bad at their jobs (present company probably excluded).
Also, Web API isn't intended to replace WCF. The "connected systems" people have a whole different set of needs than people building simple web-facing APIs. I don't think we should expect to see WCF or "Add Service Reference" going away anytime soon.
I did NOT intend to imply that it was a replacement for WCF. I meant to imply that it is a replacement for the WCF REST Starter Kit, and if MS didn't make a huge deal out of it, a lot of people that had gotten used to using WCF for web services would never see it.
1. http://www.asp.net/web-api/overview/hosting-aspnet-web-api/s...
Gleen Block has a 20 minutes long video on this topic if you need more info: http://www.tugberkugurlu.com/archive/why-do-i-need-asp-net-w...
Also, you don't need ASP.NET MVC 4 to use ASP.NET Web API. Just install Microsoft.AspNet.WebApi package into your existing ASP.NET MVC 3 project, you will be good to go. Just be careful for the order of routes. Both ASP.NET MVC and Web API routes collected under the same collection and a request may go into another pipeline rather than intended one if routes aren't set up properly.
The small improvements to Razor (e.g. automatic ~/ parsing and conditional shortcuts) are also nice time/trouble savers.
DisplayModeProvider.Instance.Modes.Insert(0, new DefaultDisplayMode("iPhone") { ContextCondition = (context => context.GetOverriddenUserAgent().IndexOf ("iPhone", StringComparison.OrdinalIgnoreCase) >= 0) });
After calling that, you can create a view (index.iphone.cshtml) and it'll be automatically picked up when the condition's matched. This example uses the user agent, but you can use any logic you'd like - cookie / database call / time of day / whatever.
Edit - Found the answer :) http://www.howtogeek.com/113439/how-to-change-your-browsers-...