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

Introduction

Building Websites with Microsoft Content Management Server presents the fundamentals of Microsoft Content Management Server 2002 (MCMS) to propel you over the learning curve. Once you have mastered the basics, we build on that to help you to become an MCMS expert.

Learning should be fun. Plus, we suspect that your boss or client is expecting a prototype of the website within yet another incredible deadline. We have carved up the entire book in 24 lessons, each filled with working examples that build on top of one another so that you can get a site up and running from scratch in a very short time.

We provide lots of opportunities for you to get your programming feet wet in the form of numerous exercises. As you progress through the book completing these exercises, you will build up a single website allowing you to gain experience of all the key stages of website development. After we have walked you through the examples step-by-step you will have a fully functional site built entirely by you.

Fingers and mouse ready? Have fun getting to know your new Content Management Server!

What This Book Covers

Chapter 1 introduces Microsoft Content Management Server (MCMS) and gives you a tour of the features that ship with the product. Chapter 2 guides you through the installation process for MCMS and prepares you for the chapters ahead.

MCMS uses SQL Server 2000 to host the database for storing content. Chapter 3 shows how to connect MCMS to a SQL Server database using the Database Configuration Application (DCA). In Chapter 4, you will learn about the Server Configuration Application (SCA) and use it as an administrative tool to modify server-wide settings.

Chapter 5 provides the basic guidelines on how to transform websites from sketches on a storyboard to reality. You will design and build the containers that define the structure of a website for a fictitious gardening society, Tropical Green. In this chapter, you will create the Visual Studio .NET solution that's used for organizing the code files built throughout the book.

Templates are used to generate pages in MCMS. Chapter 6 takes you step-by-step through the creation of a template. In Chapter 7, you will learn how to add editable areas called placeholders to the template and create postings based on it.

You will learn the how to debug an MCMS project and how that relates to debugging a regular ASP.NET web application in Chapter 8.

Chapter 9 shows how you can build summary pages by either assigning a posting as the default posting of a channel or by using a channel rendering script.

In Chapter 10 you will look at the integrated workflow solution available in the product. This chapter explores the various user roles that take part in the approval cycle and explains how a newly created posting moves along the workflow process. You will explore the user interface from an author's viewpoint in Chapter 11 and use Web Author Console to create and manage postings.

MCMS ships with a rich Publishing Application Programming Interface (PAPI). Chapter 12 gives you an overview of the various libraries and gets you started on building your own customized web applications. In Chapter 13, you will use the PAPI to create dynamic navigation controls that are managed by content contributors. You will construct a horizontal menu bar, a vertical menu bar that supports JavaScript, a breadcrumb, and a navigation tree.

Once you have learned the basics of the PAPI, you will move on to perform more complex customizations. In Chapter 14 you will look at how easy it is to create your own custom placeholder controls. In Chapter 15, you will learn how to build a custom placeholder definition-placeholder pair.

Chapter 16 looks at how you can extend the default workflow model and shows how you can customize and configure it to simulate existing business processes in today's workplace.

The Web Author is not the only way for authors to upload content. Authors who are familiar with Word can continue to use it for creating and updating pages on the website. In Chapter 17, you will see how the Authoring Connector integrates Microsoft Word with MCMS.

Some websites require guest users to view areas of the site while restricting access to confidential information and, of course, authoring. In Chapter 18, you will set up a member's-only segment of the website, using forms to authenticate members and authors. You will also open up public areas of the site to visiting guests.

The author's experience can be enhanced further by tailoring the Web Author Console to include functions that help them do their jobs better. Chapter 19 discusses various techniques for modifying the design and behavior of the authoring console.

Chapter 20presents the concept of connected templates and pages. You will learn how connected templates and pages allow authors to upload their content only once and share it across different parts of the website without the need to maintain each copy separately.

Before you can finish your new website, you will need to create a home page. In Chapter 21 you will delve into a few ways to aggregate content for the home page.

Site performance is an important success factor for websites. Chapter 22 covers caching and how it can be used to improve the performance of your website. As MCMS websites are extensive and dynamic, it is important to build pages without creating long wait times for visitors, and we show how this is done here.

Chapter 23 demonstrates how information stored in the content repository can be migrated across various MCMS setups using the Site Deployment Manager. You will also look at the Site Deployment API. You will write scripts that automate the process of deploying the content from one MCMS server to another.

Chapter 24 shows how you can apply mapped host headers to allow multiple websites to be hosted on the same MCMS server. You will also see how you can use SSL to ensure that the authentication mechanism for the member's segment of the website is secure.

Lastly, Appendix A discusses the finer points of upgrading an existing MCMS 2001 website to MCMS 2002, and Appendix B provides a list of references mentioned throughout the book.

What You Need for Using This Book

This book has been written for ASP.NET developers with a sound grasp of C#. To use this book you need to have access to the following:

  • Visual Studio .NET Professional or higher (2002 or 2003 version)

  • Microsoft Content Management Server 2002 Developer/Enterprise Edition. You can use the Standard Edition, but some features will not be available. A 120-day evaluation version of Enterprise Edition is available from http://www.microsoft.com/cmserver.

To install and run Microsoft Content Management Server 2002, you will need the following:

  • The .NET Framework 1.0 or 1.1

  • One of the following operating systems: Windows Server 2003, Windows 2000 Professional, Windows 2000 Server, or Windows XP Professional

  • An installation of SQL Server 2000 Developer or Enterprise editions.

Conventions

In this book you will find a number of styles of text that distinguish between different kinds of information. Here are some examples of these styles, and an explanation of their meaning.

There are three styles for code listings. Code words within text are shown as follows: "If we want to change the background color to a nice gray, we can go into the plone_styles layer and customize base_properties."

If we have a block of code, it will be set as follows:

HierarchyItem hItem = cmsContext.Searches.GetByPath("/Channels/TropicalGreen/MysteryObject");
if(hItem is Channel)
{
//Object is a Channel
}
else if(hItem is Posting)
{
//Object is a Posting
}

When we wish to draw your attention to a particular part of a code block, the relevant lines will be made bold:

 private CmsHttpContext cmsContext;
      private void Page_Load(object sender, System.EventArgs e)
{
// Put user code to initialize the page here
 cmsContext = CmsHttpContext.Current;
if(!Page.IsPostBack) 3
       {
GetPlantFactSheets();
}
	}

New terms and important words are introduced in a bold-type font. Words that you see on the screen—in menus or dialog boxes, for example—appear in the text as follows: "Clicking the Next button moves you to the next screen".

Troubleshooting tips and suggestions appear in the following format:

Note

The option for the component I want to install is grayed out and I can't select it..

That's because you do not have the pre-requisites required by that component. For example, if you did not install Microsoft Visual Studio, you will not be able to install the Developer Tools. To find out what's missing, click on the component and read the description on the right-hand side of the dialog.

Any command-line input and output is written as follows:

sn –k "c:\TropicalGreenGACKey\TropicalGreenKey.snk"

Reader Feedback

Feedback from our readers is always welcome. Let us know what you think about this book, what you liked or may have disliked. Reader feedback is important for us to develop titles that you really get the most out of.

To send us general feedback, simply drop an email to, making sure to mention the book title in the subject of your message.

If there is a book that you need and would like to see us publish, please send us a note in the SUGGEST A TITLE form on www.packtpub.com or email.

If there is a topic that you have expertise in and you are interested in either writing or contributing to a book, see our author guide on www.packtpub.com/authors.

Customer Support

Now that you are the proud owner of a Packt book, we have a number of things to help you to get the most from your purchase.

Downloading the Example Code for the Book

Visit http://www.packtpub.com/support, and select this book from the list of titles to download any example code or extra resources for this book. The files available for download will then be displayed.

Note

The downloadable files contain instructions on how to use them.

Errata

Although we have taken every care to ensure the accuracy of our contents, mistakes do happen. If you find a mistake in one of our books—maybe a mistake in text or code—we would be grateful if you would report this to us. By doing this you can save other readers from frustration, and help to improve subsequent versions of this book.

To report any errata you find visit http://www.packtpub.com/support, select your book, click on the Submit Errata link, and enter the details of your errata. Once your errata are verified, your submission will be accepted and the errata added to the list of existing errata. The existing errata can be viewed by selecting your title from http://www.packtpub.com/support.

Questions

You can contact us at if you are having a problem with some aspect of the book, and we will do our best to address it.