Articles : Page 1 of 1

  • Using an alternate JSON Serializer in ASP.NET Web API

    Using an alternate JSON Serializer in ASP.NET Web API

    Mar 12
    09

    The new ASP.NET Web API that Microsoft released alongside MVC 4.0 Beta last week is a great framework for building REST and AJAX APIs. I've been working with it for quite a while now and I really like the way it works and the complete set of features it provides 'in the box'. It's about time that Microsoft gets a decent API for building generic HTTP endpoints into the framework. DataContractJsonSerializer sucks As nice as Web API's overall design is one thing still sucks: The built-in JSON S...


  • Referencing Routes in ASP.NET MVC The Rails Way

    Referencing Routes in ASP.NET MVC The Rails Way

    May 11
    30

    Routing is probably the most confusing aspect of working with ASP.NET MVC. It’s hard to craft a groovy URL - even harder to link properly off to that groovy URL. Rails leans on Ruby’s forgiving and friendly nature to make this a bit more simple - C#4 allows to get close to this as well. With Rails 3  you define a route in your config/routes.rb like this: match "order/receipt/:id" => "orders#receipt", :as => :receipt # receipt_url You can access this route anywhere in your application ...


  • How to move you posts from Subtext to WordPress

    How to move you posts from Subtext to WordPress

    Jan 11
    05

    A few weeks ago, I finally finished the migration of Daniela’s old blog to a new domain and a new blogging platform: we moved from Subtext to WordPress. The reasons of the move There are two reason behind that move: the big ecosystem around WordPress, and the lack of a real desktop blogging tool on the Mac (combined to the outdated FCKeditor 2 that is used by Subtext). During the migration Daniela thought about a different Information Architecture of her content spread around in the web, d...


  • Using RavenDB with ASP.NET MVC

    Using RavenDB with ASP.NET MVC

    Nov 10
    08

    Traditionally when you think about a database you think of tables, views, indexes and stored procedures. If you have made a career out of developing database centric applications like I have, then chances are that you have spent a great deal of time dealing with issues around referential integrity, normalization and performance. Unless you have been living underneath a rock, then you have probably heard of the newest database trend named NoSQL. NoSQL refers to non relational document databas...


  • Simple Dependency Injection using a Custom MVC Controller Factory

    Simple Dependency Injection using a Custom MVC Controller Factory

    Aug 10
    30

    Whenever I develop an MVC application there is always some degree of data access required. As a best practice, I usually define a interface that my repository objects will adhere to. Creating an interface is generally a requirement for Dependency Injection (DI). DI is a very important pattern if you plan on doing any unit testing later on. For the purpose of this demo, I am going to keep things simple and only create a fake repository. Here is the code: public interface IRepository { Person ...



  • 1