001
001

Reputation: 65205

Web service - method naming?

I know naming a webservice method is probably a personal preference, however I'm interested to know what you guys would name it, and why?

1:

AccountCreate
AccountDelete
AccountList
AccountUpdate

or

2:

CreateAccount
DeleteAccount
ListAccount
UpdateAccount

Upvotes: 2

Views: 242

Answers (3)

Tokk
Tokk

Reputation: 4502

Number 2, because I allways use [Verb][object] in methods where possible.

Upvotes: 3

Justin Niessner
Justin Niessner

Reputation: 245479

You're obviously building SOAP based Web Services. When choosing names for those, I tend to go with the most natural English representation. In your case, that is your second set of options.

For me, it makes things clearer and easier for people consuming my services if I name them as close to plain English as possible. For instance if people are trying to create something, but they're not really sure what, they can scan through the documentation of the Create operations and find the closest match for what they need.

It's also consistent with how I name the rest of my methods (assuming we're not talking about RESTful URLs).

Upvotes: 3

Dave Thieben
Dave Thieben

Reputation: 5427

how about:

/Account/Create
        /Delete
        /List
        /Update

Upvotes: 0

Related Questions