When the sales rep is at a customer's
site, he can attach to his home
company's data (normally by selecting an
option when logging in) by means of web
services:
Here's the good news--based on MM .NET's
practice of programming to an interface
rather than an implementation, you don't
have to change anything about your
existing application to access data both
locally and remotely! Here's why...
Normally, an MM .NET business object
uses a data access class which creates a
connection to the back end database for
retrieving and updating data:
When using a Web Service data access
class, as shown in this diagram the
business object instantiates the Web
Service Data access class which looks
just like a regular MM .NET data access
class:
Here's how messages flow:
- The business object makes a
call to the Web Service data
access class
- The Web Service data access
class translates the command
into XML that is transmitted
across the web to the Data
Web
Service.
- The Data
Web
Service converts the XML
command into a standard ADO.NET
command
- The Data
Web
Service passes the call
to the real data access class.
- The real data access class
passes the result back to the
Data
Web
Service
- The Data
Web
Service serializes the
result and passes it back to the
Web Service data access class
across the web
- The Web Service data access
class deserializes the result
and passes it back to the
business object.