tags:

views:

75

answers:

2

Please can any one tell me that we can have 1000 operation contracts in one service contract in a WCF service. Does it affect maintenance when we make changes to these operations contracts?

+4  A: 

Brief version: yes, theoretically and technically, you could - but that doesn't mean that you should..... the recommended number of operations on a service contract should not exceed 7 to 10, in any best practice recommendation I know....

Extended version:

I'm not saying that'll be a very easy to use and easy to understand service with that many operations. And yes - a service with 1000 operations is much more likely to change, so you'll probably have more frequent updates and thus need to come up with a really good versioning strategy.

You might also want to have a look at the Single Responsibility Principel - a principe of object-oriented design. One class (like your service here) should always have one responsibility and one only - I highly doubt you'll have 1000 methods that all deal with the same responsibility.....

marc_s
Kinda enveloped answer there..
neslekkiM
@neslekkiM: just trying to say: yes, you (theoretically, technically) could - but that doesn't mean you should ....
marc_s
+3  A: 

It would be much easier if someone just said "No, you can't" :-P

larsw
well you *can* - theoretically - but I'm **not** saying that's a good idea....
marc_s