Number of Web Services in a SCBAT App

Topics: CAB & Smart Client Software Factory
Feb 15, 2006 at 3:14 PM
originally posted by: JulioCasal

When looking at the Appraisal Workbench I get a question: Is it supposed to have one web service project per CAB module? Or shoud I have one web service project for the entire application? I mean, if a have the Inventory module, the Sales module and the HR module, should I have one web service project for each one? Or should I have one great web service project for all of them?

As Appraisal Workbench has only one module I don´t know which would be the best practice here. Any idea?
Feb 17, 2006 at 12:13 PM
originally posted by: BradWilsonMSFT

Based on feedback, for tomorrow's drop, the guidance package will let you add smart web service proxies from any project, not just the WebServiceProxies project.

Our purpose of isolating our web service proxies into a separate assembly was so that we had a form of "API Isolation"; that is, the types from the Visual Studio generated web proxies -- which are public by default -- do not "leak" into the client application. We did this to reduce confusion for the client developers about which version of "Appraisal" was the right one for them to use.
Feb 23, 2006 at 10:47 AM
originally posted by: GordonKenaston

Hey Brad,

I have the same question and the solution is still a bit foggy(for me at least)...Let's say you needed to add 10 more modules to your R.I. app(Sales, Customers, Inventory, etc). Would you add a web service entry page(.asmx) for each inlcuding the necessary web methods, then create additional folders for each in the WebServiceProvies project, and then add the needed service agent classes in the AppraisalServiceAgent project?


Would you create a WebServiceProxy & ServiceAgent project for each?

BTW: thanks for a cool tool and arch. guidance :)
Feb 27, 2006 at 3:19 PM
originally posted by: BradWilsonMSFT

We're not really giving guidance on how to write services, but rather how to consume them. We wrote a really simple service with RI-1, so that we had something to consume, but you shouldn't consider that code in any way to be guidance on writing services.

As to the proxy/SA question, I think the jury is still out. We definitely like the idea of putting the proxies in a separate project from the service agent, which is in a separate project from the main code. The reason behind this is that one of the common behaviors for a service agent will be to transform server data into client data. Oftentimes, these classes may have similar or identical names, although not necessarily identical definitions. Since the web service wizard in Visual Studio makes all the auto-generated server data classes public, we want to isolate them away into an assembly that nobody references except the service agent. That way consumers of the service agent aren't confused as to which "view" of the data they should be dealing with (they will only ever see the client view, provided by the service proxy).
Feb 27, 2006 at 8:21 PM
originally posted by: JulioCasal

I see Brad. I just would like some guidance on the number of web services. Is there anywhere I could find that guidance?