Thanks so much for your help. Taking up your side note. Can you explain
better what you mean using web methods as facade over my business logic. I'm
new to both web services and enterprise application programming. Thanx.
I believe what Hammad means is that you create a class library for example,
with all of your business logic in it, reference this in your web service and
make the calls through it.
So you'd have something like this in your WS...
..............................................
private MyBusinessComponent oBusiness ;
public MyWebService
{
oBusiness = new MyBusinessComponent() ;
}
[WebMethod]
public bool SaveBusinessObject(object oObject)
{
oBusiness.SaveBusinessObject(oObject) ;
}
..............................................
rather than...
..............................................
private MyBusinessComponent oBusiness ;
public MyWebService
{
}
[WebMethod]
public bool SaveBusinessObject(object oObject)
{
ValidateObject() ;
MySQLCommand.Execute(sqlString) ;
}
..............................................
> Thanks so much for your help. Taking up your side note. Can you explain
> better what you mean using web methods as facade over my business logic. I'm
[quoted text clipped - 13 lines]
> > > either returns an error or an integer. How do I catch this error in the web
> > > method? Thanks.
Hammad Rajjoub - 21 Jul 2005 06:37 GMT
Yes Steve you are right. Phlakie i would suggest you to read "Enterprise
Solution Patterns" available at msdn.com/patterns web site. Following are a
couple of resources that should help you out with your design and
imeplementation.
Facade Pattern:
http://en.wikipedia.org/wiki/Facade_pattern
Web Service Facade Solution
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnpag/html/WSFa
cadeLegacyApp.asp
best regards,
Hammad
> I believe what Hammad means is that you create a class library for example,
> with all of your business logic in it, reference this in your web service and
[quoted text clipped - 51 lines]
> > > > either returns an error or an integer. How do I catch this error in the web
> > > > method? Thanks.