getting started with allaire spectra - williams sonoma · 2001-10-01 · the pita developer guide...

120
Allaire Corporation Getting Started with Allaire Spectra Version 1.0.1 for Windows ® NT and Solaris

Upload: others

Post on 14-Jul-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Getting Started with Allaire Spectra

Version 1.0.1 for Windows® NT and Solaris

Allaire Corporation

Page 2: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Copyright Notice

© 1999 Allaire Corporation. All rights reserved.

This manual, as well as the software described in it, is furnished under license and may be used or copied only in accordance with the terms of such license. The content of this manual is furnished for informational use only, is subject to change without notice, and should not be construed as a commitment by Allaire Corporation. Allaire Corporation assumes no responsibility or liability for any errors or inaccuracies that may appear in this book.

Except as permitted by such license, no part of this publication may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, electronic, mechanical, recording, or otherwise, without the prior written permission of Allaire Corporation.

ColdFusion, HomeSite, and Allaire Spectra are registered trademarks and Allaire, HomeSite, the ColdFusion logo and the Allaire logo are trademarks of Allaire Corporation in the USA and other countries. Microsoft, Windows, Windows NT, Windows 95, Microsoft Access, and FoxPro are registered trademarks of Microsoft Corporation. All other products or name brands are the trademarks of their respective holders. Solaris is a trademark of Sun Microsystems Inc. UNIX is a trademark of The Open Group. PostScript is a trademark of Adobe Systems Inc.

Part number: AA-SPGET-RK

Page 3: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Contents

Preface: About this Manual ............................................................................vii

Intended Audience........................................................................................................................ viiiDeveloper Resources .................................................................................................................... viiiAbout Allaire Spectra Documentation ...........................................................................................ix

Printed documentation............................................................................................................ixAllaire Spectra manuals ...........................................................................................................ixPrinting Allaire Spectra Documentation ................................................................................xi

Documentation Conventions .........................................................................................................xiGetting Answers ...............................................................................................................................xiContacting Allaire........................................................................................................................... xii

Chapter 1: Introducing Allaire Spectra............................................................1

About Allaire Spectra ....................................................................................................................... 2Allaire Spectra’s Architecture and Concepts ................................................................................. 2

The Content Object API (COAPI) ............................................................................................ 3Webtop User Interface ............................................................................................................. 5

Allaire Spectra Roles ........................................................................................................................ 6The Spectrum of Participants .................................................................................................. 6

System Services ................................................................................................................................ 8Content Management .............................................................................................................. 8Workflow and Process Automation....................................................................................... 10Roles-Based Security .............................................................................................................. 11Personalization ....................................................................................................................... 11Business Intelligence.............................................................................................................. 11Syndication ............................................................................................................................. 12

Learning More About Allaire Spectra ........................................................................................... 13For additional information .................................................................................................... 13

Page 4: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

iv Getting Started with Allaire Spectra

Chapter 2: Installing Allaire Spectra..............................................................15

Windows System Requirements ....................................................................................................16Windows NT Installation Overview...............................................................................................16

Upgrading an existing Allaire Spectra installation ...............................................................17Allaire Spectra Windows NT Installation ......................................................................................18Windows NT Installation Notes.....................................................................................................18Solaris System Requirements ........................................................................................................19Solaris System Verification.............................................................................................................20Solaris Installation Overview .........................................................................................................20Allaire Spectra Solaris Installation.................................................................................................21

Allaire Spectra Requirements.................................................................................................22Installation Notes ....................................................................................................................22Installing Allaire Spectra.........................................................................................................22

Verifying Advanced Security Installation......................................................................................22Configuring Your Installation ........................................................................................................23Installing Allaire Spectra Studio Tools (NT Only) ........................................................................30

Chapter 3: Best Practices for Building Allaire Spectra Applications...........31

Phases of Allaire Spectra Development ........................................................................................32Best Practices for Building Allaire Spectra Applications .............................................................34Allaire Spectra Application Development ....................................................................................34

Create a Site Model .................................................................................................................34Implement the Site Model ......................................................................................................35Create the Site..........................................................................................................................35Maintain the Site .....................................................................................................................36

Moving from ColdFusion to Allaire Spectra .................................................................................36Learning Allaire Spectra concepts .........................................................................................37Coding in Allaire Spectra ........................................................................................................37Working with data sources .....................................................................................................37

Strategies for Managing Allaire Spectra Data ...............................................................................38

Page 5: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Contents v

Chapter 4: Quick Start Tutorial ......................................................................41

Quick Tour of i-Build.com .............................................................................................................42Editing i-Build.com in Design Mode.............................................................................................44

Chapter 5: Allaire Spectra for ColdFusion Programmers ............................47

Moving from ColdFusion to Allaire Spectra .................................................................................48Building a Basic Object Type .........................................................................................................50

Adding content properties......................................................................................................51Creating Content Items ..................................................................................................................54Displaying Your Content ................................................................................................................56Creating Display Handlers .............................................................................................................58Creating Edit Handlers ...................................................................................................................61Storing Data in Internal and External Data Sources ....................................................................65

Storing data in Allaire Spectra’s ContentObject database ...................................................65Using an external data source ................................................................................................65

Working with External Objects ......................................................................................................67Bringing External Data into Allaire Spectra Objects ....................................................................68

Creating a display handler to display external information ................................................70Displaying and Publishing Content ..............................................................................................71

Chapter 6: Developing a Web Application with Allaire Spectra .................75

Developing a Web Application with Allaire Spectra ....................................................................76Defining Objects and Properties ...................................................................................................76Creating ContentObject Types ......................................................................................................79Using Allaire Spectra’s Default Methods ......................................................................................82

Chapter 7: Designing Sites with Allaire Spectra ...........................................85

Creating a Site in Allaire Spectra ...................................................................................................86Your workspace .......................................................................................................................86

The Site Layout Model....................................................................................................................87Displaying Content .........................................................................................................................88

Creating a custom tag .............................................................................................................88Creating the Tutorial home page ...........................................................................................89

Chapter 8: Creating and Publishing Content................................................93

Creating and Publishing Content in Allaire Spectra ....................................................................94Adding Content to the System .......................................................................................................94

Using a Workflow to create and approve content ................................................................94Publishing Web Content ................................................................................................................98

Basic Publishing ......................................................................................................................98Additional Publishing Features............................................................................................100

Editing Content Items ..................................................................................................................104

Page 6: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

vi Getting Started with Allaire Spectra

Page 7: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Preface About this Manual

Getting Started with Allaire Spectra is intended for anyone who wants to learn the fundamentals of Allaire Spectra.

Contents

• Intended Audience.......................................................................................... viii

• Developer Resources....................................................................................... viii

• About Allaire Spectra Documentation ............................................................ ix

• Printing Allaire Spectra Documentation ......................................................... xi

• Documentation Conventions .......................................................................... xi

• Getting Answers ................................................................................................ xi

• Contacting Allaire............................................................................................. xii

Page 8: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

viii Getting Started with Allaire Spectra

Intended AudienceGetting Started with Allaire Spectra is intended for anyone who wants to learn the fundamentals of Allaire Spectra. It includes installation instructions, concepts, and information on writing Allaire Spectra Web pages, templates, and handlers.

Developer ResourcesAllaire Corporation is committed to setting the standard for customer support in developer education, technical support, and professional services. Our Web site gives you quick access to a range of online resources.

Allaire Developer Services

Resource Description

Allaire Web site

www.allaire.com

General information about Allaire products and services.

Technical Support

www.allaire.com/support

This page presents the wide range of professional support programs Allaire offers.

Professional Education

www.allaire.com/education

Information about classes, on-site training, and online courses offered by Allaire.

Developer Community

www.allaire.com/developer

All of the resources you need to stay on the cutting edge of Allaire Spectra development, including online discussion forums, Knowledge Base articles, technical papers, and more.

Allaire Alliance

www.allaire.com/partners

The growing network of solution providers, application developers, resellers, and hosting services creating solutions with Allaire Spectra.

Page 9: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Preface ix

About Allaire Spectra DocumentationAllaire Spectra documentation is designed to provide support for the complete spectrum of participants. Both the print and online versions are organized to allow you to quickly locate the information you need. Allaire Spectra online documentation is provided in both HTML and Acrobat file formats.

Printed documentation

• Getting Started with Allaire Spectra

• Designing Sites with Allaire Spectra

• Programming with Allaire Spectra

• Administering Allaire Spectra

• Allaire Spectra Reference

• Quick Reference to Allaire Spectra

Online documentation

All ColdFusion documentation is available online in both HTML and Acrobat formats. To view the HTML documentation, open the following URL on the Web server running Allaire Spectra: http://<webroot>/allaire/spectra/docs/dochome.htm.

To view and print Allaire Spectra documentation in Acrobat format, open the following URL on the Web server running Allaire Spectra: http://<webroot>/allaire/spectra/docs/AcrobatDocs/index.htm.

ColdFusion Studio

ColdFusion Studio contains a wide range of online assistance, including a complete collection of Allaire Spectra documentation. To view Allaire Spectra online documentation from within ColdFusion Studio, click the Help resource tab. You’ll see an expandable list of documents about Allaire Spectra, ColdFusion Server, and ColdFusion Studio, as well as a number of other areas that relate to Web programming.

The online documentation is searchable, and you can bookmark specific pages. For more information about configuring the ColdFusion Studio interface, see the ColdFusion Studio documentation set.

Allaire Spectra manuals

The Allaire Spectra documentation set consists of the following titles:

Getting Started with Allaire Spectra

Covers Allaire Spectra concepts, including an overview of the spectrum of participants. Provides tutorial lessons, including a chapter designed for existing ColdFusion

Page 10: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

x Getting Started with Allaire Spectra

programmers. Also covers system installation and basic configuration. Start here to learn about the Allaire Spectra architecture, installing Allaire Spectra, and writing Allaire Spectra Web pages, templates, and handlers.

Designing Sites with Allaire Spectra

Covers Web site design and implementation with Allaire Spectra. Describes how to use the Webtop to implement a site object model. Also explains how to manage media assets and categorize the pages and sections in a Web site. Site designers use this manual understand and implement a complete site object model.

Managing Your Web Business with Allaire Spectra

An online-only manual for business managers who need to move and manage their businesses to/on the Web. This book leads you though generating business reports, managing content, the site itself, categories and keywords, workflow, users, personalization, and syndication. It also describes how to work with content and workflow from a business user’s perspective.

Administering Allaire Spectra

Covers database management, users and security, caching, logging, and indexing site content. Also describes how to configure the Webtop environment for other users. System administrators use this manual to manage the back-office aspects of an Allaire Spectra implementation.

Programming with Allaire Spectra

Covers all aspects of ContentObject Type programming, including definition, handlers, search, index, categorization, and publishing rule management. Also includes information on process logic paths, workflows, profiling and personalization, syndication, security, and reports. Interactive Developers use this manual to understand the fundamentals of Allaire Spectra application development.

Allaire Spectra Reference

The Allaire Spectra Reference provides descriptions, syntax, usage, and code examples for:

• Allaire Spectra tags

• Partner Integration Technology Architecture (PITA) tags

• Allaire Spectra structures

• Allaire Spectra core object types, also known as media assets

Page 11: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Preface xi

Quick Reference to Allaire Spectra

A brief guide that shows the syntax of Allaire Spectra and PITA tags, and provides an outline to the associated structures and core objects, also known as media assets.

PITA Developer Guide

Covers usage information for the tags used by the Partner Technology Integration Architecture (PITA). Allaire partners and other experienced ColdFusion developers use this manual to develop sophisticated Web systems and third-party extensions to Allaire Spectra. The PITA Developer Guide is available in HTML and PDF format only.

Printing Allaire Spectra Documentation

If you are working with an evaluation version of Allaire Spectra and would like printed documentation to read, locate the Adobe Acrobat files installed with the product. The Acrobat files offer excellent print output. You can print an entire manual or individual sections.

Locate the Allaire Spectra Acrobat files by opening the following URL on the host system:

http://<webroot>/allaire/spectra/docs/AcrobatDocs/index.htm

Documentation ConventionsWhen reading, please be aware of these formatting cues:

• Code samples, filenames, and URLs are set in a monospaced font.

• Notes and tips are identified by bold type in the margin.

• Bulleted lists present options and features.

• Numbered steps indicate procedures.

• Menu levels are separated by the greater than (>) sign.

• Text for you to type in is set in italics.

Getting AnswersOne of the best ways to solve particular programming problems is to tap into the vast expertise of the Allaire developer communities on the Allaire Forums. Other developers on the forum can help you figure out how to do just about anything with Allaire Spectra. The search facility can also help you search messages going back 12 months, allowing you to learn how others have solved a problem you may be facing.

The Developer Forums are a great resource for learning Allaire Spectra, and also a great place to see the Allaire developer community in action.

Page 12: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

xii Getting Started with Allaire Spectra

Contacting Allaire

Corporate headquarters

Allaire CorporationOne Alewife CenterCambridge, MA 02140

Tel: 617.761.2000Fax: 617.761.2001

http://www.allaire.com

Technical support

Telephone support is available Monday through Friday, 8 A.M. to 8 P.M. Eastern time (except holidays).

Toll Free: 888.939.2545 (U.S. and Canada)

Tel: 617.761.2100 (outside U.S. and Canada)

Postings to the Allaire Support Forum (http://forums.allaire.com) can be made any time.

Sales Toll Free: 888.939.2545

Tel: 617.761.2100Fax: 617.761.2101

Email: [email protected]

Web: http://www.allaire.com/store

Page 13: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 1

Chapter 1 Introducing Allaire Spectra

Allaire Spectra is a packaged system for content management, e-commerce, and personalization. This chapter introduces the Allaire Spectra system, as well as new terms and concepts.

Contents

• About Allaire Spectra.......................................................................................... 2

• Allaire Spectra’s Architecture and Concepts .................................................... 2

• Allaire Spectra Roles........................................................................................... 6

• System Services .................................................................................................. 8

• Learning More About Allaire Spectra.............................................................. 13

Page 14: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

2 Getting Started with Allaire Spectra

About Allaire SpectraAllaire Spectra is a packaged system for developing large-scale Web applications. It is powered by ColdFusion application server and it spans three crucial application areas:

• Content services

• E-commerce

• Customer management

You can use the system’s comprehensive set of services to build custom implementations using Allaire’s overall platform.

Allaire Spectra’s Architecture and ConceptsAllaire Spectra addresses the requirements of large-scale Web systems through its programming model, the ContentObject API (COAPI) and Webtop user interface, along with a set of six core services.

Page 15: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 1: Introducing Allaire Spectra 3

The Content Object API (COAPI)

The Allaire Spectra ContentObject API, or COAPI, provides companies with a coherent architecture for modeling their businesses on the Web. The COAPI consists of tags and services that allow you to interact with Allaire Spectra’s ContentObject database or external databases.

Allaire Spectra applications are built with ContentObject Types, which have associated methods and properties that allow business managers and business users to create, edit, and publish instances of these objects. Each instance of a ContentObject Type is called a content item (these instances are also referred to as objects).

Because the COAPI allows you to program with ContentObject Types, methods and properties, you can think of it as an object-based system (in a manner similar to COM).

The Site Object Model

The Site Object Model is a way to design and organize the data and activities that comprise your Web business. It serves as the foundation for layering services on top of the content, such as workflows, processes, security, syndication, and reporting. In Allaire Spectra, the Site Object Model is a blueprint of the site-specific Content Object Types your site has developed to run its Web business.

Your Site Object Model might include ContentObject Types for different types of content — news items, product data sheets, or FAQs — but can also include commerce-oriented ContentObject Types, such as products, promotions, merchandise objects, or customer account information.

Using the Site Object Model as a blueprint, interactive developers create the building blocks — property definitions, ContentObject Types and handler files — that are used by those who assemble and deploy the application.

Page 16: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

4 Getting Started with Allaire Spectra

For an overview of Site Object Model development, see “Create a Site Model” on page 34.

The Site Layout Model

Site designers are responsible for creating the Site Layout Model. This model is a graphical representation of the site’s structure — starting with the site itself, showing its sections, pages, and containers.

The Site Layout Model shows the site’s logical structure, and allows you to integrate other Allaire Spectra services — such as roles-based security, logging, and caching — based on this hierarchy. For example, the site designer might specify that logging is disabled for certain sections of the site.

The following illustration shows the site layout model for Allaire Spectra’s sample site, i-Build.com.

For more information on building and using a Site Layout Model, see “Creating a Site in Allaire Spectra” on page 86.

Page 17: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 1: Introducing Allaire Spectra 5

Webtop User Interface

Built using Allaire Spectra itself, the Webtop provides a Web-based, personalized user interface tailored to each role in the spectrum of participants.

The Webtop is made up of five major sections:

• Content

• Business Center

• Site Design

• System Design

• System Admin

Each section provides a rich set of productivity tools for those chartered with helping to build, deploy, and manage a Web business with Allaire Spectra.

The sections you see when you enter the Webtop depend on what participant role you play in building your Web business.

Note The Allaire Spectra Webtop is a secure system. You must provide a user name and password to access it. The system administrator typically controls access to the Webtop.

Page 18: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

6 Getting Started with Allaire Spectra

The remaining discussions in this chapter describe the roles defined for Allaire Spectra business, design, and development team members. This chapter also outlines Allaire Spectra’s core services.

Allaire Spectra RolesRunning a successful Web business depends on a broad cross section of business and development staff. Allaire Spectra provides a model where this diverse group of users and developers participate in building an application. This model is based on the best practices of successful Web businesses and is called the spectrum of participants.

The Spectrum of Participants

The Allaire Spectra system recognizes the needs and focus of each participant:

Participant Responsibilities

System administrator

Installs, configures, and maintains applications; establishes security; configures data sources; tunes performance; configures global system options such as logging, reporting, caching, security; performs routine maintenance of the application; controls access to the system.

Interactive developer

Works with the business manager to develop a Site Object Model; implements the site object model by creating ContentObject Types, methods, and handlers; codes handlers to implement methods; defines application flow; extends application with third party/custom tools; configures existing data sources; creates workflows and process logic paths; establishes and enforces system security; builds publishing and personalization rules; creates logReport objects and handlers.

Page 19: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 1: Introducing Allaire Spectra 7

Allaire Spectra’s tiered architecture makes it much easier to design and manage large-scale intranet and Internet systems where content and commerce assets are managed independent of developers or IT. The system empowers business managers and business users to run the Web business directly in the Web browser, letting them respond quickly to changes in the business to create a more personalized and responsive customer experience.

See “Best Practices for Building Allaire Spectra Applications” on page 34 for a discussion of how team members work together to build Allaire Spectra applications.

Site designer Works with the business manager to define the site’s information hierarchy (also called the Site Layout Model); designs the application’s look and feel; structures site as a whole and lays out site and pages; creates templates; establishes standards and workflows for graphics and design; creates display pages.

Business user Creates content items for publication; edits and approves content; participates in business workflows; schedules and deploys content; provides keyword categories for content; generates personalization and profiling rules.

Business manager

Runs the project; allocates resources and assigns user roles, and tasks; responsible for process and assigning workflows; defines common content categories and keywords for user profiling; monitors performance of site against business objectives; coordinates syndication of content; manages users and groups for content.

Site member End users of Allaire Spectra Web applications who access the Web system through the Internet, intranet, or secure extranet. Site members can be customers, internal employees, suppliers, and partners.

Site affiliates End users of Allaire Spectra Web applications who access the Web system through the Allaire Spectra syndication service. Site affiliates may be supply-chain partners or other Web sites who resell and reuse your content and commercial assets. They could also be other Web sites whose assets you incorporate into your own Web systems.

Participant Responsibilities

Page 20: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

8 Getting Started with Allaire Spectra

System ServicesThe core system of Allaire Spectra includes a rich array of services, some central to the server itself, others dedicated to content, commerce, and customer applications. In addition to the COAPI and Webtop, which serve all Allaire Spectra applications, Allaire Spectra offers the following core services:

This architecture allows each member of the development team to work in the environment that suits them best. The section Allaire Spectra Roles in this chapter, outlines the spectrum of participants in a typical Allaire Spectra implementation.

Content Management

At the core of Allaire Spectra is a content management infrastructure for managing content and commerce assets. This includes:

• ContentObject database

• Searching and indexing

• Site categories

• Content publishing

• Anywhere authoring

Service Usage

Content Management Design the content, logic, presentation, and delivery of your Web systems.

Workflow and Process Automation

Integrate your business processes with your Web systems.

Roles-Based Security Secure the production, management, and delivery or your Web systems.

Personalization Perform dynamic profiling and target information to end users based on their interests and behavior.

Business Intelligence Track, measure, analyze, and report on activities in your Web systems.

Syndication Extend your Web systems to Internet business partners and other Web sites.

Page 21: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 1: Introducing Allaire Spectra 9

The Content Object Database and external databases

Allaire Spectra’s ContentObject database contains:

• Allaire Spectra system objects.

• Definitions of the elements of your Site Object Model, including ContentObject Types, PLPs, and workflows.

• (Optional) Site-specific content and data used in your site.

Allaire Spectra’s ContentObject database provides an XML-based object-relational database, allowing you to store structured content and data in object format. The advantage of this architecture is a higher level of abstraction while integrating the content into any relational database.

You can store content items using Allaire Spectra’s ContentObject database, or extend the architecture to use your own external data source.

For details on how you use external databases with Allaire Spectra Web systems, see “Storing Data in Internal and External Data Sources” on page 65.

Search and index

Based on ColdFusion’s built-in Verity search engine, content and commerce assets are available for searching and retrieval.

Allaire Spectra provides granular control over what information and what properties are searchable on a site-wide basis.

Site categories

Allaire Spectra allows you to classify content item data using predefined categories and keywords. For example, a content item about a particular brand of dog food might use the keyword dogs from the category pets. Since the keywords and categories describe the data in the content item, this classification information is also referred to as metadata.

Categorization is a powerful tool that you can use to:

• Classify content on a Web site.

• Enable your Web site to reflect your business.

• Search for content items.

• Control the content displayed for a particular user.

• Create reports.

Categories can contain keywords or other categories. Each discrete arrangement of categories and keywords is called a metadata hierarchy. Once a metadata hierarchy has been defined, you can then assign the categories or keywords to content items.

Page 22: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

10 Getting Started with Allaire Spectra

Content publishing

Allaire Spectra provides Web-based tools for business users and business managers to control the display, scheduling, and delivery of a site’s content.

Additionally, you can implement site-specific publishing rules to provide other types of customized content display. For example, you might limit content display to a predefined set of ContentObject Types. Additionally, you implement personalization through publishing rules. For information on coding publishing rules, see Programming with Allaire Spectra.

Anywhere Authoring

Anywhere Authoring is Allaire Spectra’s browser-based, in-context content editing system. It provides an intuitive environment in which you perform content creation, editing, and analysis in the context of the Web system itself. Using Anywhere Authoring, business users and business managers create and manage content without direct involvement from IT, HTML developers, Webmasters, or any other technical personnel. And since Anywhere Authoring is browser-based, users can work from local or remote locations.

Workflow and Process Automation

Allaire Spectra offers a flexible, yet powerful environment for establishing and managing business practices and processes in a Web system. It includes the features described in the following table:

Name Description Examples

Workflow Create customizable workflows to manage multi-person, multi-task business processes.

Creating a press release, creating a product promotion, and handling an incoming customer service request.

Process automation

Manage single-person, multi-step tasks through PLPs.

E-commerce transactions, online registration, and content-creation wizards.

Page 23: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 1: Introducing Allaire Spectra 11

Roles-Based Security

Allaire Spectra roles-based security is customizable for your Web system and includes the features described in the following table:

Personalization

Allaire Spectra implements a three-tier personalization model, which provides organizations with a flexible means of applying site-wide personalization for customers and site members. The tiers are shown in the following table:

Business Intelligence

Allaire Spectra’s Business Intelligence service provides business managers with the means to make critical decisions quickly. Delivering a rich repository of site information, standard and customized reports allow business managers to measure, analyze, and report on their Web business activities. Reports can be run to measure

Feature Description

Common security model Visually assign and classify users and define the activities that can be performed within the system.

User authentication Use NT domains, LDAP servers, or custom SQL-based user directories to authenticate users accessing your Web system.

Activity-based access control

Create security policies that explicitly define the users and groups that can access your Web system’s content assets.

Open security model Leverage existing user directories, such as NT domains, LDAP servers, or custom SQL-based user directories. Allaire Spectra provides basic user and policy databases to get you started.

Feature Description

User profiling Track and store user information for use in the delivery of customized content and product information.

Rules-based personalization

Implement publishing rules that deliver customized content based on user preference information.

Advanced personalization

Use Allaire Spectra with high-end personalization and collaborative filtering engines.

Page 24: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

12 Getting Started with Allaire Spectra

common browsing patterns, analyze these patterns in the context of user demographics, and display information on Web site usage and business trends.

In addition, you can also implement in-context reporting capabilities. Using in-context reporting, you embed real-time reporting information directly within the site itself.

Syndication

Allaire Spectra provides an advanced set of features for enabling companies to establish new relationships and new ways of doing business on the Web with other vendors and site affiliates. The components of the Syndication service are shown in the following table:

Component Description

Content syndication

Share content with any Web site, regardless of format or application environment. You can bring outside content into your Web system (inbound syndication) or expose your site assets to site affiliates allowing them to subscribe and define the delivery schedule and format (outbound syndication).

Application syndication

Transparently expose your site infrastructure through an open, XML-based API, allowing interaction with any remote application environment such as ColdFusion, ASP, Java (servlets/JSP), or Perl. This allows your Web system to support business-to-business processing.

Page 25: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 1: Introducing Allaire Spectra 13

Learning More About Allaire SpectraYou can learn about Allaire Spectra’s features and services in several ways:

• Multimedia clips. You can launch product tours and introductions from the Allaire Spectra Webtop in the Learn More About Allaire Spectra section of the Webtop Welcome page.

• Webtop online help. Click the Help link at the top of any Allaire Spectra Webtop screen for online help. To enable Webtop online Help, display the Preferences form and select the Enable Webtop Help checkbox.

• Printed documentation. Allaire Spectra provides a complete set of printed documentation. It also includes all books in PDF format, suitable for printing. You can access PDF files through http://webroot/allaire/spectra/docs/AcrobatDocs/index.htm.

• Online documentation. Allaire Spectra provides online HTML documentation, available from the Webtop Welcome page. You can also access HTML documentation through http://webroot/allaire/spectra/docs/dochome.htm.

• Allaire Spectra forums. Use the Allaire forums for support and feedback from other Allaire Spectra users and Allaire technical staff.

For additional information

If you’re new to Allaire Spectra, follow the exercises in this book. This book includes a set of exercises aimed at helping ColdFusion developers learn the basics of using Allaire Spectra.

For further conceptual and usage information, see Programming with Allaire Spectra. To learn more about the product’s tags and data structures, see the Allaire Spectra Reference.

Page 26: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

14 Getting Started with Allaire Spectra

Page 27: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 2

Chapter 2 Installing Allaire Spectra 1.0.1

This chapter lists Allaire Spectra system requirements. It also describes procedures for upgrading, installing, and configuring Allaire Spectra for Windows NT and Solaris.

Contents

• Windows System Requirements...................................................................... 16

• Windows NT Installation Overview ................................................................ 16

• Allaire Spectra Windows NT Installation........................................................ 18

• Solaris System Requirements .......................................................................... 19

• Solaris System Verification .............................................................................. 20

• Solaris Installation Overview........................................................................... 20

• Allaire Spectra Solaris Installation .................................................................. 21

• Verifying Advanced Security Installation ....................................................... 22

• Configuring Your Installation.......................................................................... 23

• Installing Allaire Spectra Studio Tools (NT Only) .......................................... 30

Page 28: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

16 Getting Started with Allaire Spectra

Windows System RequirementsThe table below describes the Allaire Spectra system requirements for Windows NT configurations.

Windows NT Installation Overview

To install and configure Allaire Spectra for Windows NT:

1. Verify that a Web server is installed and properly configured.

2. Verify that ColdFusion Server Enterprise Edition is installed, including the Advanced Security option. See Verifying Advanced Security Installation in this chapter.

3. Install Allaire Spectra.

4. Verify that Allaire Spectra is installed properly and configure Webtop settings.

The installation steps are explained in detail in the following sections.

System Needs

Allaire Spectra Requirement

Application Server

ColdFusion Server Enterprise Edition 4.0.1 or 4.5.1, with the Advanced Security feature installed and enabled.

OS Windows NT 4.0 Server

Processor Intel Pentium or higher

Disk Space 100MB

Memory • 64MB minimum

• 256MB Recommended

Other Hardware

CD-ROM drive

Browser Netscape 4.0 or higher, or Internet Explorer 4.0 or higher, is required to run the Allaire Spectra Webtop. There are no inherent browser restrictions on Web systems you build with Allaire Spectra.

Page 29: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 2: Installing Allaire Spectra 1.0.1 17

Upgrading an existing Allaire Spectra installation

If you’re upgrading an existing Allaire Spectra installation, you’ll run across a few extra steps in the installation procedure and the configuration wizard. These steps allow you to upgrade your existing object store before continuing with the installation script.

Before upgrading your Allaire Spectra installation, make backup copies of your application files and data sources.

Windows NT Installation Notes

• Allaire recommends that you uninstall Allaire Spectra sample applications and documentation on production servers or servers that are available on the Internet. To remove sample applications and documentation from the server, delete the following directories:

• webroot/i-build

• webroot/allaire/spectra/restorenet

• webroot/allaire/spectra/docs

• webroot/allaire/spectra/handlers/i-build

• webroot/allaire/spectra/handlers/restorenet

• Refer to the Release Notes to learn more about supported configurations, features, and enhancements.

• To uninstall Allaire Spectra, use Add/Remove Programs in the Windows Control Panel.

• If Allaire Spectra does not run properly, make sure that the Advanced Security feature of ColdFusion Server is installed and enabled. See Verifying Advanced Security Installation.

Contact Allaire Customer Service if Allaire Spectra does not install properly. See “Contacting Allaire” on page xii for more information.

Page 30: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

18 Getting Started with Allaire Spectra

Allaire Spectra Windows NT InstallationTo load and configure Allaire Spectra, you launch the install program, setup.exe. During Allaire Spectra setup, the installation process prompts for:

• The Allaire Spectra components you want to install

• A folder in which to store Allaire Spectra program files

To get started quickly, accept the install program’s default folders.

• The Web root folder

• The Program Group folder

If your system has a previous version of Allaire Spectra, setup.exe replaces Allaire Spectra program files but does not remove or change any existing application pages.

Note Prior to running setup.exe, close all other applications and shut down any database servers running on the machine.

To install Allaire Spectra for Windows NT:

1. Log in to your system using an Administrator account.

2. Run setup.exe from the Allaire Spectra CD-ROM.

3. Read and accept the Allaire Spectra license agreement.

4. Fill in the product registration form.

5. Select the components to install.

For a dedicated Web server, install the server files only. To install Allaire Spectra Studio Tools, select ColdFusion Studio files only. If the Web server also includes ColdFusion Studio, install both.

6. Accept the default folder names for Allaire Spectra program files, or choose your own folder names.

7. Select your Web server’s web root directory for Allaire Spectra. (This Web server is the one that ColdFusion is configured to work with.)

The setup process polls your computer and displays the Web root directory it finds.

8. Accept the default folder names for Allaire Spectra Web root files.

The Allaire Spectra Webtop, RestoreNet example application, and online documentation are installed in the allaire/spectra directory, which resides below the Web server’s root directory. Additionally, the install process creates a folder under the web root for the i-Build.com example application.

9. Accept the default Program Group to add Allaire Spectra to the Start menu.

10. Start the installation by verifying the data on the next screen and pressing Next.

Page 31: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 2: Installing Allaire Spectra 1.0.1 19

After the installation is complete, restart your system. After you’ve restarted your system, verify the installation and initialize Webtop settings, as described in Configuring Your Installation.

Note If the ColdFusion Advanced Security feature is not installed and enabled, you will not be able to run Allaire Spectra. See Verifying Advanced Security Installation in this chapter to check whether Advanced Security is running properly.

Solaris System RequirementsThe table below describes Solaris system requirements for Allaire Spectra.

System Needs

Allaire Spectra Requirement

Application Server

ColdFusion Server Enterprise Edition 4.5.1 or higher, with the Advanced Security feature installed and enabled. Note that the Advanced Security feature requires access to an LDAP server.

OS • Solaris 7 with required patches

• Solaris 2.5.1 with required patches

• Solaris 2.6 with required patches

Processor Sparc

Disk space 150 MB

Memory 256 MB (512MB recommended)

Other System Needs

• CD-ROM drive

• X Windows Platform software

• XCU4 Utilities

• Root access

Browser Netscape 4.0 or greater, or Internet Explorer 4.0 or greater, is required to run the Allaire Spectra Webtop. There are no inherent browser restrictions on Web systems you build with Allaire Spectra.

Page 32: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

20 Getting Started with Allaire Spectra

Solaris System VerificationA Web server must already be installed and running in order to install and configure Allaire Spectra. In order to install Allaire Spectra successfully, you will need to know the specifics about the Solaris environment.

Verify the installation environment by:

• Ensuring that you already have all of the appropriate Solaris patches installed for a particular OS.

• Noting the Web server, its Web root, and configuration files locations.

• Noting where you want to install Allaire Spectra on your machine.

/opt is the default directory.

Note UNIX filenames are case-sensitive.

Solaris Installation OverviewNote that there is no upgrade option for this release of Allaire Spectra on Solaris. If you have an existing Solaris installation of Allaire Spectra, see Allaire Knowledge Base article#14940 for more information.

To configure ColdFusion on Solaris:

1. Verify that a Web server is installed and properly configured.

2. Verify that ColdFusion Server 4.5.1, Enterprise Edition, is installed and that the Advanced Security feature is installed and enabled in the ColdFusion Administrator. See Verifying Advanced Security Installation in this chapter.

3. Verify that you have an LDAP server installed, and that you have available the LDAP IP address, port, and the admin userID/password. This information is required for the ColdFusion Advanced Security feature.

4. Install Allaire Spectra.

5. Verify that Allaire Spectra is installed properly and configure Webtop settings. See Verifying Advanced Security Installation in this chapter.

The installation steps are explained in detail in the following sections.

Installation Notes

• Before installing the product, read the Release Notes to learn more about the supported configurations, features, and enhancements of Allaire Spectra.

• Allaire recommends that you uninstall Allaire Spectra sample applications and documentation on production servers or servers that are available on the

Page 33: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 2: Installing Allaire Spectra 1.0.1 21

Internet. To remove sample applications and documentation from the server, delete the following directories:

• webroot/i-build

• webroot/allaire/spectra/restorenet

• webroot/allaire/spectra/docs

• webroot/allaire/spectra/handlers/i-build

• webroot/allaire/spectra/handlers/restorenet

• If after you install Allaire Spectra, it does not run properly, make sure that the Advanced Security feature of ColdFusion Server is installed and enabled. See Verifying Advanced Security Installation.

• Contact Allaire Customer Service if Allaire Spectra does not install properly. See “Contacting Allaire” on page xii for more information.

Allaire Spectra Solaris Installation

To install Allaire Spectra on Solaris:

1. Log in as root.

2. Load the Allaire Spectra CD-ROM into your CD drive.

3. Untar the spectra101.tar file.

4. Run the install.sh script. (Make sure it has execute rights.)

5. Enter the Allaire Spectra serial number ID when prompted.

6. Enter the name of your ColdFusion home directory.

7. Accept the default home directory for Allaire Spectra program files or choose your own location.

8. Enter the default document directory for your Web server or choose your own location.

9. Enter an existing login name, such as nobody.

10. Press Enter at each prompt for building the uninstall script, creating the cfaobjects data source, setting up the ODBC data source, and beginning the installation.

11. Run the Spectra Configuration Wizard (located at http://localhost/allaire/spectra/install/index.cfm).

See Configuring Your Installation for information on running the configuration wizard.

Page 34: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

22 Getting Started with Allaire Spectra

Verifying Advanced Security InstallationBefore you install Allaire Spectra, make sure that the Advanced Security feature of ColdFusion Server is installed and enabled.

Note If you open the ColdFusion Administrator, and there is not a link for Advanced Security in the left-hand column, then you need to reinstall ColdFusion Server Enterprise Edition and choose the Advanced Security option.

This section outlines a procedure to test that the Advanced Security feature is working properly once it’s been installed. You create a user directory and a security context, and then add a policy with rules to the security context. For more information on how the Advanced Security feature works, see the ColdFusion Server documentation.

To test that Advanced Security is working:

1. (Solaris Only) Run the coldfusion/siteminder/bin/smconsole utility and test for a successful LDAP connection.

2. Open the ColdFusion Administrator > Advanced Security page and check the Use Advanced Server Security box to enable the Advanced Security feature.

3. Click the User Directories button to add a user directory, called TestUD, and click Add.

4. In the New User Directory page, enter a Location, choose a Namespace, and click Add.

5. Open the Advanced Security page of the ColdFusion Administrator and click the Security Contexts button to add a security context, called TestSC.

6. In the New Security Context page, enable security for the UserObject resource type, enable the option to add existing user directories, and click Add.

7. In the Edit Security Context page, click Policies to add a security policy called TestPolicy, and click Add.

8. In the New Security Policy page, click Add.

9. Click on the policy name, TestPolicy, to open the Edit Security Policy page.

10. Click Users, and then click Add/Remove to add an existing user from the TestUD user directory to the TestPolicy policy.

11. Click the Back button until you return to the Edit Security Context page for TestSC.

12. Click Rules, add a Rule called TestRule, and click Add.

13. Click Back to return to the Edit Security Context page for TestSC, click Policies, and choose TestPolicy. Then click Rules and then Add/Remove to add TestRule to the current rules for the policy named TestPolicy.

14. Create a page called AuthenticationTest.cfm, and include the following CFML code in it:

<cfauthenticate setcookie="No"

Page 35: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 2: Installing Allaire Spectra 1.0.1 23

throwonfailure="Yes" securitycontext="testsc" username="kvaughan" password="bribery">

<cfset authenticated = isAuthenticated(’SC1’)><br><cfoutput>authenticated:#authenticated#</cfoutput>

15. Save the page in the <webroot>/cfdocs directory and open it in your Web browser.

16. If the results are "authenticated:Yes", the test has been successful.

Note This test assumes the airius.com ldif schema has been imported into the LDAP Directory Server configured with Cold Fusion Advance Security.

If these steps are successful, the Advanced Security feature is installed and running properly. Do not install Allaire Spectra until you’ve run through these verification steps, in the order listed above.

For more information on administering ColdFusion Advanced Security see the "Configuring Advanced Security" chapter of the Administering ColdFusion Server manual, available online at http://www.allaire.com/documents/cf45docs/acrobatdocs/45admin.pdf.

Configuring Your InstallationAfter installation, start the Allaire Spectra Webtop. When you start the Webtop for the first time, Allaire Spectra runs a Configuration Wizard. You must run the Configuration Wizard to complete the installation.

Note One of the final steps in the Configuration Wizard prompts you for a user name and password. Make sure you remember these values because Allaire Spectra does not ship with predefined user names or passwords.

To configure Allaire Spectra:

1. Start the Webtop:

• Windows NT — Select Start > Programs > Allaire > Spectra > Webtop.

• Solaris — Open a Web browser and go to http://localhost/allaire/spectra/install/index.cfm.

The first time you start the Webtop, the Allaire Spectra Configuration Wizard displays.

Page 36: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

24 Getting Started with Allaire Spectra

Note You can run the Configuration Wizard at any time by opening a Web browser and going to spectra/install/index.cfm. However, the account creation process runs the first time only.

2. Click Continue.

(Windows NT Only) If this is an upgrade installation, the wizard prompts you to update your existing Allaire Spectra installation.

3. (Upgrades only) Follow the wizard’s instructions for updating data sources and select the data sources you want to update. Click Continue.

The wizard prompts you to build Allaire Spectra collections.

Page 37: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 2: Installing Allaire Spectra 1.0.1 25

4. Click Continue.

The wizard builds the Verity collections used by Allaire Spectra and its example applications. When the process completes, the wizard displays a status screen. If this step fails, start the ColdFusion Administrator to ensure that Verity is set up properly and that you have deleted any pre-existing Allaire Spectra collections.

5. Click Continue.

(Solaris only) The wizard displays the LDAP Settings form. You use this form to specify the LDAP server that Allaire Spectra uses as the default User Directory to store Webtop user information. (When running under Windows NT, Allaire Spectra uses the userDirectory.mdb database and the userDirectory data source, which are included with the product and installed automatically.)

(Solaris only) Enable Secure Connect if the LDAP server is also a secure sockets layer (SSL) server. For more information on ColdFusion Advanced Security and LDAP, refer to the ColdFusion documentation set.

Page 38: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

26 Getting Started with Allaire Spectra

(Solaris only) This step requires that Advanced Security is installed and configured, and that your LDAP server is available. See the ColdFusion Server documentation for more information.

6. (Solaris only) Click Create User Directory.

The Configuration Wizard creates an LDAP user directory and displays a confirmation screen.

7. (Solaris only) Click Continue.

(Windows NT only) The wizard prompts you to configure ColdFusion security caching settings. To ensure optimum performance, the following ColdFusion Advanced Security settings should be enabled in the ColdFusion Administrator:

• Load Security Server Policy Store Cache at Startup

• Use Security Server Policy Store Cache

• Use Security Server Authorization Cache

• Use ColdFusion Server Cache

(Windows NT only) If you use MS Access for your security policy store, the wizard also lets you choose to alter the Advanced Security Synchronization Delay. This setting slows down database requests because MS Access cannot process policy

Page 39: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 2: Installing Allaire Spectra 1.0.1 27

store requests fast enough. Using MS Access for your policy store is not recommended.

8. When you’re finished configuring security caching, click Make Changes.

The wizard sets your configuration.

9. Click Continue.

The wizard prompts you to test security.

10. Click Test Security.

Page 40: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

28 Getting Started with Allaire Spectra

The wizard tests to ensure that Allaire Spectra and ColdFusion security are enabled properly. If this step fails, click Retry to retry the procedure and open the ColdFusion Administrator to ensure that Advanced Security is enabled.

Under Windows NT, you should use the Services control panel to ensure that the SiteMinder Authentication and Authorization services are running.

On Solaris, verify that the SiteMinder Authentication (smservauth) and Authorization (smservaz) processes are running.

When security is verified, the wizard displays a status screen.

11. Click Continue.

(Windows NT Only) For upgrade installations, skip to step 14.

If this is a new installation, the wizard prompts you to create a user name and password for the Allaire Spectra administration account.

Note It’s important that you remember this user name and password. Allaire Spectra is a secure system and you need these values to log on. Once you have logged on to Allaire Spectra, one of your first tasks should be to enable additional user names/passwords and assign users to groups based on their role in the Allaire Spectra team. These tasks are described in Administering Allaire Spectra.

12. Click Create Account.

The wizard creates the user name and password.

Page 41: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 2: Installing Allaire Spectra 1.0.1 29

13. Click Continue.

The wizard prompts you to test the COAPI.

14. Click Test COAPI.

The wizard tests to ensure that the COAPI is installed properly. When the COAPI is verified, the wizard displays a status screen.

15. Click Continue.

The wizard displays a completion message.

16. Click Launch Allaire Spectra Webtop.

The Login screen displays.

Page 42: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

30 Getting Started with Allaire Spectra

17. Type the user name and password you created during the configuration process.

18. Click Enter.

The Webtop displays.

Installing Allaire Spectra Studio Tools (NT Only)The client-only options in the Allaire Spectra installation program for Windows NT enable support for ColdFusion Studio, including:

• The Allaire Spectra toolbar

• Online documentation, including F1 Help

• Tag Insight

• The Tag Inspector

When you install Allaire Spectra on Windows NT, you can optionally install client tools on the machine running Allaire Spectra. The installation program also allows you to install client tools separately onto developer workstations running Windows NT, Windows 95, or Windows 98.

To install Allaire Spectra Studio tools on developer workstations:

1. Ensure that ColdFusion Studio version 4.01 or 4.5 is installed on the developer workstation.

2. On the client workstation, run setup.exe from the Allaire Spectra CD-ROM.

3. Read and accept the Allaire Spectra license agreement.

4. Fill in the product registration form.

5. Select the client-only install option.

The install process creates registry entries, files, and directories that enable Allaire Spectra support in ColdFusion Studio.

For information about using ColdFusion Studio, see the ColdFusion Server documentation set.

Page 43: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 3

Chapter 3 Best Practices for Building Allaire Spectra Applications

This chapter outlines the issues and strategies you need to consider when building a large-scale Web application.

Contents

• Phases of Allaire Spectra Development.......................................................... 32

• Best Practices for Building Allaire Spectra Applications ............................... 34

• Allaire Spectra Application Development ...................................................... 34

• Moving from ColdFusion to Allaire Spectra ................................................... 36

• Strategies for Managing Allaire Spectra Data................................................. 38

Page 44: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

32 Getting Started with Allaire Spectra

Phases of Allaire Spectra DevelopmentSetting up a large-scale Web application requires up front work in organization and planning before developers write code and business users add content and commerce information to the system.

The life cycle of a large-scale Web application project includes these broad phases:

• Planning

• Information Design

• Implementation

• Reporting, Refining, and Maintaining

For large, complex projects, you may want to consider rolling the application out in stages — beginning department-by-department for an intranet, or for an Internet site, starting with content publishing before adding e-commerce and integrating the application with your company’s supply chain.

Planning

In the initial planning phase, the team identifies the business goals of the site.

• Who is your audience?

• What information are you trying to convey?

• What will be the tone and content of the site?

• Will you employ transactions?

• If so, which back-end systems need to hook into the Web application?

Planning internal resources and hiring outside contractors also takes place in this phase. There are many more questions to answer in the planning, depending on your application’s goals and complexity.

In most cases, the Web team will write a specification, or spec, for the application. This document outlines the definition of the application, identifies key resources required, and outlines the steps to come.

Information Design

Once the project has been defined, you can create an information design that maps out both the visual design of the site (as in a prototype) and also the site’s content hierarchy.

• What are the major components of the site?

• How are they related?

• How will users navigate around the site?

Business managers and interactive developers will map out the Site’s Object Model at this stage, identifying the ContentObject Types in the application. They will also identify areas where Process Logic Paths (PLPs) can map complex multi-step

Page 45: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 3: Best Practices for Building Allaire Spectra Applications 33

processes. The site’s business managers will consult with production staff, to create workflows to control the content creation and maintenance process.

Implementation

In this phase, all members of the team work through the Allaire Spectra Webtop to create their portion of the application, from system administration and development to site design and content creation.

Interactive developers build the foundations of the application, implementing the Site Object Model through ContentObject Types, properties, and methods. They also implement PLPs and workflows as needed.

Site designers implement the Site Layout Model by constructing the site’s sections, pages, and content containers. Business managers and users create and import content into the site in preparation for publishing the site on a live server.

The entire team tests the site, including content management, e-commerce processes, and content publishing.

Reporting, Refining, and Maintaining

Finally, once the site is live, the team can monitor its progress, noting user preferences and patterns through Allaire Spectra’s Business Intelligence features.

You’ll want to refine the application in numerous ways, including content and design, in response to user feedback, site logs, and usage reports. You can classify content by keyword categories to aid in personalization and site presentation. In response to system performance, system administrators may want to adjust the object and page caching settings.

Page 46: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

34 Getting Started with Allaire Spectra

Best Practices for Building Allaire Spectra ApplicationsWe’ve outlined an approach to building Allaire Spectra applications that recognizes the complexity and modularity of the Web application development process.

The following outlines a structured approach you can take in planning and creating your Web application.

Allaire Spectra Application DevelopmentThis section describes the steps your team will take in planning and building an Allaire Spectra application.

Note While all these steps are necessary, you do not need to do each one in order. At different sites, the process may run differently depending on the organization’s structure and procedures.

Create a Site Model

Map the site’s business goals

The business and development teams must determine the site’s goals, purpose, elements, and assets. Before anyone writes code, designs pages, or creates content, the team must articulate the company’s vision and goals for the site.

Decide who will work on the site

Determine how many people are on the team and how work will be divided. Allaire Spectra development relies on a range of participants, outlined in “The Spectrum of Participants” on page 6.

Page 47: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 3: Best Practices for Building Allaire Spectra Applications 35

Develop prototypes and specifications

Articulate the team’s plans and visions in a written specification, and begin building prototypes to show the site’s visual look and feel.

Set up hardware and software

The Allaire Spectra system administrator sets up the servers, installs Allaire Spectra software for all team members, and establishes Webtop security.

Implement the Site Model

Define the site’s building blocks

Before development begins, site builders must agree on the site’s pieces, elements, and content assets.

For example, an Allaire Spectra site for e-commerce might consist of content object Types, properties, and methods; pricing objects; merchandise objects; shopping cart objects; user profiling information; product information; and ad banners.

Code handlers

The interactive developer codes handlers that implement methods for content objects.

Design Process Logic Paths for complex procedures

Use Process Logic Paths for complex, multi-step, single-user procedures such as online purchasing, order processing, or registration. PLPs are designed for complex, single-user, multi-step processes and those that require state maintenance. The interactive develop creates PLP definitions and codes PLP step handlers.

Create workflows to manage processes

In Allaire Spectra, you create workflows for controlling how content is created, approved, and published. Workflows are designed for multi-person, concurrent processes.

Create the Site

Apply security

Allaire Spectra offers a powerful roles-based security feature. The project team can restrict access to portions of the site depending on a user’s authorization level. So, for example, business users can create and add content, but only in assigned sections. The system administrator controls access to Webtop sections; business managers typically control access to content.

Page 48: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

36 Getting Started with Allaire Spectra

Design the site and determine its structure

Site designers create the site’s framework — the sections, pages, and content containers that form the Site Layout Model for the Web business. They also add graphic elements, create page templates, and determine the site’s graphic design, branding, and navigation.

Create and manage content for the site

The team needs to determine how business managers and business users add content and images to the site. This might be a simple, ad-hoc process or it could involve implementing a workflow that includes steps for approval and publication. By implementing a content creation workflow, Allaire Spectra allows you to manage this process with task lists, notifications, and final approvals.

Use metadata classify the site’s information

Before you even create the site, decide how you want to classify your data. You’ll need to plan for personalization based on keyword categorization matched with user profiles.

Also, consider how you’ll want to report on your site. You can use keyword and categories to drive report selection.

Maintain the Site

Publish and schedule content

Business managers and users publish content to the site, based on content publication schedule.

Review reports and logs

Use Allaire Spectra’s reporting features to determine site usage patterns. Monitor performance and adjust caching and logging settings.

Measure success and re-evaluate the application

The entire team refines the site, tuning and testing each section.

Moving from ColdFusion to Allaire SpectraAllaire Spectra is built on top of ColdFusion Server, so if you’ve been developing ColdFusion applications, you’ll be able to get up and running quickly in Allaire Spectra.

Page 49: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 3: Best Practices for Building Allaire Spectra Applications 37

Learning Allaire Spectra concepts

Allaire Spectra introduces some important new concepts on top of the ColdFusion application development model. The following key concepts are important for understanding how Allaire Spectra works:

• Allaire Spectra’s object-based development model

• Site Object Model

• Site Layout Model

• The Allaire Spectra Webtop user interface

• Roles-based security

• Browser-based content management and reporting

See Allaire Spectra’s Architecture and Concepts in Chapter 1 for a discussion of each of these new concepts.

Coding in Allaire Spectra

Your understanding of ColdFusion concepts and tags will serve as a strong foundation for getting up to speed quickly in Allaire Spectra.

Basically, you create Allaire Spectra applications in a similar manner to ColdFusion applications, with several key additions: the Site Object model, the Site Layout Model, handler files, the ContentObject database, increased reliance on Custom Tags, use of Workflows and PLPs, and the Allaire Spectra Webtop user interface.

Allaire Spectra tags are custom tags, stored in the Custom Tags directory of the Allaire Spectra installation. Note that the cfa_ prefix for custom tags is reserved for applications and tags that Allaire develops and distributes. Your custom tags should use the prefix cf_tagname.

See the chapter Allaire Spectra for ColdFusion Programmers for step-by-step instructions for coding some simple Allaire Spectra pages. Before you learn about the advanced features that drive Allaire Spectra, you can see how the basic building blocks work. You’ll learn how to build a simple ContentObject Type, and then display and edit simple content examples with Allaire Spectra.

See the Managing Content chapter of Programming with Allaire Spectra for a detailed explanation of the Allaire Spectra object model as well as information on defining object properties, coding handlers, and working with external objects.

Working with data sources

ColdFusion programmers are familiar with CFQUERY tags and ColdFusion data sources. In Allaire Spectra, the site’s objects can be stored in Allaire Spectra’s own ContentObject database. You use Allaire Spectra tags to retrieve and manipulate these objects; you do not need to use SQL.

Page 50: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

38 Getting Started with Allaire Spectra

Alternatively, you may want to store application data in external data sources. You do this by using bridge objects stored in Allaire Spectra’s database whose properties point to your data sources. Your application pages can then use SQL along with Allaire Spectra tags, to interact with the external data.

In the next section, Strategies for Managing Allaire Spectra Data, you’ll learn more about options for storing data for Allaire Spectra applications. See the Programming Basics chapter of Programming with Allaire Spectra for a detailed explanation of data sources in Allaire Spectra.

Strategies for Managing Allaire Spectra DataAllaire Spectra includes a ContentObject database, which holds data for your ContentObject Types. In Allaire Spectra applications, there are two ways to store actual data (also called content items):

• Internally, where data is stored in Allaire Spectra’s ContentObject database.

• Externally, in an external data source, such as a corporate database.

A key difference between the two methods is that with internal objects you use Allaire Spectra tags to work with data in the Allaire Spectra database. External objects typically involve the addition of custom SQL with relational databases.

Most Allaire Spectra applications will use both methods to store content items, both internally and externally. You’ll make this decision based on the nature of the data being stored and whether the data is used and maintained outside of Allaire Spectra.

Storing data in Allaire Spectra’s ContentObject Database

When accessing data internally, content items contain a complete set of data, as shown in the following illustration.

Generally speaking, you’ll want to use Allaire Spectra’s ContentObject database for storing content objects in the following situations:

• For applications built from the ground up in Allaire Spectra and that do not need to share their data with other corporate applications.

• For content that you use and manage for a Web site — for example, content created for the Web site, as opposed to corporate application data.

Page 51: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 3: Best Practices for Building Allaire Spectra Applications 39

Using an external data source

When accessing data externally, content items contain a key value that handlers use to access external data, as shown in the following illustration.

The ability to work with external data objects is most useful in the following scenarios:

• For migrating an existing ColdFusion application to Allaire Spectra.

• For commerce applications where e-commerce data is maintained outside of Allaire Spectra.

• For reusing corporate databases in Allaire Spectra applications.

• To optimize the search or transaction aspects of an object type using custom SQL.

• For applications with specific, complex database structures.

For details on how to use external objects to access data in a database outside of Allaire Spectra, see “Working with External Objects,” in Chapter 5.

Page 52: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

40 Getting Started with Allaire Spectra

Page 53: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 4

Chapter 4 Quick Start Tutorial

This tutorial shows the basic tasks for creating and managing content with Allaire Spectra. First, we’ll take you on a quick tour of i-Build.com, our sample Allaire Spectra application. Then you’ll learn the basic steps for creating, displaying, and editing your own content.

Contents

• Quick Tour of i-Build.com ............................................................................... 42

• Editing i-Build.com in Design Mode .............................................................. 44

Page 54: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

42 Getting Started with Allaire Spectra

Quick Tour of i-Build.comThis tutorial shows the basic tasks for creating and managing content with Allaire Spectra. First, we’ll take you on a quick tour of i-Build.com, our sample Allaire Spectra application.

After you take a look at the published site, you can see how it’s built.

Note ColdFusion’s advanced security feature must be installed and running for Allaire Spectra’s design mode to work. For more on setting up Allaire Spectra for the first time, see Chapter 2, “Installing Allaire Spectra 1.0.1,” on page 15.

When you open the Allaire Spectra Webtop, it prompts you for a user name and password. You can either use those created during the installation of Allaire Spectra or the one assigned to you by the system administrator.

Viewing i-Build.com in Display Mode

When you look at an Allaire Spectra site in display mode (also known as browser mode or user mode), you’re seeing it as a finished content and e-commerce site, just as visitors to the Web site would see it.

To view the i-Build.com site as a user:

1. Open the Allaire Spectra Webtop (webroot/allaire/spectra/webtop/index.cfm or Start > Programs > Allaire > Spectra > Webtop in Windows NT) and click the i-Build Example Site (Browser Mode) link.

This page shows the published site, as end users would see it on the Web.

Page 55: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 4: Quick Start Tutorial 43

2. Click the title "Drill Know How" to see the full text of this article.

3. Try out the search box and then use the Information dropdown menu to locate content based on keywords.

Page 56: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

44 Getting Started with Allaire Spectra

Editing i-Build.com in Design ModeYou can also view Allaire Spectra sites in design mode (also known as admin mode), which shows how business users work with page elements to create, update, and publish content in Allaire Spectra.

To use i-Build.com in Design Mode:

1. Return to the Webtop using the Back button and click the i-Build Example Site (Design Mode) link.

2. Enter a user name and password to log in to the i-Build.com site. (Use the password you created during the installation of Allaire Spectra or the one assigned to you by the system administrator.)

The i-Build.com home page opens, showing the same content as in display mode, but with the addition of inline controls. These controls — for creating content, launching workflows, viewing reports, or editing content — appear when you’re viewing a page in design mode and enable the site’s business users and managers to add or update content in the page.

3. Point at one of the small squares (called grapples) surrounding the article titled "Repairing Drywall Holes."

Notice that Allaire Spectra highlights the content item.

4. Click the highlighted item.

The Object Viewer displays, showing a preview of the item’s content.

Page 57: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 4: Quick Start Tutorial 45

5. Click the Edit tab. This invokes the content item’s edit method. Make a few changes or add some text to the end of the paragraph.

6. Click Continue to reach the edit screen for the full text of the article. Click Continue again.

The Object Viewer redisplays the content.

7. Close the Object Viewer window and redisplay the i-Build.com home page.

Proceed to the next chapter, Allaire Spectra for ColdFusion Programmers, to learn the basics of creating content objects and coding pages in Allaire Spectra.

Page 58: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

46 Getting Started with Allaire Spectra

Page 59: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 5

Chapter 5 Allaire Spectra for ColdFusion Programmers

This chapter shows the basic tasks for creating and managing a content publishing system with Allaire Spectra, based on the main roles in Allaire Spectra development.

Contents

• Moving from ColdFusion to Allaire Spectra ................................................... 48

• Building a Basic Object Type ........................................................................... 50

• Creating Content Items ................................................................................... 54

• Displaying Your Content.................................................................................. 56

• Creating Display Handlers............................................................................... 58

• Creating Edit Handlers .................................................................................... 61

• Storing Data in Internal and External Data Sources ..................................... 65

• Working with External Objects........................................................................ 67

• Bringing External Data into Allaire Spectra Objects...................................... 68

• Displaying and Publishing Content................................................................ 71

Page 60: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

48 Getting Started with Allaire Spectra

Moving from ColdFusion to Allaire SpectraThe Allaire Spectra system is built on top of ColdFusion Server, so if you’ve been developing ColdFusion applications, you’ll be able to get up and running quickly in Allaire Spectra.

In the Allaire Spectra spectrum of participants, programmers are known as interactive developers. In addition to working in ColdFusion Studio to code pages, you’ll use the System Design section of the Allaire Spectra Webtop. To display the System Design section, click the System Design link at the top of the page.

Note When you open the Allaire Spectra Webtop, you need to provide a password. Use either the user name and password you created during the installation of Allaire Spectra or the user name and password assigned to you by the system administrator.

Basic Steps

This chapter shows you how to build a simple ContentObject Type, and then display and edit simple content examples with Allaire Spectra. Before you learn about the advanced features that drive Allaire Spectra, you can create some of the basic building blocks of an Allaire Spectra application.

Here are the basic steps you take to create a simple test application:

• Open the System Design section of the Allaire Spectra Webtop.

• Create a new ContentObject Type.

• Create content items, or instances of the content type.

• Use Allaire Spectra’s default handlers for display.

• Write your own handlers to display content items.

• Code pages for display.

Page 61: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 49

Be sure to read the earlier chapters in this book to learn about Allaire Spectra concepts — Introducing Allaire Spectra and the best ways to approach Allaire Spectra development projects — Best Practices for Building Allaire Spectra Applications.

Establishing Preferences

The preference bar displays horizontally towards the top of the Webtop. It displays the current user ID and the current application.

These are also links that you can use to change preferences quickly:

• Click the user ID to display the My Profile tab of the Preferences form, which displays user information, including first name, last name, e-mail address, and password. Specify your first name, last name, and e-mail address. Then click OK.

• Click the current application to display the Preferences tab, which displays current settings. You can use this tab to control the current application, your personal home page, Webtop Help, and the display of system objects. If iBuild is not the current application, use the dropdown listbox to select iBuild and click OK.

Page 62: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

50 Getting Started with Allaire Spectra

You can also display this information via the Preferences link on the Webtop home page.

Building a Basic Object TypeContentObject Types are the building blocks used by interactive developers to construct a site with Allaire Spectra. Developers for a marketing application, for example, might create new ContentObject Types for product information, pricing, new articles, press releases, white papers, and data sheets.

Allaire Spectra stores content objects in the Allaire Spectra ContentObject database. You can also store content in external data sources. See Storing Data in Internal and External Data Sources for information on storing data for Allaire Spectra applications in external data sources.

In this procedure, you define a new ContentObject Type for news items.

To create a new ContentObject Type:

1. Open the System Design section of the Webtop.

The System Design section is where you create, modify, or delete object types and properties.

2. Click the navigation arrow to expand the Site Object Designer and click the Type Designer link.

3. Click Create.

Page 63: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 51

The New Type form displays.

4. Enter a name for a new ContentObject Type, for example, DailyNews. (Don’t use spaces in this name.)

5. In the Type Settings page, enter a description, such as News items for tutorial.

This description will be used to identify your new ContentObject Type in the Webtop.

6. Enter a location for the ContentObject Type’s handler files: /allaire/spectra/handlers/dailynews.

7. Click OK.

The Edit Type page for the TutorialNewsItem display. This tabbed interface lets you associate properties and methods with the new ContentObject Type, DailyNews.

Adding content properties

You next add properties to the new content object. Properties are ways in which business users can enter content into an instance of that type — for example, to the title, teaser, or body text.

You’ll find that as you develop Allaire Spectra applications, you’ll rely on a mix of existing and custom properties. In the next chapter, Developing a Web Application with Allaire Spectra, you define a new property from scratch.

In this procedure, you use three existing properties already defined in Allaire Spectra.

To associate properties with a ContentObject Type:

1. From the Edit Type page, click the Properties tab.

Page 64: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

52 Getting Started with Allaire Spectra

2. Enter a property name, such as Title, in the New Property text box.

3. In the dropdown listbox, select the existing property definition Title.

4. Click Add.

The New Type Property Definition page displays.

Page 65: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 53

5. In the New Type Property Definition page for the Title property, check the Required, Searchable, and Indexed check boxes.

6. Click OK.

7. Repeat these steps with two other properties: Teaser and Body.

A list of properties you’ve associated with the DailyNews content object appear in the Properties tab of the Edit Type page.

Once you’ve defined these properties, you can create content items, or instances of the new DailyNews ContentObject Type, using Allaire Spectra’s default handlers to edit, create, delete, and display content.

Page 66: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

54 Getting Started with Allaire Spectra

For now, you don’t need to add your own methods to this ContentObject Type. We’ll rely on the system’s default handlers for basic methods. Later, you’ll code display and edit handler for this ContentObject Type.

Creating Content ItemsInstances of your new ContentObject Type are called content items, or objects. In this procedure, you create two new content items, adding content to the three properties you defined above.

To create content items:

1. In the System Design section of the Webtop, open the Object Finder by expanding the Site Object Designer item and clicking Object Finder.

2. Select your new ContentObject Type, DailyNews, from the Filter by Type drop down menu. The Object Finder refreshes automatically (older browsers may need to click Refresh).

3. Click Create (at the bottom of the display).

The Object Viewer appears, showing the unique TypeID of the ContentObject Type and the ObjectID of the current instance of the object, or content item.

Page 67: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 55

The Object Viewer allows you to perform many tasks, including create instances of your new ContentObject Type. You can optionally use the links on the left-hand side to perform other, advanced, tasks, which are not covered in this manual.

4. Enter a Label to identify the object in the Object Finder, for example, First news item.

5. Enter some text for the Body, Title, and Teaser properties.

6. Click OK.

Allaire Spectra previews your content.

7. Click the Data Dump link to show the full information for this content item.

Page 68: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

56 Getting Started with Allaire Spectra

8. Close the Object Viewer window.

9. Click Refresh.

10. Repeat steps 3 through 6 to create a second content item of this ContentObject Type.

Displaying Your ContentIn Allaire Spectra, you use methods, such as edit or display, to operate on objects.

In this procedure, you create a simple Web page that uses the display method to show your new content items, using the cfa_contentObject tag, calling Allaire Spectra’s default display handler.

To display new content items:

1. In HomeSite, ColdFusion Studio, or your favorite text editor, create a new page, called testpage.cfm in the /<webroot>/i-build directory.

2. In the System Design section of the Webtop, open the Object Finder by expanding the Site Object Designer item and clicking Object Finder.

3. Select DailyNews from the drop down menu.

Page 69: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 57

The Object Finder shows the two content items you just created.

4. Copy the ObjectID (UUID) of each content item.

You’ll need this information to display the items with the cfa_contentObject tag.

5. Use the cfa_contentObject tag to call the ObjectIDs of the two DailyNews content items you created in the previous procedure.

Use this sample code as your guide. (Your object IDs will be different. Make sure there are no spaces in the list of objects in the lobjectids value.)

<html><head>

<title>Allaire Spectra Tutorial</title></head>

<body>

<!--- Use the cfa_contentObject tag to displaycontent items for my new ContentObject Type. --->

<!--- Allaire Spectra uses its own default display method because you’ve not created a display handler explicitlyfor this ContentObject Type. --->

<h3>Display my content items:</h3><cfa_contentObject

dataSource="cfaobjects"lobjectids="FEFC7A20-7CB7-11D3-910E00104B8731B3,FEFC7A73-7CB7-

11D3-910E00104B8731B3"method="display">

</body></html>

6. Display the page in your browser.

Page 70: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

58 Getting Started with Allaire Spectra

The page appears, using Allaire Spectra’s default display handler to show the content of each content item you specified in the lobjectids attribute of the cfa_contentObject tag. Note that method="display" in the cfa_contentObject tag.

Creating Display HandlersAllaire Spectra’s default handlers let you see and edit content quickly. But you’ll most likely want to display and edit your text using your own display and edit methods. In the following procedures, you create very basic display and edit handler files to implement the display and edit methods.

Note that Allaire Spectra will use its default edit, display, and delete handlers unless you have defined methods of the same name. You save handler files in the directory you name as the handler root directory when you define the ContentObject Type.

For example, we just used Allaire Spectra’s default display handler. But in the following procedure, you create your own display handler, place it in the ContentObject Type’s handlers folder, and register it in the ContentObject Type’s definition. This causes Allaire Spectra to use your display handler.

To create a basic display handler:

1. In HomeSite or ColdFusion Studio, create a new file named display.cfm in a new folder named <spectrainstallroot>/handlers/dailynews.

2. Use the cfa_handler tag with the object attribute set to the name of your ContentObject Type. The cfa_handler tag’s object attribute establishes a scope for access to the content item’s properties, as shown in this example:

Page 71: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 59

<cfoutput><h3>Daily News Items</h3>

<!--- Cfa_handler automatically loops through the items passed to the handler. Use the object attribute (set to DailyNews in this example) to establish a scope, which you use as a prefix when accessing the content item’s properties. ---><cfa_handler

object="DailyNews">

<h3>#DailyNews.title#</h3><i>#DailyNews.teaser#</i><BR>#DailyNews.body#

</cfa_handler></cfoutput>

Note that all text to be returned to the browser must be wrapped in <cfoutput> </cfoutput> tags.

3. Save the file.

4. In the System Design section of the Allaire Spectra Webtop, open the Site Object Designer link, click Type Designer, and then click the edit icon next to DailyNews.

The Edit Types page displays.

5. Click the Methods tab.

6. Enter display in the Type Methods text box and click Add.

7. In the New Type Method page, enter a brief description of the handler, and enter display.cfm as the display handler file name.

Page 72: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

60 Getting Started with Allaire Spectra

8. Click OK.

9. Open testpage.cfm in your browser to see how the new display handler shows your content.

Now Allaire Spectra also uses your custom display handler when you invoke the display method for DailyNews items from the Webtop’s Object Finder.

Page 73: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 61

Creating Edit HandlersAllaire Spectra offers default edit handlers that you can use for the most basic editing tasks in the Webtop. In most applications, you’ll use dedicated edit handlers along with the content publishing and scheduling features to display and edit text.

This procedure illustrates a quick way to create your own, basic edit handler to edit the content items you’ve already created and displayed.

To create a basic edit handler:

1. In the <spectrainstallroot>/handlers/dailynews folder, create a new handler file named edit.cfm.

2. Use the cfa_handler tag to loop through your ContentObject Type, as shown in this example code:

<!---Handler for editing my new content object ---><!--- This example displays multiple content items

in multiple forms. Note that you can only editone at a time. --->

<cfa_handlerobject = "DailyNews"separator = "<HR>">

<!--- if the user has submitted the form ---><cfif isdefined("form.commitchanges")>

<!--- required parameters ---><cfparam name="DailyNews.objectid">

<!--- update the object ---><cfa_contentObjectData

dataSource = "cfaobjects"objectID = "#form.objectid#">

<!--- Update the following properties. --->

<cfa_contentObjectProperty name="title" value="#form.title#">

<!--- Keep title and label in sync. ---><cfa_contentObjectProperty

name="label" value="#form.title#"><cfa_contentObjectProperty

name="body" value="#form.body#"><cfa_contentObjectProperty

name="teaser" value="#form.teaser#"></cfa_contentObjectData>

<!--- Redisplay the previous page. ---><cflocation url="#cgi.http_referer#">

<cfelse>

Page 74: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

62 Getting Started with Allaire Spectra

<cfoutput><!--- display a form for editing the object ---><cfform action="" method="post"><input type="hidden" size="20" name="objectID"

value="#DailyNews.objectID#">

<p>Title&nbsp;<br><input type="text" size="20"

name="title" value="#DailyNews.Title#">

<p>Teaser&nbsp;<br><input type="text" size="20"

name="teaser" value="#DailyNews.Teaser#">

<p>Body&nbsp;<BR><input type="text" size="60"

name="body" value="#DailyNews.Body#">

<p><input type="submit" name="commitchanges" value="Save Changes"></cfform></cfoutput></cfif>

</cfa_handler>

3. In the System Design section of the Allaire Spectra Webtop, open the Site Object Designer link, click Type Designer, and then click the icon next to DailyNews.

The Edit Types page displays.

4. Click the Methods tab.

5. Enter edit in the text box and click Add Method.

6. In the New Type Method page, enter a brief description of the handler, and enter edit.cfm as the edit handler file name.

Page 75: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 63

7. Click OK.

8. In your text editor, return to the file testpage.cfm, change the heading to "Edit my content items" and change the method attribute in the cfa_contentObject tag to edit, instead of display.

<h3>Edit my content items:</h3><cfa_contentObject

dataSource="cfaobjects"lobjectids="EA2AA7C2-44EE-11D3-90C600104B8731B3,EA2AA7F1-44EE-

11D3-90C600104B8731B3"method="edit">

9. Save testpage.cfm and re-display it in your browser.

The page shows your edit form, letting you edit the Title, Teaser, and Body elements.

Page 76: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

64 Getting Started with Allaire Spectra

The procedures in this section give you a taste for the most basic and simple ways to build and display content quickly in Allaire Spectra.

In real-world applications, you’ll use much more sophisticated handlers and features — for example, using sections, pages, and containers to publish and track content items, and Process Logic Paths to handle complex, multi-step procedures.

For more information on writing handlers, see the "Content Management" chapter of Programming with Allaire Spectra. To learn more about Allaire Spectra tags and data structures, see the Allaire Spectra Reference.

Page 77: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 65

Storing Data in Internal and External Data SourcesYou can store your content items either in an Allaire Spectra ContentObject database or in your own database.

The Allaire Spectra ContentObject database holds data for your ContentObject Types and other system objects. However, Allaire Spectra offers two methods of storing application content:

• Internally — Store content in Allaire Spectra’s ContentObject database. Access data through Allaire Spectra tags.

• Externally — Store content in an external data source, such as a corporate database. Access data through a combination of Allaire Spectra tags and custom SQL with a server DBMS.

Most Allaire Spectra applications will use both methods to store objects, both internally and externally. You’ll make this decision based on the nature of the data being stored and whether the data is used and maintained outside of Allaire Spectra.

Storing data in Allaire Spectra’s ContentObject database

When accessing data internally, content items contain a complete set of data, as shown in the following illustration.

Generally speaking, you’ll want to use Allaire Spectra’s ContentObject database for data storage in the following situations:

• For applications built from the ground up in Allaire Spectra and that do not need to share their data with other corporate applications.

• For content that you use and manage for a Web site — for example, content created for the Web site, as opposed to corporate application data.

Using an external data source

When accessing data externally, you still have Allaire Spectra content items, but instead of holding all your data, the content items contain a key value that Allaire Spectra handlers use to access your external data, as shown in the following illustration.

Page 78: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

66 Getting Started with Allaire Spectra

When to use external objects

The ability to work with external data objects is most useful in the following scenarios:

• For migrating an existing ColdFusion application to Allaire Spectra.

• For commerce applications where e-commerce data is maintained outside of Allaire Spectra.

• For reusing corporate databases in Allaire Spectra applications.

• To optimize the search or transaction aspects of an object type using custom SQL.

• For applications with specific, complex database structures.

For more information on external objects, see Programming with Allaire Spectra.

Page 79: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 67

Working with External ObjectsThis section illustrates how to create an external object to pull data from an external database for use within an Allaire Spectra application.

• First you’ll create a new ContentObject Type in Allaire Spectra that holds data mapped to the primary key of the external data source.

• Then you loop through the external data source to create content items for each entry in the external data source. (For this exercise, you use the cfsnippets data source that’s installed with ColdFusion Server.)

• Then you use a display handler to output the contents of your query to the external object.

To create a ContentObject Type for external objects:

1. In the System Design section of the Allaire Spectra Webtop, open the Site Object Designer link, and click Type Designer.

2. Click Create.

3. Enter courses for the label.

4. Enter a description and provide the following Handler Root: /allaire/spectra/handlers/courses.

5. Click OK.

6. In the Edit Type page, add the following methods (and handler files): edit (handler file: edit.cfm), and display (handler file: display.cfm).

To define a property for external objects:

1. In the System Design section of the Webtop, click the Property Definitions link in the Site Object Designer section.

2. In the New Property text box, enter externalObjectID, leave the data type as char, and click Create.

3. In the New Property Definition page, enter a description, such as "Pass through property for primary key in Courses table of cfsnippets."

4. Click OK.

Allaire Spectra creates the property definition and redisplays the property definition list.

To associate the property definition with the courses ContentObject Type:

1. Click the Type Designer link under Site Object Designer and click the edit icon next to the courses ContentObject Type.

2. In the Properties tab of the Edit Type page, enter externalObjectID in the text box, choose the new property of the same name from the dropdown menu, and click Add.

Page 80: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

68 Getting Started with Allaire Spectra

3. Click OK in the New Type Property Definition form.

The Edit Type form redisplays.

The property is now registered for this ContentObject Type. In the next procedure, you’ll add content to this property.

Bringing External Data into Allaire Spectra ObjectsIn the next procedure you create Allaire Spectra content items and populate the externalObjectID property with content from cfsnippets, the sample external data source that’s installed with ColdFusion Server. You use a CFQUERY to pull data from the external data source into Allaire Spectra content items.

To create content items using external data:

1. Before you create a page to query the data source and populate a series of content items, take a minute to become familiar with the structure of the Courses table in the cfsnippets database, located in your ColdFusion installation at /cfusion/database/cfsnippets.mdb.

Note that Course_ID is unique, and that Number and Descript provide course numbers and descriptions respectively.

2. In ColdFusion Studio or your text editor, create a file named configure.cfm and save it in the <webroot>/i-build directory.

3. In configure.cfm, create a CFQUERY to pull course IDs and descriptions from the cfsnippets data source.

<cfquerydatasource="cfsnippets"name="qcourses">select Course_ID, Descript from courses

</cfquery>

4. Then use CFOUTPUT to loop through the query results, placing the Course_ID into the externalObjectID value of the structure, stProperties.

Page 81: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 69

<cfoutputquery="qcourses">

<cfset stProperties=structNew()><cfset stProperties.externalObjectID="#qcourses.Course_ID#">

Use the cfa_contentObjectCreate tag against the internal Allaire Spectra data source, cfaobjects, using the TypeID of the courses ContentObject Type.

(Your type ID will be unique; you find it by opening the Types link in the Site Object Designer page of the Webtop and clicking the courses object type.)

5. Set the label attribute to the course description, which comes from the Descript column of the Courses table in cfsnippets.

You’ll see these values later in the Allaire Spectra publishing feature, where you choose content items to publish to a page.

<!--- Use descript as the label. Be sure to specify bActivate="Yes" (the item must be marked as active to be retrieved by Allaire Spectra). ---><cfa_contentObjectCreate

dataSource = "cfaobjects"typeID="89DE0139-03C8-11D3-B2B500104B2C8C17"label = "#qcourses.Descript#"stProperties = "#stProperties#"bActivate="Yes"r_id = "thisobjectid"><p>#thisobjectid# Created</p>

</cfoutput>

6. Save the configure.cfm file and run it in your browser.

The content items are created, and the page displays the ObjectIDs of each instance of the courses ContentObject Type.

Note Make sure that you run the configure.cfm page only once. Running the page a second time creates a second set of content items in Allaire Spectra.

Page 82: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

70 Getting Started with Allaire Spectra

You can verify that the objects were created by opening the Object Finder link in the Site Object Designer portion of the System Design section and filtering by the courses ContentObject Type.

Creating a display handler to display external information

Now that the content items are created, you’ll want to create a display handler to publish information from your external datasource.

To create a display handler:

1. In ColdFusion Studio, create a file named display.cfm in the <spectrainstallroot>/handlers/courses directory.

Recall that in an earlier procedure, you added the display method to the courses object, using the Methods section of its Type Settings dialog box.

2. Code the cfa_handler tag with the object attribute set to "external" and the separator attribute set to <HR>.

The object attribute establishes a scope reference that you can use to access content item data.

3. Use the CFQUERY tag to select all columns from the cfsnippets data source where the Course_ID is equal to the external object’s ID.

4. Display the course number and description.

Here’s the full code for the display handler:

Page 83: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 71

<cfoutput><h3>Display my courses from cfsnippets</h3>

<cfa_handlerobject="external"separator="<HR>">

<cfquerydatasource="cfsnippets"name="qcourses">select * from courseswhere Course_ID=#external.externalObjectID#

</cfquery>

<h3> Course Number #qcourses.Number#</h3><p>#qcourses.Descript#</p>

</cfa_handler></cfoutput>

5. Save the display.cfm file.

Using handler files such as this one, you can use Allaire Spectra methods to access data from an external data source.

Displaying and Publishing ContentNext, you create an Allaire Spectra page to display the data from your external data source and then publish content items to the page.

To create a page to display the external objects:

1. In ColdFusion Studio, create a page named courses.cfm and save it in the <webroot>/i-build directory.

2. Use the cfa_page tag to register the page with Allaire Spectra.

3. Use the cfa_container tag to manage publishing of content items in the page.

Here’s the sample code for courses.cfm:

<cfa_pagepageName="courses"datasource="cfaobjects">

<cfoutput><h3>Summer Semester Course List</h3>

<table border="0" cellpadding="2" cellspacing="2"><tr><td width=25>&nbsp;</td><td>

Page 84: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

72 Getting Started with Allaire Spectra

<cfa_container dataSource="cfaobjects" name="courselist"></td></tr>

</table>

</cfoutput></cfa_page>

4. Save the page.

The page appears with a heading along with a content container to which you can publish content pulled from the external data source.

To publish content items to your display page:

1. Display your page in design mode by type the <webroot>/i-build/courses.cfm?designmode=true URL If so, use the same user name and password used to log in to the Webtop.

2. Click the Publishing control next to the container title courselist.

The Allaire Spectra Container Editor appears.

Page 85: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 5: Allaire Spectra for ColdFusion Programmers 73

3. Click the Edit tab.

4. Click the Add button in the Items area.

5. Select Courses in the Type dropdown listbox.

6. Select all the course descriptions you want to publish, choose the Display method, and click Add.

7. In the Container Editor, your content items appear in the Items listbox. You can reorder items as needed.

8. Click OK.

The Container Editor closes, your handler accesses data from the external data source, and displays the content items in the published page.

Page 86: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

74 Getting Started with Allaire Spectra

Next step

Continue with the next chapter, which describes ContentObject Type creation and management in more detail.

For more information on programming in Allaire Spectra, see Programming with Allaire Spectra. To learn more about Allaire Spectra tags and data structures, see the Allaire Spectra Reference.

Page 87: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 6

Chapter 6 Developing a Web Application with Allaire Spectra

This chapter and the following two chapters offers a set of tutorials that show the basic tasks for creating and managing a content publishing system with Allaire Spectra, based on the main roles in Allaire Spectra development. This chapter describes tasks performed by the interactive developer, Chapter 7 describes tasks performed by the site designer, and Chapter 8 describes tasks performed by the business user and business manager.

Contents

• Developing a Web Application with Allaire Spectra ...................................... 76

• Defining Objects and Properties..................................................................... 76

• Creating ContentObject Types ........................................................................ 79

• Using Allaire Spectra’s Default Methods......................................................... 82

Page 88: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

76 Getting Started with Allaire Spectra

Developing a Web Application with Allaire SpectraIn this chapter, you create another ContentObject Type, called TutorialNewsItem. You’ll associate properties and methods with the object type, and then see how to display and edit content items of this type. At the end of this chapter, you will review handlers for the i-Build.com example application.

Establishing application-level settings

First, you’ll want to take a look at the i-Build.com Application.cfm file (<webroot>/i-build/Application.cfm), which establishes the application name and data source name. You also use the Application.cfm file to perform user authentication and establish global settings.

Defining Objects and PropertiesThis section shows interactive developers how to use the System Design area of the Allaire Spectra Webtop to define a new ContentObject Type and associate properties and methods with it. You’ll start by defining the object’s properties.

To create a ContentObject Type:

1. Open the Allaire Spectra Webtop and open the System Design area.

Note When you open the Allaire Spectra Webtop, you need to provide a user name and password. You can either use the one you created during the installation of Allaire Spectra or a user name and password assigned by the system administrator.

2. In the Site Object Designer section, click the Property Definitions link.

Page 89: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 6: Developing a Web Application with Allaire Spectra 77

The Properties page appears, listing existing properties, with a brief description of each. You use this page to create properties for the Tutorial example, such as TutorialTitle, TutorialTeaser, TutorialURL, and TutorialBody. Later, you will associate properties with a ContentObject Type.

3. In the New Property box, enter a name for a new property, for example, TutorialTitle, choose the data type char, and click Create.

4. In the New Property Definition page, enter a description for the new property, as well as input type (text) and validation options.

Page 90: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

78 Getting Started with Allaire Spectra

5. Click OK.

The Properties page now shows the new property you just created.

6. Repeat steps 4 through 6 to create three additional properties, TutorialTeaser, TutorialURL, and TutorialBody, following the above steps. You can choose whether each property should be required, searchable, and indexed. Here’s how each property is defined.

The Properties page now shows the four properties you’ve created.

Property Data Type Description Input Type

TutorialBody longchar Tutorial news item’s body text textarea

TutorialTeaser longchar Short content describing news item in Tutorial

textarea

TutorialURL char Tutorial news item’s URL text

Page 91: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 6: Developing a Web Application with Allaire Spectra 79

Creating ContentObject TypesContentObject Types are the basic building blocks for content created with Allaire Spectra.

To create new ContentObject Types:

1. Open the Site Object Designer menu and click the Type Designer link.

The Type Designer page appears, showing all the current ContentObject Types.

2. Click Create.

The New Type form displays.

3. Enter a unique name for a new object type, for example, TutorialNewsItem.

4. Enter a description of the ContentObject Type. This description appears in the Type Designer and helps you identify object types.

5. Then enter the location of the object type’s Handler Root directory, for example, /allaire/spectra/handlers/tutorial.

6. Click OK.

The Edit Type page for the TutorialNewsItem displays to let you associate properties and methods with the new ContentObject Type, TutorialNewsItem.

Page 92: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

80 Getting Started with Allaire Spectra

7. Click the Properties tab.

8. Select one of your new property definitions, such as TutorialTitle. In the textbox, assign a name for this property in the current ContentObject Type. The name you enter in the textbox need not match the property definition name, but for the purposes of this tutorial, use the same name in the textbox, TutorialTitle.

9. Click Add.

When you associate properties with a ContentObject Type, you are creating areas where Business Users can enter text into an instance of that type — for example, to the title, teaser, or body text.

Page 93: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 6: Developing a Web Application with Allaire Spectra 81

10. In the New Type Property Definition page for the TutorialTitle property, check the Required, Searchable, and Indexed check boxes.

11. Click OK.

12. Repeat steps 7 through 11 with the other three properties you created, TutorialTeaser, TutorialURL, and TutorialBody.

A list of properties you’ve associated with the tutorial news item appear in the properties section of the news item’s Type Settings page.

Next, you use Allaire Spectra’s default handlers as methods to work with the new TutorialNewsItem ContentObject Type.

Page 94: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

82 Getting Started with Allaire Spectra

Using Allaire Spectra’s Default MethodsInteractive developers add methods to a ContentObject Type, and this adds ways for business users who create and edit the site to work with the ContentObject Type — for example, to create or edit news items. For each method, the interactive developer codes an associated handler file that performs the actual processing.

In addition to supporting explicitly-specified methods and handlers, Allaire Spectra also supports default methods, including display, edit, and delete. The default methods provide a basic interface and make it easy to enter test data into your system.

Developers typically override the default method by using a method of the same name or by creating and invoking an explicit method of another name.

This tutorial illustrates both styles, using Allaire Spectra’s default handlers, and in the i-Build.com site, application-specific handlers.

To use Allaire Spectra’s default methods:

1. In the System Design section of the Webtop, open the Object Finder by expanding the Site Object Designer item and clicking Object Finder.

2. In the Type dropdown menu, select the TutorialNewsItem ContentObject Type.

3. Click Create.

Allaire Spectra creates an empty content item and uses its default edit handler to allow you to create properties for this instance of TutorialNewsItem. It uses the properties you’ve associated with the TutorialNewsItem ContentObject Type.

Page 95: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 6: Developing a Web Application with Allaire Spectra 83

4. Enter some basic sample content for a TutorialNewsItem, as well as a Label, which identifies the content item in the Object Finder.

5. Click OK.

The page redisplays showing your content. The ObjectID identifies the current object, which is a content item that can be published to an Allaire Spectra Web page. The TypeID identifies the ContentObject Type as a whole — in this case, TutorialNewsItem.

6. Close the Object Viewer window.

7. Click Refresh.

In the following sections, you review custom handlers created for the i-Build.com example application.

Inspecting the handler files for i-Build.com

The i-Build.com application’s iBuildContent ContentObject Type includes dedicated handler files for the edit, full (display), and teaser methods. Review the i-Build.com sample application to see how methods, handlers, and ContentObject Types relate to one another.

Use ColdFusion Studio or some other HTML editor to view i-Build.com handler files. These files are located in your Allaire Spectra installation directory at spectrainstallroot/handlers/i-build/content and spectrainstallroot/handlers/i-build/navigation.

Next step

After the interactive developer builds ContentObject Types, the site designer steps in to create the site’s information hierarchy and build the site’s pages. The pages and containers they build allow business users to create, display, update, and publish content.

Page 96: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

84 Getting Started with Allaire Spectra

Page 97: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 7

Chapter 7 Designing Sites with Allaire Spectra

This chapter describes the basic tasks that site designers perform to create and manage a content publishing system with Allaire Spectra.

Contents

• Creating a Site in Allaire Spectra ..................................................................... 86

• The Site Layout Model ..................................................................................... 87

• Displaying Content .......................................................................................... 88

Page 98: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

86 Getting Started with Allaire Spectra

Creating a Site in Allaire SpectraAllaire Spectra sites are composed of the following design elements:

• Sites

• Sections

• Pages

• Containers

In addition to designing a site’s look and feel, site designers create the site’s information hierarchy. This structure consists of the site itself, as well as its sections and pages, and the content containers that allow business users to create, edit, display, and publish content in Allaire Spectra applications.

Your workspace

You’ll use the Site Design section of the Allaire Spectra Webtop to visualize existing sites’ structure, and also to create new sites, sections, pages, and containers.

It contains these features:

• Site Layout Manager — Where you set up the site’s sections, pages, and elements. You also manage page templates here.

• Media Assets — Where you define files, graphics, templates, and multimedia clips.

• Site Categories — Where you apply keywords to content and sections of the site.

• Browser Manager — Where you can classify browsers into clusters, making it easier to target your site to specific browsers and versions.

For coding display handlers, templates, and Web pages, you’ll work in Allaire HomeSite or ColdFusion Studio.

Note When you open the Allaire Spectra Webtop, you need to provide a user name and password. Use either the user name and password you created

Page 99: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 7: Designing Sites with Allaire Spectra 87

during the installation of Allaire Spectra or a user name and password assigned by the system administrator.

The Site Layout ModelSite designers are responsible for creating the Site Layout Model. This structural model of your site can be represented graphically — as in the Webtop’s Site Layout Model section, which shows the site’s sections, pages, and containers.

The Site Layout Model represents the navigation design of your site. You use it in concert with Allaire Spectra features such as caching, metadata, and security, to connect Allaire Spectra services with your application based on your site’s layout.

The following illustration shows the site layout model for Allaire Spectra’s sample site, i-Build.com, which is stored in the cfaobjects data source. At the top level is the site named iBuild. Inside the site is a section called iBuild Home, which contains pages such as the iBuild About Page and the iBuild Home Page. Inside the iBuild Home Page are content containers, such as BannerAd, Left Column, Right Column, and Promotion.

Containers represent areas of the page to which content items can be published and scheduled. They allow you to separate the structural and navigational layout of a page from the organization and display or content items. Containers allow the site designer to enforce layout and display guidelines while allowing the business manager and business user to control content selection through rules and schedules. For more on

Page 100: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

88 Getting Started with Allaire Spectra

rules, schedules, and publishing in Allaire Spectra, see “Publishing Web Content” on page 98.

Although you can create the Site Layout Model using the Webtop user interface, you typically create the Site Layout Model by coding pages that implement the cfa_page and cfa_container tags. Allaire Spectra automatically adds these pages to the Site Layout Model the first time they are displayed.

For more information on creating a site’s structure, see Designing Sites with Allaire Spectra.

Displaying ContentThe following procedures present some of the steps project members take to create new pages that display content objects.

• First, you’ll create a custom tag that calls the TutorialNewsItem and its associated create method. This tag calls the cfa_container tag to create a content container for your display page. You base your code on an existing custom tag used for Allaire Spectra’s sample site, i-Build.com. (On most Allaire Spectra teams, the interactive developer handles this task.)

• Then you use the cfa_page tag to create a simple display page that calls the custom tag. Business users and business managers would use this page to create and publish content items.

Creating a custom tag

In this procedure, you create a custom tag that calls the ContentObject Type called TutorialNewsItem, which was created in the previous chapter, Developing a Web Application with Allaire Spectra. Note that the interactive developer typically codes these custom tags.

To write a custom tag to create and publish content items:

1. Using HomeSite or ColdFusion Studio open the custom tag file for the i-Build.com site, located at spectrainstallroot/customtags/i-build/ibuildcontent.cfm.

2. Save it as tutorialcontent.cfm in the same directory.

3. In the Allaire Spectra Webtop, open the System Design area and select the Site Object Designer > Type Designer link.

4. Find TutorialNewsItem in the list and copy the type ID.

This type ID identifies the ContentObject type as TutorialNewsItem.

5. In the tutorialcontent.cfm file, paste your type ID into the file, as shown in bold below. (Note that your type ID will differ from the one used this example.)

...<!---

This is a custom tag abstraction for iBuild content

Page 101: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 7: Designing Sites with Allaire Spectra 89

These abstractions are useful for protecting site designersfrom knowing about cfa_container, and giving them logical building blocks to construct pages.

--->

<cfparam name="attributes.name">

<cftry><cfif request.cfa.ibuild.mode is "design">

<cfoutput><A href="/i-build/invoke.cfm?typeID=FEFC7E19-7CB7-11D3-

910E00104B8731B3&method=create"><img src="/i-build/images/create.gif" border=0 alt="Create New Content"></a>

<p></cfoutput>

</cfif>

<cfa_containerdataSource="#request.cfa.objectstore.dsn#"name="#attributes.name#"bRethrowException="TRUE"

><!--- Catch any security errors here. ---><cfcatch type="cfa">

<cfa_throw errorCode = "#cfCatch.errorCode#" bAbort = "NO" objectID = "Container">

</cfcatch></cftry>

6. Save this file.

Creating the Tutorial home page

In this procedure, you use the cfa_page tag to place content items in a Web page. When you display a page using cfa_page, Allaire Spectra automatically registers the resulting page in the Site Layout Model, in the section and/or site named in the cfa_page tag’s attributes.

To create the Tutorial content page:

1. In your text editor, open the file /<webroot>/i-build/index.cfm.

2. Save it as tutorial.cfm in the same directory.

3. In the cfa_page tag, change the page name to "Tutorial HomePage."

This identifies your new page as a unique page in the Site Layout Model of i-Build.com.

4. In the cf_ibuildformatting tag, turn off the banner ad by setting ShowBanner to false.

Page 102: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

90 Getting Started with Allaire Spectra

5. Edit the file as noted in bold below to call the custom tag you created above, cf_tutorialcontent, instead of cf_ibuildcontent.

6. In the code that calls the cf_tutorialcontent tag, change the name attribute of cf_tutorialcontent to “Tutorial Page Left Column.”

7. Comment out the code for the i-Build Search, Navigation, and Promotion tags, as shown below.

<cfa_pagesiteName="i-Build"pageName="Tutorial HomePage"sectionName="iBuild Home"dataSource="#request.iBuild.datasource#">

<!--- include the generic i-Build header and formatting ---><cf_iBuildformatting showBanner="false">

<!--- Use a table to layout columnsof information on the page --->

<table border="0" cellpadding="0" cellspacing="0"><tr>

<td width=15>&nbsp;</td>

<!--- Main news column ---><td valign="top"> <!--- Display Tutorial Content Items. ---><cf_tutorialcontent

name="Tutorial Page Left Column"></td>

<td width=15>&nbsp;</td><!--- Comment out the following code for now ---><!--- <td valign="top">

<cf_i-BuildSearchBox><br><cf_i-BuildTopicBox><br><cf_i-BuildNavigation

name="Right Column"><br><table width="135" border="1"

cellspacing="0" cellpadding="2" bgcolor="ddddff" bordercolor="navy">

<tr><td><cf_i-Buildcontentname="Promotion"></td></tr>

</table></td> --->

Page 103: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 7: Designing Sites with Allaire Spectra 91

<td width=15>&nbsp;</td></tr>

</table>

</cf_ibuildformatting></cfa_page>

Note that the cfa_page tag wraps the entire page content. The cf_iBuildformatting custom tag includes generic formatting code. You can edit its tag lines and title bar to suit your new pages as needed.

8. Save the tutorial.cfm file in the /<webroot>/i-build directory, and display the file in design mode in your Web browser: <webroot>/i-build/tutorial.cfm?designmode=true. Note that you may need to log in first.

Now this page is ready for business managers and business users to add content to the new container. Continue with the next section to see how business managers and business users create, edit, and publish content in the pages created by a site designer.

Note Site designers can also implement dynamic page creation functionality through Allaire Spectra page templates. This capability allows business managers and site members to create pages dynamically. For more information, see Designing Sites with Allaire Spectra.

Page 104: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

92 Getting Started with Allaire Spectra

Page 105: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

C H A P T E R 8

Chapter 8 Creating and Publishing Content

This chapter offers a set of tutorials that show the basic tasks for business users and business managers who create and manage content in an Allaire Spectra application.

Contents

• Creating and Publishing Content in Allaire Spectra...................................... 94

• Adding Content to the System ........................................................................ 94

• Publishing Web Content .................................................................................. 98

• Editing Content Items.................................................................................... 104

Page 106: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

94 Getting Started with Allaire Spectra

Creating and Publishing Content in Allaire SpectraThis tutorial includes the following tasks for business users of an Allaire Spectra application:

• Create new content.

• Interact with workflows to complete tasks.

• Publish content for deployment.

Business users create and edit content in their Web browser, using Design Mode, which displays the existing content in a page with special controls for manipulating the page’s contents.

For more information on design mode, see Programming with Allaire Spectra.

In the Allaire Spectra Webtop, business users work in the Content area to get their task lists and use the Content Finder to locate content to publish.

This tutorial uses Allaire Spectra’s i-Build.com example site to illustrate how business users interact with content in Allaire Spectra.

Adding Content to the SystemIn this section, you create content using the i-Build.com example application’s workflow tools. Then you publish the content to the page.

Note You can also create i-Build.com content by displaying the site in design mode and clicking on the create icon, displayed just above each container.

Using a Workflow to create and approve content

Allaire Spectra’s Workflow service provides a way to define and control the process of creating, editing, and approving content before publishing it. The i-Build.com sample site includes a PLP and workflow to govern content creation.

Assume that the interactive developer for the i-Build.com sample site worked with the projects’ business managers to map out a workflow that governs the process of creating content, adding an image, and getting the content approved for publication.

In the first procedure, you function as a business manager, opening the workflow and assigning tasks and deadlines to people on the content team. In the second procedure, you function as a business user, using the workflow tasks to create a new content item.

This example works best if you’ve defined e-mail addresses in the user profiles of the assigned users. For the purposes of this tutorial, you can use the Preferences page to establish an e-mail address for yourself.

Page 107: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 8: Creating and Publishing Content 95

To define preferences:

1. Display the preferences page, either by clicking Preferences on the Webtop home page or by clicking your user ID in the title bar.

2. Type your e-mail address.

3. Click OK.

This defines an e-mail address in your user profile.

To follow a workflow to create content items:

1. Open the Business Center section of the Allaire Spectra Webtop and expand the Process Manager link.

2. Click Start Workflow.

Allaire Spectra displays a list of workflow templates.

3. Select iBuild Content Creation and click Next.

The Assign Workflow Details form displays.

Page 108: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

96 Getting Started with Allaire Spectra

4. Assign users to each task by using the Owner dropdown list box (for the purposes of this tutorial, it’s best to specify the username you used to login to Allaire Spectra)

5. Assign task deadlines. When you are through, click Next.

Allaire Spectra starts the workflow, displays a status window, and (if e-mail addresses have been specified with the user profile definition) sends e-mail to users whose tasks can be started.

6. To display workflow information, click Manage this Workflow. You can also access this information via the Workflow Manager.

Page 109: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 8: Creating and Publishing Content 97

To use the worklist to create content:

1. Open the Content area of the Allaire Spectra Webtop and click the My Tasks link.

The Task List window displays with a list of the tasks that can be started, along with their status and due dates.

2. Click the icon next to one of your tasks.

The Task Detail window displays.

3. Click Start.

Allaire Spectra invokes the method associated with the task (Add Content in this example). If the task is not associated with a ContentObject Type method, Allaire Spectra redisplays the task list.

4. When you finish content definition, return to the Task List.

5. Click the icon next to the task you just performed.

The Task Detail window displays.

6. Click End.

Allaire Spectra marks the step as complete.

For more information on workflows, see Programming with Allaire Spectra.

Page 110: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

98 Getting Started with Allaire Spectra

Publishing Web Content

Basic Publishing

Business managers and business users are typically responsible for publishing the content to the page.

To publish Web content in Allaire Spectra:

1. Choose Go to HomePage in the dropdown menu at the top of the i-Build.com site.

This command loads the i-Build.com site in design mode.

2. Click the publishing icon next to the title Left Column. When running in design mode, Allaire Spectra displays a publishing icon just above every container on the page.

The Container Editor displays, showing a preview of currently selected content.

3. Click the Edit tab.

The Container Editor displays the content items currently published to this part of the page — the Left Column container.

Page 111: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 8: Creating and Publishing Content 99

4. Click the Add button in the Items section.

The Select Objects window appears. You use this window to choose additional content items to publish.

5. In the Type dropdown listbox, choose iBuildContent.

6. Choose "Bevel Miter Saw" by clicking its check box in the left-hand column.

(Other articles may have already been published to this container, so you don’t need to re-select them.)

7. At the bottom of the Select Objects window, choose the method Teaser from the dropdown menu and click Add.

The Container Editor now includes the items you selected.

8. Select the Bevel Miter Saw article and click the up button to move it to the first spot in the list.

9. Click either OK (which closes the Container Editor) or Apply.

Page 112: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

100 Getting Started with Allaire Spectra

The i-Build.com home page reappears in your browser with Bevel Miter Saw appearing at the top.

Additional Publishing Features

In addition to explicitly choosing content to publish using the Schedule Content rule, you can use these additional advanced publishing features:

• Groups and schedules

• Customized publishing rules

Using Groups and Schedules

The Allaire Spectra Container Editor allows you to group content items that will be published together, using Groups and Schedules.

• Groups — Control the order in which content displays in a container. Allaire Spectra displays all content in the first group before displaying content in the second group.

• Schedules — Control display by time or day. You can either specify a daily schedule (for example, your site offers a separate set of content during evening hours) or a fixed schedule (for example, your site displays a new set of content each month).

This makes it easier to schedule blocks of content items, or content groups, to be published on your site. For example, you might associate a set of content items together, some in Group 1 and some in Group 2. Then, you can schedule Group 1 to appear on your site this week, and Group 2 next week.

To create content groups:

1. Display the Container Editor.

2. Click the Edit tab.

3. Specify a label for Group 1.

4. Click the Group dropdown listbox and select Add Group.

A blank label displays along with an empty set of selected items.

5. Specify a label, or name, for the group.

6. Click the Add button in the Items section to select content items to display in the group.

7. Click either OK or Apply.

Now you can schedule content using this newly created group.

To create schedules for publishing content:

1. Use the Group dropdown listbox to select the group for which the schedule applies.

Page 113: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 8: Creating and Publishing Content 101

2. Click the Add button below the Schedule listbox.

The Edit Schedule form displays.

3. Specify Fixed or Daily.

• Fixed interval — Specify start date, start time, end date, and end time.

• Daily interval — Specify start time each day, end time each day, start date, and end date.

4. Click OK.

Page 114: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

102 Getting Started with Allaire Spectra

Using Other Rules

The Container Editor also offers an advanced interface. This interface allows you to implement additional, site-specific publishing rules. If your site has implemented customized publishing rules, you use the advanced interface to display content via these rules.

To use the advanced Container Editor interface:

1. Display the Container Editor.

2. Select Advanced from the Edit Mode dropdown listbox.

The advanced interface displays.

3. Select a rule from the Add dropdown listbox and click Add.

The publishing rule displays a rule-specific form that allows you to either select content or specify selection criteria, such as search strings or keywords. This example shows the Search Properties rule, which provides simple search capabilities.

Page 115: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 8: Creating and Publishing Content 103

4. Click the Back button.

5. When you are finished, click either OK or Apply.

Note By default, the Container Editor implements content selection through the Schedule Content rule. For complete information on publishing rules, see Programming with Allaire Spectra.

Page 116: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

104 Getting Started with Allaire Spectra

Editing Content ItemsIn design mode, you can edit content items on a published page by clicking the grapple control for individual content items. In this procedure, you edit one of the content items you published to the page in a previous exercise.

To edit an existing content item:

1. Open the i-Build.com sample site in design mode.

2. Click one of the grapple controls that surround the article titled "Repairing Drywall Holes."

The Object Viewer window appears, showing the a preview of the content item.

Page 117: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Chapter 8: Creating and Publishing Content 105

3. Click the Edit tab.

The Object Viewer invokes the content item’s edit method.

4. Use the editing tools to make a few changes, or add some text to the end of the paragraph.

5. Click Continue to reach the edit screen for the full text of the article. Click Continue again.

6. Close the Object Viewer.

The i-Build.com home page redisplays with the updated content item.

Page 118: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

106 Getting Started with Allaire Spectra

Page 119: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

Index

AAdvanced Security 19, 42

testing 28Allaire xii

contacting xiiheadquarters xiisales xiitechnical support xii

Anywhere Authoring 10Application development 34Application.cfm file 76Application-level settings 76

BBest practices 31Business goals 34Business intelligence service 11Business manager

development phases 32responsibilities 7starting a workflow 95

Business useraccess a work list 97responsibilities 7

Ccfa_handler 58ColdFusion

advanced security 19advanced security

requirement 42developer community viiideveloper resources viiidocumentation, about ixrelationship with Allaire

Spectra 36training resources viiitutorial for ColdFusion

developers 47ColdFusion Studio tools 30Collection creation 25

Concepts 2Configuration wizard 23Container Editor 98

advanced mode 102Containers

Container Editor 98description 88groups 100publishing icon display 98rules 102schedules 100

Content itemscreating 54, 94creating via a workflow 94display 56editing in i-Build.com 104publishing 98

Content management serviceoverview 8

Content Object API (COAPI)overview 3

ContentObject databasecompared with external

database 65overview 9

ContentObject Typescreating 50defining 79method definition 59properties 51system object display 49

Current application, changing 49

Custom tags 37

DData access

ContentObject database 38external database 39

Data sourcesContentObject database 8

internal vs. external 65Default handlers

display 56overview 82

Default methods. See Default handlers

Designing sites 86Development phases 32Display handlers

coding 58external data source 70

Documentationconventions xi

Dump 55

EEdit handler 45, 61, 105E-mail address, defining 95External data source 39

ContentObject Type definition 67

display handler 70displaying content 71overview 65

GGrapples 44Groups 100

HHandlers

display 58edit 61i-Build.com 83

Ii-Build.com

design mode 44handler files 83tour 42

Implementation phase 33

Page 120: Getting Started with Allaire Spectra - Williams Sonoma · 2001-10-01 · The PITA Developer Guide is available in HTML and PDF format only. Printing Allaire Spectra Documentation

108 Getting Started with Allaire Spectra

Information design phase 32Installation

Client tools 30ColdFusion Advanced Security

settings 26Configuration wizard 23Solaris 21System requirements, NT 16System requirements, Solaris 19verification 23Windows NT 18

Interactive developerresponsibilities 6

Internal data source 38, 65

LLDAP, user directory configuration 25

MMethods

defining 59invocation via Object Viewer 105See also Handlers

OObject Type. See ContentObject TypesObject Viewer

content item creation 54data dump 55i-Build usage 104i-Build.com 44

Objects. See Content itemsOverview

general 2

PPassword 23, 28Personal home page, enabling 49Personalization service 11Phases 32Planning phase 32Preferences, defining 49, 95Process Logic Path (PLP) 35Properties

associating with ContentObject Type 51

Property definitiondefining 77external ID 67

Publishing 98Publishing rules 102

QQuick-start tutorial 41

RRoles. See Spectrum of participantsRoles-based security service 11, 35Rules 102

SSchedule Content rule 103Schedules 100Scope, through cfa_handler 58Search Properties rule 102Security 35Security caching 26Services

overview 8Site affiliate

responsibilities 7Site Design section 86Site designer

responsibilities 7site design elements 86

Site Layout Modelgraphical display 87overview 4

Site memberresponsibilities 7

Site model 34Site Object Model

overview 3Site structure 36Solaris

Advanced Security required 21installation 21system requirements 19Web server verification 20

Spectrum of participants 6

Syndication service 12System administrator

responsibilities 6System object display 49System requirements

Solaris 19Windows NT 16

TTechnical support, contacting xiiTroubleshooting

Advanced Security 19

UUninstall

Windows NT 17User account creation 28

User name 23, 28User profile

preferences tab 49storing information via

preferences 94

VVerity, collection creation 25

WWeb server verification

Solaris 20Web site

Allaire viiiWebtop

changing application 49help, enabling 49overview 5Site Design section 86

Windows NTAdvanced Security required 17, 19configuration 16installation 18system requirements 16uninstall 17

Work list 97Workflow

content creation 94starting 95work list 97

Workflow and process automation service 10