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…
New Relic NuGet package: Automatic building and publishing with TeamCity
I’m a big fan of New Relic server/application monitoring and last year I created a NuGet package for them. I wanted to make it easy for people to get New Relic going in an Azure environment and NuGet solves that problem. I’ve used it in production on Shuttr ever since. I approached New Relic when I began work on it, but they didn’t seem all that interested or maybe I didn’t find the right people to talk to. Just last week I was approached by…
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.