开发者

WCF Naming Guidelines/Best Practices

开发者 https://www.devze.com 2023-03-31 18:29 出处:网络
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

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

精彩评论

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

关注公众号