jQuery AJAX POSTing to ASP.NET MVC 3
Getting your model binding to work properly with jQuery takes a bit of trial and error if you’re just getting started. There are a couple ways to send your data and you don’t really know which way is going to bind properly to which C# type. Here is a quick example for reference after I got multiple photo deletion working on Shuttr. The basic gist of this is that binding an array of ints in Javascript requires an ICollection in C# to make the magic…
Where’s the Azure focus Microsoft?
I moved Shuttr to Windows Azure a year or so ago and I’ve been very impressed with the platform. It’s been fast, stable, reliable, etc. There have been numerous reductions to their pricing model which have made it a lot more palatable. http://blogs.msdn.com/b/windowsazure/archive/2012/03/08/announcing-reduced-pricing-on-windows-azure-storage-and-compute.aspx http://blogs.msdn.com/b/windowsazure/archive/2011/10/27/microsoft-lowers-storage-cost-for-blob-and-table-storage-in-windows-azure.aspx http://blogs.msdn.com/b/windowsazure/archive/2012/02/14/announcing-reduced-pricing-on-sql-azure-and-new-100mb-database-option.aspx With these new pricing reductions we now have a full testing environment up in Azure permanently with a 100MB SQL Azure database and an extra small web role. It’s virtually free for that. Shuttr’s main expense is storage given that…
Writing a JSON API in ASP.NET MVC 3
Here is a snippet of the source for the current API on Shuttr. The repositories are bound using Ninject so that our code is unit testable. As you can see, the actual call is pretty simple using LINQ, anonymous objects and the new JSON helpers in .Net.