Hello,
We are designing a system that has functionality that is essentially the same at the presentation layer and the exposed API layer. My question is what technique / strategy to use so we can get the most reuse out of our code with performance in mind?
Here's a simplified example:
A user can add a Customer via a web form. This will fire the Customer.Create() method.
An API consumer / user can add a Customer via a SOAP / HTTP-POST to a web service which will call the Customer.Create() method.
Imagine these layers:
PRESENTATION
|
|
WEB SERVICE API (Customer.Create() is available here
|
|
FACADE Business Object Interface - Customer.Create() signature is here
|
|
BUSINESS Business object - Customer.Create method() is fleshed out here
|
|
DATA ACCESS - Writes data
The presentation layer SOAP calls the Create() web method, which calls the facade's Create() method which calls the business object's Create() method which wires via the data access layer.
Questions:
Is there a concern about performance in using the API's web services in our presentation layer, or are there alternatives to connect the presentation layer directly to the facade? If so, what technology to use (WCF, Remoting, Web Services, etc)?
Please let me know if you need any more clarification. I am having trouble finding out if it is common to consume your API in a presentation layer, or do you "go around it" for performance reasons.
Any other concerns that I may not be seeing?
Thanks!