Oracle WebCenter Sites is a high-performance, large-scale content management and delivery system. You and your development team use Oracle WebCenter Sites to create and manage large and complex websites, sites that run businesses, and other types of sites, all of which are generically referred to as "online sites" or "websites."
The following sections provide an overview of WebCenter Sites:
The following features are deprecated in WebCenter Sites 11g Release 1 (220.127.116.11.0): Sites Desktop, Sites DocLink, Static publishing.
As a WebCenter Sites developer, your job is to create the content entry forms which contributors will then use to create the content for your website. In addition, you will also develop the JSPs that render content entry forms in Web Mode as well as render published content on the website. When content is ready for public delivery, it can be published to the website using either dynamic or static publishing.
WebCenter Sites supports both static and dynamic pages. Dynamic page generation is its main function, and is the subject of this section of the guide.
A dynamic WebCenter Sites page differs from a typical HTML page, as shown in the following table:
|Static Page (HTML Page)||Dynamic Page (WebCenter Sites Page)|
Single disk file, served via a web server.
Composed and created upon request.
One-to-one association between the HTML page and the page the visitor sees in the web browser.
The web page that the visitor sees can be composed of multiple components called pagelets, created from within WebCenter Sites.
No separation of presentation and content. As a result, it is difficult to modify presentation and content independently of each other.
Separation of presentation and content.As a result, presentation and content can be modified and maintained independently of each other.
As a developer, you use the data models provided by WebCenter Sites to create the content entry forms (shown in Figure 1-1) that contributors will use to create content for the website. Each field in a content entry form maps to a corresponding column in a database table (or multiple tables).
WebCenter Sites supports the following data models:
WebCenter Sites basic asset model, supports a flat data structure, which means that basic assets cannot inherit each other's properties (called attributes in this guide). Content is entered by WebCenter Sites users and is stored as objects called assets in the WebCenter Sites database. Each type of asset is contained in one primary storage table in the database, such that basic assets of one type can be associated with basic assets of another type.
WebCenter Sites flex asset model, is a comprehensive data model in which each asset type uses several storage tables such that hierarchical data structures can be created, and child assets inherit attribute values from their parent assets. The flex asset model also supports flat data structures, within its own framework. (Note that the flex asset model functions independently of the basic asset model; tables created within the two models do not intersect.)
Whether you choose the flex asset model or the basic asset model depends on the complexity of the data you plan to serve to your visitors. The flex asset model has historically been used for creating large online catalogs of products. However, it can be used in less complex situations, and is especially desirable when the intent is to eventually convert flat data structures to hierarchical structures. The conversion process does not require you to re-create the data.
As a developer you use APIs and JSP tags to code templates and elements which will be used to render content on the website. This section provides an overview of the programming components you will use in the process of coding.
This section contains the following topics:
In very simplistic terms, the main function of WebCenter Sites is to separate format from content. By separating the two, WebCenter Sites enables you to reuse the same bits of formatting code for many pieces of content. For example, if you want to change the format of articles, you rewrite the code in one place, rather than having to rewrite code for every article in your system.
Your formatting code is stored in files called elements. The code extracts the content from the database and formats the content. Because content is formatted only when a page is requested, you have the opportunity to design pages that will be constructed on-the-fly, according to the identity of the visitor requesting them.
Element files are stored in the
ElementCatalog table in the WebCenter Sites database. The names of your pages are stored in the
SiteCatalog table. That is, the
SiteCatalog table stores the entries for all the legal page names for your website.
Each row in the
SiteCatalog table is a page entry. Each page entry points to an element in the
ElementCatalog table. The element being pointed to by a page entry is called the root element of the page entry.
WebCenter Sites renders your content into an online page by executing
SiteCatalog page entries. Here is how it works:
A visitor enters a URL to your website in a browser.
The web server that processes the HTTP request maps that URL to a WebCenter Sites URL. For example, this is a WebCenter Sites URL:
The text at the end of a WebCenter Sites URL is called the pagename. In this example, the pagename is
WebCenter Sites looks up the page name in the
SiteCatalog table, determines its root element, locates that element in the
ElementCatalog table, and then invokes that element.
The element is executed. If there are calls to other elements from within the root element, those elements are executed in turn.
The results (images, articles, and so on, including any HTML tags) are rendered into HTML code and returned to the visitor's browser.
The result is a page that is dynamically rendered on demand.
WebCenter Sites includes several tag families that you use to code your elements. The tag families enable you to identify, extract, and then display assets on your website. WebCenter Sites also provides Java methods and utilities that you can use for designing your website, for developing your own content management applications, and for customizing the WebCenter Sites modules/products.
For information about coding pages that display assets that use the basic data model, see Chapter 28, "Coding Elements for Templates and CSElements." For information about all of the custom tags, see the Oracle Fusion Middleware WebCenter Sites Tag Reference.
The WebCenter Sites operating system consists of several servlets that run on top of an application server. Each servlet is invoked when necessary to perform a discrete set of tasks. Each servlet has a corresponding Java API with Java methods and JSP tags that you use to invoke the functions that you need to use. The main WebCenter Sites servlets are shown in the following figure:
The main WebCenter Sites servlets are as follows:
ContentServer: Generates and serves pages dynamically. This servlet provides disk caching, session management, event management, searching, and personalization services.
CatalogManager: Provides most of the database management for the WebCenter Sites database, including revision tracking, security, resultset caching, and publishing services.
TreeManager: Manages the tree tables, which store hierarchical information about other tables in the WebCenter Sites database.
BlobServer: Locates and serves binary large objects (blobs). Blobs are not processed in any way. They are served as is, as they are stored.
DebugServer: Provides tools that help you debug your XML code.
CookieServer: Serves cookies for WebCenter Sites pages, whether those pages are delivered by the ContentServer servlet or by the Satellite Server application.
HelloCS: Displays version information about the WebCenter Sites software installed on your system.
In general, you do not need to know which servlet performs which service or task. You simply invoke the appropriate Java method or XML or JSP tag and let the WebCenter Sites core application determine which servlet to call. The exception to this rule is when you write code that references a servlet URL; that is, when you include a link to a blob or to another page on a WebCenter Sites page. Because the ContentServer servlet and the BlobServer servlet reside at different URLs, you must include the URL of the appropriate servlet in your
<A HREF> tags.
For information about the coding links to blobs and pages, see Chapter 4, "Programming with Oracle WebCenter Sites" and Chapter 28, "Coding Elements for Templates and CSElements."
WebCenter Sites automatically creates a session for a visitor when he or she visits your website for the first time. You can store information about that visitor in session variables by using the tags and methods in the WebCenter Sites core. Subsequent elements can then access those variables and respond conditionally to them.
Session variables, however, are volatile. They last only as long as the session lasts, that is, until one of the following events occurs:
The visitor closes his or her browser.
The session times out after a period of inactivity. You control session timeouts through the
cs.timeout property in the
The application server is restarted (except in a cluster).
The session is disabled in some other way.
For more information about sessions and cookies, see Chapter 9, "Sessions and Cookies."
WebCenter Sites provides utilities, which are the developer's tools for managing the WebCenter Sites database and various code. The utilities are GUI-based and must be manually installed (unless otherwise noted). They are:
Developer Tools, which integrates WebCenter Sites with the Eclipse Integrated Development Environment (IDE). The Developer Tools kit enables WebCenter Sites developers to work in a distributed environment using tools such as Eclipse and version control system (VCS) integration.
Sites Explorer, for viewing and editing tables in the WebCenter Sites database.
CatalogMover, for exporting and importing database tables.
XMLPost, for incrementally importing data into the WebCenter Sites database.
BulkLoader, for quickly importing large amounts of data into the WebCenter Sites database.
Property Editor, for viewing and organizing property files (system configuration files).
The website navigation for the content management site you are currently logged in to is represented by the Site Plan tab in the WebCenter Sites Admin interface.
For information about content management sites and the Site Plan tab, see Chapter 2, "About Content Management Sites." For additional information, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.
When you are working with WebCenter Sites for your content management needs, you and the others on your team work with up to four different systems:
Development system, where developers and designers plan and create the website.
All of the WebCenter Sites products that you have purchased are installed on this system.
Management system, where content providers such as writers, editors, graphic artists, and marketers are assigned to content management sites to develop the content that is delivered to visitors of the website. Revision tracking and workflow features track changes to assets (content), monitoring them until they are approved to be published to the delivery system.
Content management sites represent the real website. For example, you could create separate content management sites for separate sections of your website because the teams who provide content for each section work completely separately from each other and only members of that team should have access to that section (content management site). Or, you could create a content management site that represents an entire website, as does the avisports sample site. For more information about content management sites, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.
Delivery system, where the content you are making available or the products that you are selling are served to your visitors or customers.
If you are delivering your content dynamically, all of the WebCenter Sites products that you purchased are installed on this system. If you are delivering your content statically. That is, if you are serving static HTML pages, your delivery system is a web server only, and you do not need to install any of the WebCenter Sites products on that system.
Testing system, where you or your QA engineers test the performance of both the management system and the delivery system. If a dedicated testing system is not available, testing can be done on the development system.
As a developer, you spend the majority of your time working on the development system. When the asset types that you develop and the site that you have designed are ready, you migrate (publish) your work from the development system to the management system. As assets are created, modified, and approved by the content providers on the management system, they are published from the management system to the delivery system.
As mentioned in the previous section, when you finish developing the website, you publish your work (templates, elements, asset types, the site plan, and so on) from the development system to the management system. Publishing your work makes it available on the management system. Contributors can then use the asset types and your site design to create content for the website. When contributors are finished creating the site content, that content (along with the supporting asset types, templates, elements, site plan, and so on) can be approved and published to the website.
When assets are ready to be published, someone first marks them as approved. Then, when the publishing process is ready to start, it invokes the approval system which compiles a list of all the approved assets and examines all the dependencies for those assets. If an asset is approved but an asset that it is linked to is not approved, the approved asset is not published until the linked asset is also approved.
The WebCenter Sites publishing and approval systems track and verify all the asset dependencies in order to maintain the integrity of the content on your delivery system. The publishing and approval systems ensure that the assets which you have determined to be ready for publishing are the only assets that get published.
When you publish content and elements, WebCenter Sites copies the content and elements from one system (for example, your management system) to another system (for example, the delivery system). WebCenter Sites delivers two publishing methods that are built from the WebCenter Sites publishing APIs. These publishing methods interact with the WebCenter Sites approval system, an underlying system that determines which assets have been approved.
The WebCenter Sites publishing methods are:
RealTime is the dynamic publishing method. It is built with the WebCenter Sites RealTime API to copy approved assets from the WebCenter Sites database on one system to the WebCenter Sites database on another system.
Export to Disk is the static publishing method. It renders your approved assets into static HTML files, using the template elements assigned to them to format them. An administrator or automated process then copies those files to your delivery system using FTP or another file transfer method.
For more information about configuring publishing, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.
For information about coding elements so that they log dependencies appropriately and how WebCenter Sites calculates approval dependencies, see Chapter 28, "Coding Elements for Templates and CSElements."
For information about how you approve assets, see the Oracle Fusion Middleware WebCenter Sites User's Guide and the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.
As a developer, you implement various caching frameworks that are supported by WebCenter Sites to optimize the performance of your company's website. WebCenter Sites also supports the use of Satellite Server caching, which provides a second level of caching for your WebCenter Sites system and can also be used as a remote cache for your web pages. By default, WebCenter Sites and Satellite Server use inCache as their page caching framework.
This section contains the following topics:
Page caching is implemented at the template level and is used to cache pages on the WebCenter Sites system. Page caching plays a significant role in system performance. If an element is not changed and it will generate the same page each time it is invoked, why make WebCenter Sites process the element each time it is called? If the generated page is cached, it can be served much faster than it can if it must first be generated.
WebCenter Sites alone (independently of Satellite Server) can separately cache each page or pagelet that is identified by a page entry in the
SiteCatalog table. You can mark the expiration date of any pagelet in the cache by specifying a value for that page entry in that table.
Page caching is made especially effective by the addition of Satellite Server. Installing a Satellite Server application amounts to installing page caches on the servers that host Satellite Server, thereby extending the WebCenter Sites page cache.
For information about page caching, see Chapter 5, "Page Design and Caching."
For information about inCache page caching, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.
For information about Satellite Server, see Section 1.7.4, "Satellite Server."
Resultset caching is another feature that can greatly enhance system performance. When the WebCenter Sites database is queried by any mechanism, the WebCenter Sites application can cache the resultset that it returns. The WebCenter Sites application keeps track of every table in the database; whenever a table is modified, it flushes all the resultsets that were cached for that table.
For more information about resultset caching, see Chapter 14, "Resultset Caching and Queries."
Asset caching is a memory-based system that is built on the inCache framework to optimize the performance of WebCenter Sites by taking up load that would otherwise affect the database. In WebCenter Sites, programmatic usage of assets consists of loading and rendering their attributes. Given that assets are loaded by templates, which are stored in the WebCenter Sites database,
AssetCache is used only on WebCenter Sites nodes. Asset caching includes the
AssetCache container component which functions by caching assets and interacting with existing inCache components.
For more information about the inCache framework and asset caching, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.
Satellite Server is a caching application. It supplements WebCenter Sites caching functionality by providing additional page caches. The tandem use of the WebCenter Sites and Satellite Server caches results in automatic double-buffered caching.
By default, co-resident Satellite Server is installed on the same computer where WebCenter Sites is installed. You can further improve your system's performance by installing Satellite Server remotely so it can cache pages and pagelets closer to their intended audience. Remote Satellite Server hosts are fast, inexpensive caches of WebCenter Sites pages. They reduce the load on the WebCenter Sites host, dramatically increase the speed of page delivery to your site visitors, and provide a simple and inexpensive way to scale your WebCenter Sites system.
When the load balancer routes an HTTP request for a page to Satellite Server, Satellite Server either serves the page if the page is in its cache, or if the page is not cached, it forwards the HTTP request to WebCenter Sites. The basic chain of events is the following:
Satellite Server checks its cache.
What happens next depends on whether the page is in the Satellite Server cache:
|Page is in Satellite Server Cache||Page is Not in Satellite Server Cache|
Satellite Server serves the page to the visitor's browser.
In this case, Satellite Server does not have to forward the request to the WebCenter Sites database, thus reducing the load on the WebCenter Sites database.
Each Satellite Server application is independent of every other Satellite Server application. An individual Satellite Server application has the following characteristics:
It maintains its own cache.
It cannot request pages or pagelets from another Satellite Server application. It can request pages or pagelets from only the WebCenter Sites core.
Satellite Server is made up of several servlets: one that caches and serves pages, and two that manage the cache:
Satellite: Caches pages at the pagelet level. The Satellite XML or JSP tags in your elements indicate which pagelets should be cached, and they control various Satellite Server settings.
Inventory: Enables you to examine the Satellite Server cache so you can obtain the information you need to manually flush individual pages or pagelets from the cache when necessary.
FlushServer: Handles all types of cache-flushing. FlushServer can either flush the entire cache, or can flush individual items from the cache.
For information about coding pages with the Satellite Server tags and page caching in general, see Chapter 5, "Page Design and Caching."
This section provides an overview of the WebCenter Sites interfaces. As a developer, you will work mainly with the WebCenter Sites Admin interface.
Admin Interface is designed for developers and administrators. This interface allows administrators to manage and configure WebCenter Sites.
The tree panel on the left contains all the content management elements that developers and administrators need to work with. The workspace area on the right is where all the tasks and operations are performed.
The Admin interface supports code-based operations, and enables you to graphically complete the creation of basic asset types. For example, to create a basic asset type, you would:
Write an XML file (called asset descriptor files) to define the basic asset type.
Upload the file to WebCenter Sites.
Use the WebCenter Sites interface to invoke the AssetMaker utility. One of the functions of the interface (AssetMaker) is to read the asset descriptor file and, from it, create a storage table for the asset type. Other functions in the interface allow you to configure the asset type (for example, name its authorized users).
The same interface is used by administrators to create content management sites, manage system users, control their permissions to content, establish workflow processes, and configure WebCenter Sites features (such as Sites Desktop).
Contributor Interface is designed specifically for content providers and business users. The Contributor interface provides ease of use and quick access to most WebCenter Sites content management functions, such as previewing, creating, editing, deleting, and approving assets.
When you work with assets in the Contributor interface, you may see fields enabled with the following WYSIWYG editors:
CKEditor is an open source WYSIWYG text editor from CKSource which requires no client-side installation. Developers can use CKEditor to create basic assets whose text-entry fields use CKEditor as the input mechanism for the field. Developers can also create attribute editors for flex attributes that use CKEditor as the input medium.
Clarkii Online Image Editor (Clarkii OIE) is a popular third-party image editor from InDis Baltic. Developers can enable Clarkii OIE to allow users to edit images directly in the Form Mode of the WebCenter Sites Contributor interface eliminating the need for an external image editor.
WEM Admin Interface is designed specifically for administrators to manage the assignment of applications and users to sites via roles.
For more information about the WEM Admin interface, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide and Part V, "Developing Applications with the Web Experience Management (WEM) Framework".
WebCenter Sites also supports clients (optional interfaces) such as MS Word and applications that offer functionality similar to Windows Explorer and Windows Desktop. The clients are as follows:
WebCenter Sites Desktop offers content authors the familiar Microsoft Word interface as an alternative to the WebCenter Sites interfaces. Authors create their content directly in Word documents. However, note that Sites Desktop requires the content in Word documents to be structured, because the content will be parsed to database tables.
For example, when using Sites Desktop to author content, the user opens a Word document, enters content, and structures the content by tagging it with the same field names as defined in the equivalent content-entry form that WebCenter Sites provides. The tagging utility is embedded in the Word interface, and the selection of fields is determined by the WebCenter Sites administrator. When the Word document is saved, the content in its fields is parsed to fields in the appropriate database table(s). The Word document remains available for editing.
Sites Desktop must be manually installed on client computers.
Sites DocLink supports unstructured content in the flex asset family.
Sites DocLink provides a drag-and-drop interface for uploading and downloading unstructured types of content (documents, graphics, and other single binary files) that are managed as flex assets. Sites DocLink also presents the hierarchical structure of any flex asset family in the WebCenter Sites database as folders and files in the Windows Explorer application.
Sites DocLink must be manually installed on client computers.
For more information about configuring Sites Desktop and Sites DocLink for specific users, see the Oracle Fusion Middleware WebCenter Sites Administrator's Guide
WebCenter Sites provides the sites described in this section. Avisports and FirstSiteII code can be reused and modified to suit your organization's business needs. This section of the guide uses both of these sample sites to illustrate best coding practices.
This section contains the following topics:
Avisports is a sports-centric sample site containing sports articles illustrated with images. Avisports is used to illustrate features in the WebCenter Sites Contributor interface such as creating and editing assets in Form Mode and Web Mode. In addition, Avisports provides developers with sample templates that are coded to render an asset's Create and/or Edit view in Web Mode.
FirstSiteII is an electronics retail site that includes articles, images, a product catalog with several entries, documents, and sample user accounts. Utilizing our best practices in WebCenter Sites site development, FirstSiteII provides an excellent starting point for developers.
The following sample sites are only available in the WebCenter Sites Demo JSK, which is located on the Oracle Technology Network on the WebCenter Sites download page.
WebCenter Sites provides a fully functional sample site named Burlington Financial. The site is used in this section of the guide as the source of examples that illustrate the basic asset model, WebCenter Sites functionality, and coding practices. You can examine the examples both in this book and online in the context of the actual site.
The Burlington Financial site contains sample asset types, elements,
SiteCatalog entries, a workflow process, and so on. For information about the Burlington Financial sample site, see Chapter 33, "The Burlington Financial Sample Site."
In addition to the Burlington Financial sample site, WebCenter Sites delivers a sample site called HelloAssetWorld. The site provides a simple introduction to creating a WebCenter Sites website.
The templates that compose HelloAssetWorld are described in Chapter 32, "The HelloAssetWorld Sample Site." Further information about the site's configuration and users is available in the Oracle Fusion Middleware WebCenter Sites Administrator's Guide.