Building Web Services Based Placeholders For Content Management Server 2002
Building Web Services Based Placeholders For Content Management Server 2002
Tal Shahar
Microsoft Regional Director
Development Division Manager
Matrix
[email protected]
Session Outline
1. Content Syndication and Aggregation
2. CMS2002 Placeholder
3. XML Web Services
4. Web Service based Placeholders
Lots of References
Prerequisite Knowledge
1. Web Services
2. CMS 2002 Basic Terms
1. Template
2. Posting
3. Placeholder
3. CMS2002 Basic Architecture
Part I
Content Syndication and Aggregation
Architecture
Syndication and Aggregation
Syndication
Aggregation
Architecture Considerations
Horizonatl vs. Vertical
Divide structure from unstructured Data
Commerce Server Content Connector (MSIB)
“Credit Products”
Vertical Publishing a Simple WS
Part II
CMS 2002 Placeholders
Placeholder - What is it?
Web UI component…
Exposes properties, methods, events
Renders as HTML, XML, script, etc.
abstractions
Most
Important -> Encapsulates the action
needed to store data in CMS repository
Placeholder - What is it?
Technically speaking…
Implemented as a .NET class
Derives from System.Web.UI.Control or
System.Web.UI.WebControls.WebControl
Conceptual Model
CMS
CMSTemplate
Template(aspx
(aspxfile)
file) Contents
Contents Definitions
Definitions
HTML Objects
Objects Definitions
Definitions
Placeholder
Control
HTML HTML
Placeholder Placeholder
Custom Object Definition
Placeholder XML XML
Control Placeholder Placeholder
Object Definition
Pro
Guarantees that the latest data from the Web service is being
shown to the browsers.
Cons
May cause performance problems if the page sees heavy
traffic.
May be unnecessary if the data retrieved from the Web
service does not change frequently.
Knowledge workers cannot control if the “foreign” content is
shown on the site.
Design Considerations 2/4
Pro
Eliminating the need to invoke a Web service upon every
page request.
Cons
A strategy must be devised to synchronize the data between
MCMS and the Web service.
Depending on the application requirements, the
synchronization may use a regular process that regularly
updates the data automatically, or it may be tied to a manual
content update process through the MCMS Web Author.
Design Considerations 3/4
How to Synchronize?
An automated process must be able to
determine what queries to make to the Web
service and use business logic to translate the
returned data into updates that must be made
on the MCMS site.
The synchronization can be carried out by a
console application (EXE) which accesses the
Web service and uses the MCMS Publishing
API to update the Web site.
Design Considerations 3/4
How to Synchronize?
The synchronization application could also
approve any new or modified objects as
necessary.
The application can then be executed on a
Proxy
In order for the application to interact with the remote application
seamlessly, a local proxy must be created. However, when using
Visual Studio .NET, using the “Add Web Reference” command
will automatically parse the Web service’s WSDL and create a
functional proxy class.
Design Considerations 4/4
Error Handling
Since the consumer cannot guarantee the availability of the
remote Web service, it must be prepared for scenarios where the
data cannot successfully be retrieved. By using the “Timeout”
property on the proxy class and the .NET platform’s inherent
exception handling, it is possible to gracefully detect and react to
these error conditions.
Automatic Update of CMS2002
Repository with XML Web Service
Content
Manually Consuming and
Replicating Web Service Data
References
Extending the Functionality of MCMS
http://msdn.microsoft.com/library/default.asp?
url=/library/en-us/sitedevl/htm/cms_sd_ext_intro_egts.asp
MCMS Projects in Visual Studio .NET
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/sitedevl/htm/cms_sd_dev_vsnetintegration_lfbj.asp
Using Microsoft Content Management Server 2002 and
Web Services
http://msdn.microsoft.com/library/default.asp?
url=/library/en-
us/dnmscms02/html/cms_2002webservices.asp
Content Integration
Authoring Connector – MS-Word Editor
“Spark” – CMS Connector for Sharepoint
MSIB – CS & CMS Integration
Summary
Web services are location and platform
agnostic
Server controls are great reusable
components