Creating the Business Layer
Now we have created our project let’s look at the business layer. The classes in the business layer will encapsulate the key properties of MCMS objects such as Name, Path, Value
, and ID
(equating to MCMS’s Guid
property). All the objects in our object model must be serializable, that is, it must be possible to convert them into XML so they can be transferred via Web services. We cannot transfer the standard PAPI objects directly via ASP.NET Web services as there is no immediate way to serialize them to XML. Therefore, we will be recreating portions of the MCMS object model in our own classes that do support serialization so they can be sent and received by ASP.NET Web services.
The PAPI classes do not contain default constructors, hence cannot be serialized into XML. For more on XML Serialization see
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconintroducingxmlserialization.asp
.
We will develop the following classes...