|
In this post I'm going to describe how you write code that uses the MashPoint runtime object model. But before we dive in to the samples we need to get an idea of how MashPoint works.
The MashPoint API can run in two modes:
- Utilizing the MashPoint implementation.
- Utilizing the MOSS BDC.
No matter what runtime you will target, you can use the MashPoint APIs. This gives you the benefit of being able to run your code both on MOSS BDC and on Bamboo MashPoint. A company with both MOSS Enterprise farms and WSS farms can now deploy the same Web Parts in both environments if you use the MashPoint APIs instead of the Microsoft specific APIs.
This is accomplished by exposing an interface-based API. When you work with MashPoint, you only use interfaces. We have created interfaces for all public classes in the ApplicationRegistry namespace. When you run on top of the BDC, we wrap all objects coming from the BDC so that you get the MashPoint interface to work with.
The picture above shows the different layers. At the top you have the client code (your code). This code only has a reference to the Bamboo.Portal.dll. During runtime, the Bamboo.Portal layer decides if it's going to use the BDC or MashPoint. If you write a Web Part, the decision is made based on the context.
If the Web Part is running in a Web Application that is associated with a Bamboo Shared Service you will use the MashPoint implementation, otherwise you will use the BDC if it's available and an association exists. If you are writing a console application you have to specify what Shared Service to use. If you specify a Bamboo Shared Service you will use the MashPoint implementation.
|