Reputation: 19872
Are there any general rules on thumb on when to add a method to an existing service or create a new service. For example I need to do persons address look-up via an external third party lets call them XYZ.
Should I
I guess what I am asking do I make the service abstract or not and how generic should it be.
Upvotes: 0
Views: 87
Reputation: 6940
I would say - it depends from your current architecture. If it's a Micro SOA, than a level of granularity IMHO #1 will do just fine:
Create a service called XYZ that I use for all out going calls to XYZ
If you keep the SOLID principles, this will give you your answer on granularity, plus those:
1) Release Reuse Equivalency Principle (REP)
2) Common Closure Principle (CCP)
3) Common Reuse Principle (CRP)
4) Acyclic Dependencies Principle (ADP)
5) Stable Dependencies Principle (SDP)
6) Stable Abstraction Principle (SAP)
Upvotes: 1