When to use ASP.NET MVC to build out REST-ful services and when to use WCF

A common question that comes up is when to use ASP.NET MVC to build out REST-ful services and when to use WCF?

when the only reason for the service’s existence is to service the one application you’re currently building, it may make more sense  would stick with the simple case of using ASP.NET MVC. This is commonly the case when the only client to your JSON service is your web application’s Ajax code.

When your service is intended to serve multiple clients (not just your one application) or hit large scale usage, then moving to a real services layer such as WCF may be more appropriate.

Via Rest For ASP.NET MVC SDK and Sample

RESTful Services with ASP.NET MVC and XHTML

 

There are several reasons to consider using XHTML as the default representation for your ASP.NET MVC RESTful services. First, you can leverage the syntax and semantics for important elements like <a>, <form>, and <input> instead of inventing your own. Second, you’ll end up with services that feel a lot like sites because they’ll be browsable by both users and applications. The XHTML is still interpreted by a human—it’s just a programmer during development instead of a user at runtime. This simplifies things throughout the development process and makes it easier for consumers to learn how your service works. And finally, you can leverage standard Web development frameworks to build your RESTful services.

ASP.NET MVC is one such framework that provides an inherently RESTful model for building XHTML-based services. This article walks through some XHTML design concepts and then shows you how to build a complete XHTML-based RESTful service.

Contents

XHTML: Representing Data and Links
XHTML: Representing Input with Forms
Understanding the ASP.NET MVC Architecture
Implementing the Model
Implementing the Controller
Designing URIs with Routes
Implementing the Views
Consuming the Bookmark Service
Acknowledgments

Via RESTful Services with ASP.NET MVC and XHTML

MVC Membership Starter Kit Released

 

What is the Asp.Net MVC Membership Starter Kit?

The starter kit currently consists of two things:

  1. A sample website containing the controllers, models, and views needed to administer users & roles.
  2. A library that provides testable interfaces for administering users & roles and concrete implementations of those interfaces that wrap the built-in Asp.Net Membership & Roles providers.

MVC Membership Starter Kit Released | SquaredRoot

Upgrading the default ASP.NET MVC project with IoC and the Unity Controller Factory

 

The first part is easy, just grab the Unity DLLs and reference them in your MVC project. At this point, you’re now free to use Unity to inject whatever you feel like. Rigging up the controller factory so that it will use Unity to resolve controllers is equally easy because the mvc contrib codeplex site has already created a class called UnityControllerFactory that does just this. Once you’ve added references to Unity and Mvc.Contrib.Unity from your MVC project, you can change your global.asax.cs file to look something like this:

if (_container == null)
            {
                _container = new UnityContainer();             
                ControllerBuilder.Current.SetControllerFactory(typeof(UnityControllerFactory));                               
               
                _container.RegisterType(typeof(HomeController), typeof(HomeController));
                _container.RegisterInstance(typeof(AccountController), new AccountController());               
            }

 

Via Upgrading the default ASP.NET MVC project with IoC and the Unity Controller Factory [The .NET Addict's Blog]

25+ Best ASP.NET MVC Tutorials and Articles

 
Learn ASP.NET MVC
Script and CSS Management in ASP.NET MVC
Free ASP.NET MVC NerdDinner Tutorial Now in HTML
Upgrading the default ASP.NET MVC project with IoC and the Unity Controller Factory
Integrating Silverlight and ASP.NET MVC
Walkthrough: full example of using MvcContrib grid with jQuery datatable
Modifying the default unit tests for an ASP.NET MVC project to use Moq
Using jQuery Grid With ASP.NET MVC
Asp.Net MVC + jQuery == true

+ More… Via 25+ Best ASP.NET MVC Tutorials and Articles | AjaxLine