程序師世界是廣大編程愛好者互助、分享、學習的平台,程序師世界有你更精彩!
首頁
編程語言
C語言|JAVA編程
Python編程
網頁編程
ASP編程|PHP編程
JSP編程
數據庫知識
MYSQL數據庫|SqlServer數據庫
Oracle數據庫|DB2數據庫

ASP.NET MVC

編輯:.NET實例教程

如果你看過ScottGu的MVC系列blog,那麼你一定對MVC有了一個初步的認識。這只是驚鴻一瞥!

Rob Conery帶來的才是真正的 ”思想解放“!(用詞太誇張了吧?- 看過Rob的blog 就知道了)

必讀 - http://blog.wekeroad.com/2007/12/06/ASPnet-mvc-using-restful-architecture/

思想解放1 - REST是什麼

People like to equate REST and SOAP in the same sentence, as if it’s an option for web service architecture. The truth is, REST is an architectural principle in and of itself that is as old as the web and, In fact, the Web itself is the REST poster child. More accurately: REST is a state of mind.

思想解放2.1 - 沒有"Pages"只有"Remote Procedure Calls"

you should throw the notion of “pages” away, since these “resources” should be consumable by whatever clIEnt is calling on them (so the information might be an XML or JSON stream). To summarize: stop thinking “pages”, start thinking “Remote Procedure Call”.

思想解放2.2 - 沒有"Form"

The important thing to remember at all times is that  you are building an instruction set for the web - a collection of consumable “Methods” that are displayed via “VIEws”.

思想解放3 - 沒有"Site"

it’s not a collection of pages. It’s an application and as such, the logic can be plugged into other MVC applications.

If you move this to a new MVC Application, or combine it with another, you just reset some routes in your Global.asax and drop in your VIEws (these are static content pages) - and you’re all set!

  1. 上一頁:
  2. 下一頁:
Copyright © 程式師世界 All Rights Reserved