A Publishing Style Web CMS [ 12 ] • One temporary workow sandbox per active workow instance per web project: Virtualization and In-context Preview Virtualization and In-context Preview is core to the sandboxing concept. Virtualization means that each user has a complete view of all current, approved, checked in content along with those unique modications made within the context of their sandbox. Alfresco provides a complete virtual view of the website as it would look if all changes in a sandbox were committed to the live site even when previewing any non-modied or modied asset in a sandbox. This is In-context Preview. Each user in the context of their sandbox can do rigorous and thorough quality checks for all changes they are posting to the website. Transparent layers Transparent layers are the means to implement sandboxes in Alfresco. This layer is a central construct in the Advanced Versioning Manager (AVM) repository, very similar to the UnionFS Linux lesystem, and is used to dene "composite" stores that can "read through" content from other stores. It can be dened at the store, directory, or le level. Download from Wow! eBook <www.wowebook.com> Chapter 1 [ 13 ] From Alfresco 3.1 onwards, transparent layers can be congured by a Content Manager in the Staging Sandbox of a web project. This is useful for: • Dening web project templates • Reusing content across multiple web projects • Explicitly segregating different groups of content producers for separate web projects Web forms Web forms are used in Alfresco WCM to capture content from the user, and store as XML. An XML schema needs to be created by form developers for capturing content. It is then rendered automatically as a user-friendly web-based form for content contributors. Alfresco uses the open source project Chiba, an XForms implementation used to transform the XML schema into an internal representation of a form (XForms), and then present UI controls for elements and attributes described in the schema. This helps to render the form entry UI to the end users. Web forms are created and administered in the Web Forms space within the Data Dictionary. As they are located in Alfresco Spaces, they are accessible by the default CIFS, FTP, and WebDav interfaces. They can also be congured with rendering engine templates for generating renditions of the collected content. Rendition templates The web form-managed XML can be transformed with rendition templates and the corresponding content into rendered output. Server-side templating languages, such as FreeMarker, XSLT, and XSLT-FO are provided by Alfresco. After a content item (XML le) is created via a web form, each rendition template congured for that content type is executed, producing an output le per template (shown in the following diagram). Typical formats for renditions of web content include HTML, JSP, PDF, XML, and so on: Download from Wow! eBook <www.wowebook.com> A Publishing Style Web CMS [ 14 ] Web scripts Web scripts provide RESTful access to content held within your Alfresco Enterprise Content Repository. You can therefore place controls on your enterprise content to manage it, and provide uniform access for a wide variety of client applications and services, such as browser, portal, search engine, or any custom application. Web scripts allow you to: • Easily access, manage, and cross-link your content via a customized RESTful API. You do not need any compilation, generators, server restarts, complex installs, tooling, or Java knowledge. All you need is your favorite text editor or the Alfresco Explorer web client. • Build custom URI-identied and HTTP-accessible Content Management Web Services. • Turn your Alfresco repository into a content management-powered HTTP server. Workows Alfresco WCM uses JBoss jBPM for all workows. There are three aspects of workows in Alfresco: • Workow denition: The creation and deployment of the jBPM workow into Alfresco repository. • Workow association: The assignment of a workow to a web project, which specify the actors (reviewers identied). • Workow instance: Created when content that is specic to the associated change set is submitted. Additionally, Alfresco comes with Web Site Submission workow out of the box, which allows for serial and parallel approval of content. Content delivery concepts In Alfresco there are three delivery models: static, dynamic, and a hybrid of both static and dynamic. In a static delivery model, all requests to the web server return a static le of XHTML, XML, JSON, and so on to the web client without any additional processing (no CGIs, no SSI, and so on). In a dynamic delivery model, all requests to the web server return objects of type XHTML, XML, JSON, and so on that are processed by some application server to render the resulting document. Download from Wow! eBook <www.wowebook.com> Chapter 1 [ 15 ] Static delivery model In such a model, pages are rendered as part of the content production process. The resulting HTML and associated assets (images, CSS, JS, and so on) are then published to the lesystem, typically a document root of a web server. This provides high levels of scalability on simplied production architectures (web server farms). This model, however, has limited personalization and there is a set number of rendering technologies (FreeMarker, XSLT, and XSLT-FO). A File System Receiver (FSR) will need to be installed and congured to receive published static content from the Alfresco server. The FSR consists of a small server that receives updates from an Alfresco repository and publishes them to a at lesystem, which is then typically served up by a web or application server. The following diagram illustrates this process: Dynamic delivery model A pure dynamic model publishes content to an Alfresco Runtime, thereby making the content available for dynamic queries with basically any web technology (PHP, Python, J2EE, AJAX, Flash, Cold Fusion, and so on). This provides ultimate exibility in what and how content is displayed on a page. This provides the highest levels of personalization, but will require signicantly more resources on the delivery servers for similar levels of trafc. For all but the smallest websites, signicant effort is required in architecting, developing, and testing to ensure website or application stability. This is particularly the case during unexpected high-volume situations (for example, a Government website during a national disaster). The following diagram illustrates the dynamic delivery model: Download from Wow! eBook <www.wowebook.com> A Publishing Style Web CMS [ 16 ] An Alfresco System Receiver (ASR) will need to be installed on a server to facilitate the dynamic delivery model. The ASR is just another instance of the Alfresco server. The ASR allows a web project being authored in one Alfresco server instance to be deployed to another separate instance of Alfresco. Overview of delivery models The following is a summary of static and dynamic delivery models: Static "Bake" Model Dynamic "Fry" Model Delivery technology Web servers Application servers Page compositing Submission time Request time Content deployed to Filesystem Alfresco runtime Personalization Limited Unlimited Performance Ultimate Less than the "bake" model Application developer skill sets FreeMarker, XSLT, XSLT-FO Any web technology The best of both worlds A hybrid approach is the preferred approach regardless of the WCMS and the underlying technologies. Determination of what is static and what is dynamic is highly dependent on the type of website and web applications. Download from Wow! eBook <www.wowebook.com> Chapter 1 [ 17 ] Users also have the option of a hybrid delivery approach. This approach can be executed as follows: • The web architecture model should be designed to support the dynamic model. This includes the ability to deploy content to both lesystems and Alfresco runtimes for exibility. • Leverage the static model wherever possible. If content must be personalized to a single user or a very small set of users with few "page" impressions, it most likely needs to be dynamic. Otherwise, it can be static. • Choose a page composition model appropriate to the overall site and each page on the site: ° Outside-in: Each page is static HTML with static components already embedded, but dynamic components or applications such as AJAX and Flash can be included. ° Inside-out: Each page is dynamic and includes all page components dynamically regardless of whether those components are static or dynamic. Signicant enhancements in Alfresco WCM with Version 3.3 A bunch of new features focused on helping companies manage their web presence have been introduced in Version 3.3. A list of these is as follows: • Alfresco Web Editor: In-context editing to Alfresco (non-AVM) stored content has been introduced. This will allow content authors to edit content items stored within an Alfresco repository directly from the web page. Alfresco 3.3 also provides the Web Editor Framework, a JavaScript client-side framework, rendering a toolbar, and associated controls. • Transfer Service API: Developers can build solutions that transfer content between Alfresco repositories (non-AVM) using the Transfer Service API. This is useful to WCM architectures where Alfresco provides both authoring and delivery tier components and allows rich-content structures and relationships to be maintained between Alfresco environments. • Rendition API: The Rendition API will allow developers to build solutions for easily repurposing content for the Web. FreeMarker and XSLT templates can also be used as part of the Rendition API. Download from Wow! eBook <www.wowebook.com> A Publishing Style Web CMS [ 18 ] • WCM deployment: The Alfresco Deployment Receiver is congured as sub-system and a new Data Dictionary folder called Web Deployed is congured to default as the deployment target. AVM to DM-WCM deployment facilities have been enhanced to add an additional deployment target. This additional deployment receiver allows WCM content that is authored and stored within the AVM to be deployed to local and remote Alfresco repositories (Alfresco DM). Alfresco Web Editor The Alfresco Web Editor (AWE) is a Spring Surf-based web application that utilizes the Forms Service to provide in-context editing capabilities to Alfresco repository content (non-AVM). Alfresco 3.3 also introduces the Web Editor Framework (WEF), which is a client-side JavaScript framework that is a dependency of the AWE. With the initial release, the AWE will support JavaServer Pages (JSP)-based websites by providing a tag library. Additional languages will be supported in future releases with FreeMarker and PHP being on top of the list. The tags have been designed for easy implementation so that a developer can enable the AWE with minimal effort, and without effecting the CSS layout and design of the site. The simplest and quickest way to deploy AWE is to use the prebuilt WAR (awe.war) le and deploy it in the same application server instance of your web application. Being a Spring Surf-based application, AWE does not have to be deployed in the same application server instance as the Alfresco repository. However, this section presumes that it is. Download from Wow! eBook <www.wowebook.com> Chapter 1 [ 19 ] Summary An easily navigated site, with information consistently organized in a logical fashion, is what most organizations want to provide. But delivering consistent organization with proper adherence to corporate branding and design standards can be difcult when several authors are contributing content. If more than one designer or Webmaster posts content, standards can easily become compromised and consistency diminished. In this chapter, we have learned that Alfresco gives you a web content management solution that: • Has content component architecture where content is separated from format; it is easier to reuse. • Uses an open, object-based API—an open interface providing compatibility with new or emerging technologies. • Is an open source alternative. The next chapter focuses on installing Alfresco and various components around it. Installation on various operating environments is detailed therein. Also explained is the installation of various components like OpenOfce, ImageMagick, Microsoft Ofce Add-ins, Flash Player, and SWFTools. Download from Wow! eBook <www.wowebook.com> Download from Wow! eBook <www.wowebook.com> Installation and Conguration This chapter is aimed at enabling you to understand and carry out various aspects of the Alfresco WCM installation and conguring various components around it. A basic understanding of Alfresco architecture, various installation options, and the key terminologies used are all a part of this chapter. The Alfresco development environment needs to be set in place before we can work with the tools. The installation procedures can also vary depending on the kind of system you have in place to set up and congure Alfresco. First, we will go through the installation procedures for a Microsoft Windows-based system. Linux-based systems also follow similar steps. We will go into detail later in the chapter. At the end of this chapter, you will have learned the following: • Components to install • Conguring the Alfresco Setup • The WCM Component • Setting up the Alfresco WCM development environment Following is the list of softwares you need on your machine before you install Alfresco: Component Recommendation Java SE Development Kit (JDK) JDK 6 is required. Database Alfresco comes precongured with the MySQL database. If you intend to use a different database, install and congure the database before you install Alfresco. Download from Wow! eBook <www.wowebook.com> . HTML, JSP, PDF, XML, and so on: Download from Wow! eBook <www.wowebook.com> A Publishing Style Web CMS [ 14 ] Web scripts Web scripts provide RESTful access to content held within your Alfresco. Alfresco Explorer web client. • Build custom URI-identied and HTTP-accessible Content Management Web Services. • Turn your Alfresco repository into a content management-powered HTTP server. Workows Alfresco. repositories (Alfresco DM). Alfresco Web Editor The Alfresco Web Editor (AWE) is a Spring Surf-based web application that utilizes the Forms Service to provide in-context editing capabilities to