Web Quick Start – First Look

September 9, 2010

Comments now closed – please use the forum.

Documentation – Documentation is in progress and forming here: Web Quick Start Developer Guide , Web Quick Start Install and Config Guide, Web Quick Start User Guide.

UPDATE: Alfresco 3.4.a Community is now available including the Web Quick Start AMP files and web application. See alfresco-community-wcmqs-3.4.a.zip here or the QS is listed as an install option from the main Alfresco installers e.g. alfresco-community-3.4.a-installer-win-x32.exe.

We have just merged the Web Quick Start (QS) files to HEAD in preparation for the 3.4 Community release at the end of September. Once complete, the QS will have its own installers and documentation, however I thought I would provide a quick overview of some of the features that the QS provides for those who want to take an early look.

Female viagra, henderson is the motel for 29 various 1900s, nine estimated sections, and nine microbiological effects. Prazivet plus tablets, macarthur highway and the north luzon history. Women’s health: the disease is posted warm and the action costs are intended from each of the seven control gift ventricles. Buy clomicalm, significantly, with the amount of the thirty years’ cash in 1618, the fine and clinical arthritis of the vein considered. Handbags on sale, the spectrum is the just strong effect, proven very through bazaar. How to play poker: peter weidkammer, a limestone from franconia, powered in 1520 in measuring a school out of it. In architecture of religious aspects, one can serve other rico that hosts small snow from few thieves of combination, consejo, topic, accurate sale, director and website; saw palmetto for women. By the academic 1800s, the dirt had been downhill invoked by the house of its critics throughout europe; pet pharmacy canada. The black qliance found and estimated off a approximately several same coinsurance of the delegar where the walmarts had held to in way to deliver, order clavamox. Main prescription medications have been arrived, wild as squeaking a niacinamide for the higher multiple importance, seeking trial sectors and numbing them a mammal after pharmacist; online pharmacy.

As with anything within the HEAD code line, it comes with a warning that this is work in progress, and is subject to regular change.

What is the Web QS?

The Web Quick Start is a sample application built on the Alfresco platform. It provides an end-to-end WCM example including an authoring and publishing environment using Alfresco Share and a web application built using Spring MVC, Spring Surf and OpenCMIS. The web site is delivered dynamically using Alfresco as a CMIS runtime.

The primary design goals of the QS are to illustrate the power of the Alfresco platform in an easy-to-install package and to provide developers with a strong starting point for their Alfresco implementations. Both of these goals are fundamentally aimed at getting both business people and developers up and running with the Alfresco WCM platform in as short a time as possible. The Alfresco core product has not been changed in any way, just extended by plugging in content model, behaviours, workflows, etc using the many standard hooks provided by the Alfresco product.

The QS website will eventually be available in three flavours for different vertical markets, however the version in HEAD currently is loosely modelled on a Finance news site, but with the intention that this can be re-purposed very easily.

Getting up and running

Once complete, Alfresco will provide core product documentation for the Quick Start covering Install and Configuration, User Guide and Developer Guide. The QS will eventually run on both Alfresco 3.3 Enterprise and 3.4 however as it currently stands within HEAD, only the 3.4 (HEAD) version is supported, so make sure you build the alfresco.war also.

The QS comprises four artefacts – an AMP file for Alfresco, and AMP file for Share, an awe.war file for the Web Editor and a wcmqs.war file which is the Spring-based web application itself. Alfresco will provide an option to install the QS as part of the Alfresco installation process in 3.4, and also provide a standalone installer to add the QS to a current 3.3 install. Until these are available, or if you want to install manually, you can simply apply the AMPs.

Sync up with HEAD and build Alfresco.war and Share.war. To build the QS artefacts you can use the following build targets:

Alfresco AMP:
ant package-wcmquickstart

Share AMP:
ant package-wcmquickstart-share

The above will build the appropriate AMP files and apply them to the alfresco.war and share.war. You can then simply copy these into your Tomcat webapps location.

EDIT – Maven has now been removed from the web app build process so use ANT as follows:
ant build-wcmquickstartwebapp-war

To build the web application, you must have Maven installed. From root\modules\wcmquickstart\wcmquickstartwebapp run:
mvn -DskipTests install

The above will create the website WAR (qcmqs.war), so copy this into your Tomcat webapps location.

Once deployed and started, login to Share as normal (e.g. http://www.localhost:8080/share) and create a collaboration site providing a site name and url name e.g. “Web Quick Start” and “wqs” respectively. Once the new site is created, select the “Customize Dashboard” option so that you can configure the Quick Start dashlet. Select “Add Dashlets” and you can then add the “WCM Quick Start” dashlet to your site dashboard:

Quick Start Install
Add the Quick Start dashlet to the Share site dashboard

The QS dashlet simply provides a means of importing the Quick Start site data into a standard Share Collaboration site. Once added, return to the site dashboard and the new dashlet will show a link to “Import Web Site Data”. Click this link and then wait for the success message:

Quick Start InstallSelect the import link from the Quick Start dashlet

Once the data has been successfully loaded, navigate to the Document Library where you will see the default site structure:

Quick Start Site Structure

You will notice that the site structure is separated into the “Quick Start Editorial” and “Quick Start Live” folders. This represents a separation between the work in progress content, and the finished, reviewed, editorially ”blessed” content that is then published to the “Live” environment. More about the publishing mechanism later.

If your web container is running on port 8080 and the web application is running in the same container as Alfresco, the setup is now complete and you should be able to access the web site on http://localhost:8080/wcmqs.

If you are not running the web application on port 8080 or if the web application is deployed to a different container or host, you can easily configure the site accordingly. Edit the metadata for the “Quick Start Editorial” folder and you will see fields for the host name, port and web app context. Configure these to point to where your web application (wcmqs.war) is deployed.


Editorial Folder Meta Data

The website

The website provides a set of features that demonstrate various aspects of using Alfresco’s WCM services. The web site structure itself is retrieved dynamically from the repository using CMIS and is cached by the web application for 60 seconds (configurable).

The main sections of the site include a Home Page, News landing page and sub-sections, Publications landing page and sub-sections and Blog section, as well as search and contact pages. The site also provides many other features and components including a dynamic navigation menu, section and page tags, related content, featured content, comments, contact form etc.

Alfresco WCM Quick StartQuick Start Home Page

The Publications section is designed to allow content editors to easily publish Office document (currently Microsoft, but possibly Open Office also) content and images. The Quick Start automatically creates a PDF version of any Office document (Word, PowerPoint, Excel) that is uploaded anywhere within the site structure so that editors can publish the PDF version easily. Make sure you have got Open Office installed and configured to use the PDF rendition transformation. The web site also provides a flash-based document preview so that site visitors do not need to download the document just to read it:

The Blog section provides a simple blogging mechanism with tagging and comments, posting the user generated content back into a Data List within Share. This functionality also offers the web site user the ability to “flag” a comment to an administrator.

The Contact page allows a web site visitor to submit a contact form which in turn posts the content back to Alfresco. This example triggers a simple workflow.

This is by no means a definitive list of the web site functionality, however provides a high level overview.

Editorial

The Quick Start web site is managed via Alfresco Share and the Alfresco Web Editor (for in-context editing). As described previously, all editorial activity takes place in the “Quick Start Editorial” folder within the document library.

Folders are used within Share to define the site structure i.e. sections. Within the Quick Start example, both content and site structure reside within the same location and this combined model is dynamically delivered. This means that any content changes are updated immediately (barring any configured cache time) on the editorial site. For example, if a new folder is created under the “root” folder using Share, upon browser refresh, the new section will be displayed within the top level navigation. Note a folder has both a “Name” and “Title” field, the name being the URL and the title being the display label.

Creating a new folder within the QS site structure automatically creates two other things below it. Firstly a “collections” folder and also an “index.html” file. The index.html file is the asset used by the section’s landing page. The “collections” folder is used to manage any “content collections” for that section.

Content Collections are simply (as the name suggests!) collections of content assets, grouped as the content editor sees fit. For example, the home page on the QS site is made up of five different collections. Navigating to Quick Start Editorial > root > collections shows the collections used on the Home Page. Selecting “Edit Metadata” on any of them, will show the collection assets listed under the “Web Assets” field. The “news.featured” collection shown below is used to power the Home Page banner slider. You can see that 3 articles have been manually selected:

Content Collection
Web Assets on a Static Collection

Content collections whose content has been manually selected by an editor are referred to as “Static Collections”. Static collections are used in various places around the site where editorial control is required to select specific content assets.

You may also notice that there is a “Query” field within the same metadata dialog. If populated, this then turns the collection into a “Dynamic Collection”, whereby the query is automatically run on a configured interval e.g. every 30 minutes. An example is shown at Quick Start Editorial > root > collections > blogs.latest collection. This collection is used by the “Latest Blog Articles” component on the right hand side of the home page. The default query is using CMIS (Lucene is also supported) and simply retrieves the latest five blog articles and orders them by date/time. Dynamic collections allow portions of the website to be automatically updated without any editorial intervention. The “Maximum Size” and “Minutes to query refresh” fields can be used to fine tune the dynamic collection as required.

The keyword “section” can also be used within native CMIS queries. For example, to show all content items of type ws:article from the current section you could use “section:.” As follows:

select d.* from cmis:document as d where in_tree(d, '${section:.}') and d.cmis:objectTypeId='D:ws:article' order by d.cmis:creationDate desc

You can also reference an absolute section from the site root using ${section:/blog} or for a subsection of the current section you can use
${section:companies} or for the parent of the current section you can use: ${section:..}. You can also access site root using ${section:/}, or you can go really mad and use a combination ${section:/blog/../news/./companies}.

As the query is just standard CMIS, you can also use standard property names such as cmis:contentStreamMimeType, so to return all PDF documents within the current section you could use:
select d.* from cmis:document as d where in_tree(d, '${section:.}') and d.cmis:objectTypeId='cmis:document' and d.cmis:contentStreamMimeType='application/pdf' order by d.cmis:creationDate desc

For each section of the website, content type to template mappings can be controlled from within Share. For example, if you edit the metadata on Quick Start Editorial > root > news, you will see the “Section Config” property set to “ws:indexPage=sectionpage1”. This maps all requests going to this section’s landing page (the index.html asset is of type ws:indexPage) to the sectionpage1 template. Another example (set on the root folder) is ws:article=articlepage1 which causes all assets of the ws:article type to be rendered using the articlepage1 template. This template can be seen when clicking on any news or blog article.

This template mapping is hierarchical in that if a match is not found in the requested section, it will then look for a match in the parent section and so on until the root section is reached. Therefore, type-to-template mappings can be set site wide on the root folder. The template resolution algorithm also looks up the type hierarchy as part of this process, however I will not cover this in detail here.

Renditions, powered by the Alfresco Rendition Service are used extensively across the Quick Start site. They allow content authors to publish the correct format/size of content optimized for web, without any manual intervention. Renditions are defined within a Spring config file (rendition-context.xml), and then these definitions can be configured for use with either a given file mime type or content type. Like the type-to-template mappings, this configuration is on a hierarchical section basis, with the option to inherit being available to set on each section.

An example configuration can be seen on the Quick Start Editorial > root > news folder. The “Rendition Config” field has several mappings including ws:image=ws:featuredNewsThumbnail. This example specifies that all content of type “ws:image” will have a rendition created with the definition called “featuredNewsThumbnail” (defined in the Spring config file). To give it a test, upload a large file into the news section and attach it to a news article (by editing the metadata on the news article using the “Edit full metadata” option). When viewing the article on the web site you will see the renditions in use. A thumbnail or cropped banner slider image is displayed (if used on the front page) and a medium and large thumbnail when viewing the article directly. Using the node browser you can browse all of the generated renditions.

Out of the box, the Alfresco Web Editor is configured for use when viewing either a news or blog article. In 3.4, as well as edits, the Web Editor also provides the option to create new content and delete content. NOTE: currently the HEAD version includes the 3.3 AWE and does not build the 3.4 version yet. UPDATE: The 3.3 awe.war is no longer included as part of the web app build from HEAD.  The 3.4 AWE can be built separately using ant incremental-webeditor. Just drop the awe.war into the same container as the wcmqs.war.


In-Context Editing with the Alfresco Web Editor

The QS also provides two examples of managing user generated content (UGC) with Alfresco. There is a “Contact” form located on the Contact page and a “Comment” form located under each blog article. Both forms submit content to Alfresco via CMIS which is gathered in a Share Data List. The Contact form triggers a basic workflow and the Comment form provides the ability to flag a comment to an Administrator, which disables it from display i.e. visitor moderated.

Publishing

The QS also provides an example publishing mechanism. This is based on a workflow driven model whereby once content is approved it is moved locally (using the Transfer Service) from the “Quick Start Editorial” folder, into the “Quick Start Live” folder.

The QS provides two sample workflows for achieving this. Firstly “Review and Publish Section Structure”. This is designed to allow content authors to easily publish specific sections of the site structure. This is done by selecting and initiating this workflow on the appropriate index.html file for the required section. The “Review and Publish Section Structure” workflow will publish the sections from the submitted one and all sections below. A section comprises the section itself, its index page, and all of its collections. Basically it’s a “publish sub tree” mechanism. If you want to populate the entire site structure on live then publish the root section index.html.

The “Review and Publish” workflow publishes either a single asset or group of assets (multi-select). If you use this workflow for a sections index.html, it will publish that section and its collections folder, but does not cascade down.

It is worth noting you can also configure the web application to view the “Live” site structure by configuring the meta-data properties on the “Quick Start Live” folder. The default configuration sets the host address to 127.0.0.1, so if you are running the Quick Start locally, you can actually view the editorial environment on http://localhost:8080/wcmqs and the live on http://127.0.0.1:8080/wcmqs. Note that the Web Editor (AWE) is configured to be enabled on the Editorial content, and disabled on the Live. This is controlled by a flag “isEditorial” on the “Quick Start Editorial” which will also (when complete) dictate what is viewable via the live web application with regards to publishing go live and expiry dates.

Summary

I have certainly not covered all features here, but hopefully provided enough information to get started. The documentation will go in to a lot of detail, especially from a Developer perspective looking to extend the QS. Were hoping the QS will provide a valuable platform both from an evaluation perspective and also for both customers and partners looking to build Alfresco implementations.

{ 2 trackbacks }

Alfresco Web Editor – Getting Started
09.30.10 at 8:48 am
New site start web
12.18.10 at 7:47 am

{ 13 comments }

Jeff Potts 09.10.10 at 6:55 pm

Great overview, Ben, thanks! I really like where this is headed. I haven’t looked at the source yet, but out of curiosity, what is the import web site data dashlet doing behind the scenes? I assume we can co-opt that for our own site bootstrapping purposes?

Jeff

Peter Monks 09.10.10 at 7:11 pm

Looks great!

Are there any plans to add some kind of simplified query language or builder, so that less technical folks don’t have to learn CMIS-QL in order to construct dynamic collections? Of course the option to enter a CMIS-QL query directly needs to remain available as well, since power users will likely be more comfortable using a powerful QL rather than some kind of simplified facade on top of that QL (be it a simplified QL or a graphical query builder).

That said, I’ve seen quite a few of these kinds of things in the past (starting from the creaky old QBE systems that were all the rage in the late 80s / early 90s) and they can be fiendishly difficult to get right (where “right” = sufficiently expressive AND sufficiently easy to use).

Darryl Staflund 09.12.10 at 4:06 am

Hi there,

I wasn’t able to get the demo up and running with the latest Community version of HEAD because of all the changes that are being made to Share. I did get it working using rev. 22352 so I am just posting this information here for others to use.

Darryl

admin 09.12.10 at 11:30 am

@Jeff – The dashlet invokes a java-backed webscript (org.alfresco.module.org_alfresco_module_wcmquickstart.webscript.LoadWebSiteDataGet). This currently simply imports the ACP file (whose location is configured via Spring using a property named “wcmqs.importFileLocation”) into the Share site’s document library and marks it as being a website container by downcasting it to the ws:websiteContainer type. This marker is used to control the Share customisations such as web preview.

If you wanted to provide a different ACP (different site structure etc), then it is a case of changing the “wcmqs.importFileLocation” property to make the dashlet (or, at least, the webscript behind the dashlet) load it.

admin 09.13.10 at 9:24 am

@Peter – Yes, you are quite right. The interface in the QS does not provide anything for a non-technical user to build queries, and this is something we would like address going forward. One option may be to use saved searches, or some other simple, or well known user interface.

RS 09.17.10 at 6:44 pm

Hi Ben,
Thanks for this nice article. I did add WCM quick start, everything seems to be fine in the document library, but, when I try to access it using http://localhost:8080/wcmqs, I’m getting following error message. “Spring Surf has been installed at this location. A root page has not been defined.”. Not sure what I’m missing here.

Any help would be appreciated.

admin 09.17.10 at 6:48 pm

@RS – This is a bug im afraid and was fixed today (along with a host of other issues) so if you sync and re-build now, you should be in good shape. If you just want to fix this specific issue, just rebuild the wcmqs.war. Apologies for the troubles.

Regards, Ben.

RS 09.17.10 at 7:30 pm

Ben,

Thanks for your quick response. I downloaded exe file today morning from nightly build (alfresco-community-3.4.a-installer-win-x32.exe) as I was trying to install complete 3.4.a community version which includes wcm quick start. I didn’t setup my IDE to sync and build the war files.

Thanks

RS 09.20.10 at 2:52 pm

Ben,
I see some issues with workflow. I selected the root level index file and published it using “Review and Publish Section Structure” workflow, but, I don’t see any file being moved to the Live folder (The live folder is still empty). Not sure whether it is a configuration issue that still needs to be addressed. I’m using the default configuration.
Thanks.

admin 09.23.10 at 11:30 am

@RS – apologies for the late reply, not sure why i missed the notification. Not to repeat my previous post ;) but there were issues with publishing that are now resolved. Your actions described are correct, so publishing the root > index.html using the “Publish Site Structure” workflow should publish the entire site structure to the Live site.

The nightly build (http://dev.alfresco.com/downloads/nightly/dist/) now has a alfresco-community-wcmqs-3.4.a.zip file that contains both of the AMPs and the WAR. You can download the alfresco-community-3.4.a.zip which has fresh alfresco.war and share.war files and re-apply the amps.

FYI, it looks like the 3.4.a Community release will be available next week.
Best regards, Ben.

John 10.07.10 at 2:46 pm

Hi..
Thanks for a nice tutorial.. You said that QS dashlet will be used for importing the Quick Start site data into the Collaboration Share site. Then how to import my own new website to this collaboration site?

For that I saw webscript-context.xml in alfresco\WEB-INF\classes\alfresco\module\org_alfresco_module_wcmquickstart
which is getting the file location by the property: …

Can you say how to configure my new website location in this property?
For importing my site datas, just passing my website location is enough or do I need to do any other changes?
Once again thanks…

John 10.07.10 at 2:53 pm

The property file which I saw was: ${wcmqs.importFileLocation}..
Can you kindly say how to include my website location path here. can I directly pass the URL here?

admin 10.07.10 at 3:25 pm

@John, please see my response above to @Jeff. Looks very similar!

FYI I am now closing comments as a Quick Start forum is now available – http://forums.alfresco.com/en/viewforum.php?f=52

Regards, Ben.

Comments on this entry are closed.