I am in an ongoing discussion about what is the best terminology to use in regards to what I call "Controller actions" In particular we are talking about controller action that accept a 'POST' verbs only. A colleague of mine prefers to call them "Web Methods", I suspect this is becuase of the old days of Web Services. The behaviour is similar in some ways I can see that 开发者_JS百科but it does not seem right to me.
So I suppose my question is:
Is it correct to refer to a Controller action that accepts the 'POST' verb, as a Web Method?
Any thoughts greatly appreciated.
The distinction is very unclear. How are you going to refer to a method that accepts PUT
, MERGE
, DELETE
or other verbs (think REST)?
Here we call these "POST-action", "MERGE-action", etc. This is both close to how these method are called in the ASP.NET MVC framework and conveys addtional information on how these actions operate.
I can't say with authority that it's incorrect, but it's definitely confusing, as "web method" is the same term commonly used for operations on an XML (SOAP) Web Service endpoint.
I prefer to call controller actions... actions. Different actions may respond to different verbs.
精彩评论