开发者

WCF Naming Guidelines/Best Practices

What are the best practices for naming WCF endpoints and methods? What are the conventions you usually 开发者_如何学Gofollow?


I'm not aware of any specific naming conventions here - just use something "appropriate", define a standard, and stick to it :-)

If you're dealing with SOAP web services, those are typically more geared towards functions / methods - e.g. your methods would be something like GetCustomer or UpdateCustomerOrder or stuff like that. Try to come up with a consistent naming - don't use Get.... once, Fetch.... the other time, and Load.... the next time. Same for saving: don't use Save...., Store.. or Put... - settle on one and stick to it.

If you're more into the REST style of WCF - then you're dealing more with resources, e.g. you would have Customer and Order and Inventory as resources in your URL, and then use the basic HTTP verbs (GET, PUT, POST, DELETE) to handle the basic CRUD operations.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜