M
Mark Sisson
I'm architecting some business objects in .NET and want to expose some
methods from my biz objects via Web Services. What are the best
practices here? Should I create a facade class manages all of my web
services methods? In other words, is it a best practice to NOT adorn
my biz objects directly with [WebMethod] attributes?
Advantages that I can see:
1. I can control what methods are exposed from underlying biz classes.
2. Biz objects don't need to have extra methods just for public
consumption.
3. The webServiceLayer object could act as a facade when necessary if
needed.
4. Biz objects are reusable and "decoupled" with their web service
front-end
Only disadvantage I can think of:
1. For many methods you may have to retype the biz object's method
signatures into the webServiceLayer class.
Are there any other tips, tricks, or design patterns that people have
for tackling this issue?
TIA
mark
methods from my biz objects via Web Services. What are the best
practices here? Should I create a facade class manages all of my web
services methods? In other words, is it a best practice to NOT adorn
my biz objects directly with [WebMethod] attributes?
Advantages that I can see:
1. I can control what methods are exposed from underlying biz classes.
2. Biz objects don't need to have extra methods just for public
consumption.
3. The webServiceLayer object could act as a facade when necessary if
needed.
4. Biz objects are reusable and "decoupled" with their web service
front-end
Only disadvantage I can think of:
1. For many methods you may have to retype the biz object's method
signatures into the webServiceLayer class.
Are there any other tips, tricks, or design patterns that people have
for tackling this issue?
TIA
mark