最近幾天看到滿多篇文章提到了ASP.NET MVC Framework,雖然有關於.NET的MVC架構好像有MonoRail可以玩,但是這次的ASP.NET MVC Framework是Microsoft自己搞出來的架構,應該值得玩玩看:p

等過一陣子release了再來玩玩看,據說會跟Visual Studio 2008 RTM一起release喔:p

>>>>> Will MVC Framework be include in VS 2008 RTM?

The MVC Framework will work with VS 2008 RTM (we'll be releasing the first preview release of it at the same time as VS 2008 RTM).  The MVC framework itself will live in a separate assembly to begin with, and then be built-in to .NET 3.5 SP1.

後兩個連結裡面有提到一些ASP.NET MVC Framework的特色:

  • Natively support TDD model for controllers.
  • Provide ASPX (without viewstate or postbacks) as a view engine
  • Provide a hook for other view engines from MonoRail, etc.
  • Support IoC containers for controller creation and DI on the controllers
  • Provide complete control over URLs and navigation
  • Be pluggable throughout
  • Separation of concerns
  • Integrate nicely within ASP.NET
  • Support static as well as dynamic languages

在URL的routes設定,預設格式是:

/<RouteName>/<Action>/<Param1>/<Param2>