Book Image

Building Websites with Microsoft Content Management Server

Book Image

Building Websites with Microsoft Content Management Server

Overview of this book

Microsoft Content Management Server 2002 is a dynamic web publishing system with which you can build websites quickly and cost-efficiently. MCMS provides the administration, authoring, and data management functionality, and you provide the website interface, logic, and workflow. Once your website is up and running, your content contributors can add and edit content on their own, without the need to work with developers or the IT department. First time developers of Microsoft Content Management Server 2002 face a relatively steep learning curve. Not only are they expected to be conversant in the Microsoft .NET Framework, they are also required to be familiar with the concepts of MCMS 2002. Many beginners to MCMS start out by looking at the example site that ships with the product; tweaking it, dissecting it and turning it inside out using the obscure code comments as markers. However, when it comes to starting their own website from scratch, many are baffled ? where do they begin? This book exists to answer that question; teaching the essential concepts of MCMS 2002 in a clear, straightforward and practical manner. Containing answers to some of the most asked questions in developer newsgroups, this book is a treasure trove of tricks and tips for solving the problems faced by MCMS developers. This is a unique resource focused exclusively on the needs of developers using MCMS. It doesn?t waste time and pages on user or administrator level information that is well covered in other documentation. It?s a distillation of practical experience that developers need to get results, fast. The authors carefully structured example project complements and extends the knowledge gained from an initial look at the examples that ship with MCMS.
Table of Contents (28 chapters)
Building Websites with Microsoft Content Management Server
Credits
About the Authors
Introduction

MCMS Integrates with Visual Studio .NET


MCMS provides native support for Visual Studio .NET. It's the preferred tool for developers to construct the template files necessary for creating websites built with MCMS.

We will be assuming that you are working with Visual Studio .NET throughout the book. While it is technically possible to use other development environments to create the code and template files, you will not benefit from several conveniences that result from the integration of MCMS and Visual Studio .NET, such as integration with the MCMS Template Explorer.

.NET Framework

It's easy to find developers who can work with MCMS because it supports the popular Microsoft .NET framework, and you can develop websites using either C# or VB.NET. In this book, we present all code samples in C#.

Integration with other Microsoft Server Products

There are also connectors available for you to integrate MCMS with other Microsoft Server products like Commerce Server and SharePoint Portal Server.

Publishing API

Microsoft does not recommend direct updates to the MCMS database: documentation on how the database is updated is not even available. You should not attempt to do this yourself as doing so may cause your system to become unusable.

Instead, Microsoft has provided a set of library files, known as the Publishing Application Programming Interface (PAPI). This provides a safe and structured way to retrieve, update, and delete the contents of the database.

As a developer, you may have a natural inclination towards working with the database directly by writing Transact-SQL scripts to do additions, updates, and deletions. You may find that working with the MCMS PAPI requires some getting used to. However, because the PAPI contains pre-packaged code, you would not need to write much of the code yourself, saving you valuable time. All you need to do is to call the appropriate functions when and where you need them.

The same PAPI is used internally within the MCMS Web Author application.

There are two versions of the PAPI shipped with MCMS 2002:

  • The managed .NET framework version

  • The unmanaged COM version

The COM version exists mainly for backward compatibility and works primarily with ASP-based template files. You will use this set of library files if you work with templates that were migrated from an existing MCMS 2001 website. When starting a website from scratch, it is highly recommended to develop with the ASP.NET version of the API. Not only does it provide better performance, it offers many new features that are not available with the COM version. In addition it is most likely that Microsoft will remove the COM-based API from the next version of MCMS. So to ensure compatibility with future versions, you should use the managed PAPI rather then the COM-based PAPI.

The PAPI is one of the central features of MCMS. We will make use of it extensively throughout the book.