<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Ben&#039;s Blog &#187; Alfresco WCM</title>
	<atom:link href="http://www.benh.co.uk/category/alfresco/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.benh.co.uk</link>
	<description>Web Content Management and Alfresco</description>
	<lastBuildDate>Thu, 05 Aug 2010 08:44:09 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Alfresco WCM Roadmap &#8211; August 2010</title>
		<link>http://www.benh.co.uk/alfresco/alfresco-wcm-roadmap-august-2010/</link>
		<comments>http://www.benh.co.uk/alfresco/alfresco-wcm-roadmap-august-2010/#comments</comments>
		<pubDate>Thu, 05 Aug 2010 08:42:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[Roadmap]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=464</guid>
		<description><![CDATA[Below are the slides from the Alfresco WCM Roadmap webinar that covered: Release Schedule WCM Quick Start Project &#8220;Cheetah&#8221; Project &#8220;Swift&#8221; The webinar can be viewed here. Alfresco WCM Roadmap 2010 (Cheetah &#38; Swift)]]></description>
			<content:encoded><![CDATA[<p>Below are the slides from the Alfresco WCM Roadmap webinar that covered:</p>
<ul>
<li>Release Schedule</li>
<li>WCM Quick Start</li>
<li>Project &#8220;Cheetah&#8221;</li>
<li>Project &#8220;Swift&#8221;</li>
</ul>
<p>The webinar can be viewed <a href=" http://www2.alfresco.com/l/1234/2010-08-04/JKCTP" target="_blank">here</a>.</p>
<div id="__ss_4905882" style="width: 475px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Alfresco WCM Roadmap 2010 (Cheetah &amp; Swift)" href="http://www.slideshare.net/alfresco/alfresco-wcm-roadmap">Alfresco WCM Roadmap 2010 (Cheetah &amp; Swift)</a></strong><br />
  <object id="__sse4905882" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="475" height="405" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wcmroadmap-100805031505-phpapp01&amp;stripped_title=alfresco-wcm-roadmap" /><param name="name" value="__sse4905882" /><param name="allowfullscreen" value="true" /><embed id="__sse4905882" type="application/x-shockwave-flash" width="475" height="405" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wcmroadmap-100805031505-phpapp01&amp;stripped_title=alfresco-wcm-roadmap" name="__sse4905882" allowscriptaccess="always" allowfullscreen="true"></embed></object>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/alfresco-wcm-roadmap-august-2010/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Web Studio, Web Editor and the Web Editor Framework</title>
		<link>http://www.benh.co.uk/alfresco/web-studio-web-editor-and-the-web-editor-framework/</link>
		<comments>http://www.benh.co.uk/alfresco/web-studio-web-editor-and-the-web-editor-framework/#comments</comments>
		<pubDate>Thu, 10 Jun 2010 09:23:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[Alfresco Web Editor]]></category>
		<category><![CDATA[Surf Framework]]></category>
		<category><![CDATA[web editor]]></category>
		<category><![CDATA[web editor framework]]></category>
		<category><![CDATA[web studio]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=454</guid>
		<description><![CDATA[I have been receiving a steady stream of questions around Web Studio and enquiries around our strategy for future releases with regards to similar functionality, so thought it would be helpful to discuss the product focus.]]></description>
			<content:encoded><![CDATA[<p>I have been receiving a steady stream of questions around <a href="http://wiki.alfresco.com/wiki/Web_Studio" target="_blank">Web Studio</a> and enquiries around our strategy for future releases with regards to similar functionality, so thought it would be helpful to discuss the product focus.</p>
<p><span id="more-454"></span>Firstly to clarify, Web Studio is no longer part of the Community Alfresco product so is no longer available for download.  Web Studio was not part of an Enterprise release and was therefore not supported as part of the core product by Alfresco.  The <a href="http://wiki.alfresco.com/wiki/Spring_Surf" target="_blank">Surf framework</a> that Web Studio utilised has been committed to Spring Source.  The Surf framework is the underlying framework for Alfresco Share and Alfresco will continue to invest in Surf and surrounding developer tools.</p>
<p>With 3.3 Alfresco started to heavily invest in WCM utilising the core Alfresco repository (non AVM).  As part of this strategy we introduced the <a href="http://wiki.alfresco.com/wiki/Web_Editor" target="_blank">Web Editor</a> (in-context editing) and <a href="http://wiki.alfresco.com/wiki/Web_Editor_Framework" target="_blank">Web Editor Framework</a> (WEF).  The Web Editor Framework provides a standard plug-in framework that people can develop any type of functionality on.  The framework can be loosely considered to be a ribbon toolbar that can be customised e.g. adding custom tabs, buttons and any other UI required.  Most importantly it is a common framework that Alfresco, the Alfresco community, partners, customers, the Spring community and anyone else can develop on.  A lot of effort has gone into the way that toolbars, buttons and components in general can be packaged into a single file, allowing for new plug-in’s to easily be “dropped in” to a WEF environment.</p>
<p>The Web Editor was Alfresco’s first core product (documented, supported) feature that was built utilising the Web Editor Framework i.e. the Web Editor has a dependency upon the WEF.  The Web Editor addresses a single specific use case which is to edit content (semantic page content) in the context of the web site.  In context editing.  This functionality is something we are now looking to build on in future releases, expanding this functionality above and beyond simple editing.  The Web Editor focus however of the next release (internally named &#8220;Swift&#8221;) is still on the content editorial process for the Web Editor.</p>
<p>There is also a great deal of interest in what I will term “presentation management”, and this is where Web Studio really sparked peoples thoughts around Alfresco WCM.  By this I mean providing the ability for a site administrator  to manage sites, site structures, templates, components, navigation etc.  In order to provide these features in a consistent, supportable manner, an underlying model is required within the repository which can then be utilised by a  delivery framework.  As the WCM functionality moves forward, we will start to implement such a model, and utilise Spring Surf and the WEF to deliver the presentation management functionality.  The Swift release remains focused on web content production, so no presentation management capabilities are in scope for this release, however the building blocks around the model and Spring Surf will start emerge.</p>
<p>Speaking to Alfresco partners, customers and community member recently, I know people are already starting to implement the Web Editor Framework and build out their required functionality.  We have current customers who have built presentation management capabilities with full custom clients, and the Web Editor Framework provides a powerful  alternative to this route.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/web-studio-web-editor-and-the-web-editor-framework/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Tech Talk Live &#8211; Web Editor Slides</title>
		<link>http://www.benh.co.uk/alfresco/tech-talk-live-web-editor-slides/</link>
		<comments>http://www.benh.co.uk/alfresco/tech-talk-live-web-editor-slides/#comments</comments>
		<pubDate>Tue, 13 Apr 2010 11:45:36 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[Alfresco Web Editor]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=451</guid>
		<description><![CDATA[Here are my slides from last weeks TTL on the Web Editor.]]></description>
			<content:encoded><![CDATA[<div id="__ss_3707570" style="width: 425px;">Here are my slides from last weeks TTL on the Web Editor.</div>
<div style="width: 425px;"></div>
<div style="width: 425px;"><strong><a title="Tech talk live alfresco web editor" href="http://www.slideshare.net/alfresco/tech-talk-live-alfresco-web-editor-compatibility-mode">Tech talk live   alfresco web editor</a></strong><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=techtalklive-alfrescowebeditorcompatibilitymode-100413053407-phpapp01&amp;stripped_title=tech-talk-live-alfresco-web-editor-compatibility-mode" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=techtalklive-alfrescowebeditorcompatibilitymode-100413053407-phpapp01&amp;stripped_title=tech-talk-live-alfresco-web-editor-compatibility-mode" allowscriptaccess="always" allowfullscreen="true"></embed></object></div>
<div id="__ss_3707570" style="width: 425px;">
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/alfresco">Alfresco Software</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/tech-talk-live-web-editor-slides/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco Web Editor &#8211; Getting Started</title>
		<link>http://www.benh.co.uk/alfresco/alfresco-web-editor/getting-started/</link>
		<comments>http://www.benh.co.uk/alfresco/alfresco-web-editor/getting-started/#comments</comments>
		<pubDate>Mon, 15 Mar 2010 18:23:42 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco Web Editor]]></category>
		<category><![CDATA[awe]]></category>
		<category><![CDATA[web editor framework]]></category>
		<category><![CDATA[wef]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=369</guid>
		<description><![CDATA[As we approach the final stages of development for 3.3 functionality, I thought it would be useful to write a brief introduction to the AWE to help people get started.  Please note that this article describes features currently found in HEAD, and are subject to change.

The Alfresco Web Editor (AWE) is a Spring Surf based web application that utilises 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.  More on the WEF later.   The AWE is packaged as a stand-alone WAR file so that it can be deployed to web applications that are remote to the Alfresco application server.]]></description>
			<content:encoded><![CDATA[<p class="note"><strong>UPDATE</strong> &#8211; Alfresco Community 3.3 is now available for download which includes the AWE files.  Download the alfresco-community-webeditor-3.3.zip file from the <a href="http://wiki.alfresco.com/wiki/Community_Edition_file_list_3.3" target="_blank">Community download page.</a>
</p>
<p>As we approach the final stages of development for 3.3 functionality, I thought it would be useful to write a brief introduction to the AWE to help people get started.  Please note that this article describes features currently found in HEAD, and are subject to change.</p>
<p>The Alfresco Web Editor (AWE) is a Spring Surf based web application that utilises 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.  More on the WEF later.   The AWE is packaged as a stand-alone WAR file so that it can be deployed to web applications that are remote to the Alfresco application server.</p>
<p><span id="more-369"></span></p>
<p class="note">Documentation:<br />
<strong>Web Editor</strong> &#8211; <a href="http://wiki.alfresco.com/wiki/Web_Editor" target="_blank">http://wiki.alfresco.com/wiki/Web_Editor</a><br />
<strong>Web Editor Framework</strong> &#8211; <a href="http://wiki.alfresco.com/wiki/Web_Editor_Framework" target="_blank">http://wiki.alfresco.com/wiki/Web_Editor_Framework</a></p>
<h1>AWE Components</h1>
<p>The diagram below shows the core components of the AWE in a basic configuration where all components (Alfresco and the AWE) are installed on a single application server:</p>
<div><a href="http://www.benh.co.uk/wp-content/uploads/2010/03/alfresco-web-editor-11.png"><img class="aligncenter size-full wp-image-429" title="alfresco-web-editor-1" src="http://www.benh.co.uk/wp-content/uploads/2010/03/alfresco-web-editor-11.png" alt="" width="700" height="394" /></a></div>
<h1>JSP Support</h1>
<p>With the initial release, the AWE will support JSP based web sites by providing a tag library.  Additional languages will be supported in future releases with Freemarker and PHP being 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.</p>
<h1>Web Editor Framework (WEF)</h1>
<p>One of the key design requirements for the AWE was to provide a client side framework that could be extended and built upon by our community.  As a result, the Web Editor Framework was developed.  This provides a client side JavaScript framework built using YUI that can be extended easily.  New tabs and buttons can be packaged and &#8220;dropped in&#8221; to the framework.  This allows Alfresco to provide core product features, and the <a title="Spring Surf" href="http://www.springsource.org/extensions/se-surf" target="_blank">Spring Surf</a> and wider community to build out any custom plugins that are required.</p>
<p>As noted above, when the AWE is enabled, the WEF is a dependency that renders the toolbar and basic in-context editing buttons and functionality.  If the WEF is deployed stand-alone, the default blank toolbar is rendered.</p>
<p>A great deal of work has been done by Alfresco to package the WEF into and modular framework.  Were really hoping to see custom functionality being built and exchanged.</p>
<p><img class="aligncenter size-full wp-image-390" title="alfresco-web-editor-2" src="http://www.benh.co.uk/wp-content/uploads/2010/03/alfresco-web-editor-2.png" alt="alfresco-web-editor-2" width="1008" height="81" /></p>
<h1>Build and Deploy</h1>
<p>As well as the AWE itself, Alfresco Development have also provided a sample &#8220;customer&#8221; web application that allows you to easily test the in-context editing functionality.  The customer web app includes a simple tag library for calling content items from the repository.</p>
<p>There are a number of options for building the AWE and customer sample application.  Setting the APP_TOMCAT_HOME environment variable allows the builds to deploy directly to your Tomcat webapps directory.  For example:</p>
<p><code>APP_TOMCAT_HOME=C:\alfresco\tomcat<br />
</code></p>
<p>The build options are as follows:</p>
<p><code>clean-webeditor-projects - </code>Cleans all projects related to the web editor project.</p>
<p><code>deploy-webeditor-tomcat - </code>Deploys the web editor WAR to the application Tomcat server</p>
<p><code>incremental-webeditor-tomcat</code> &#8211; Performs an incremental build and deployment of the Web Editor WAR</p>
<p><code>deploy-webeditor-sample - </code>Performs a build and deployment of the customer sample website</p>
<p>To quickly get up and running, run:</p>
<p><code>ant incremental-webeditor-tomcat-exploded deploy-webeditor-sample-exploded</code></p>
<p>This will create both the customer and AWE web applications in your Tomcat webapps directory:</p>
<p><img class="aligncenter size-full wp-image-383" title="alfresco-web-editor-3" src="http://www.benh.co.uk/wp-content/uploads/2010/03/alfresco-web-editor-3.png" alt="alfresco-web-editor-3" width="190" height="125" /></p>
<h1>Sample &#8220;Customer&#8221; Web Application</h1>
<p>The &#8220;customer&#8221; web application provides some simple examples and tests for the AWE.  Bundled with the customer web application example is a &#8220;customer&#8221; tag library.  This provides a simple mechanism for fetching content from the Alfresco repository.  In a production environment, the web application could be loading the content in any number of ways, so the customer tag library just gets you up and running quickly for the purpose of testing the AWE.</p>
<p>Open up \customer\includes\noderefs.jsp file.  You will see the two node references for sample content items:</p>
<p><code><br />
&lt;%<br />
String mainTextNodeRef = "workspace://SpacesStore/301a540e-7101-489c-a8a7-859102a99ea5";<br />
String subTextNodeRef = "workspace://SpacesStore/e94797ce-c6e9-47eb-b28c-c6a4eb3ce666";<br />
%&gt;<!--formatted--></code></p>
<p>The two node refs are used throughout the example pages.  Create two example html files on your local disk, add some textual content, and upload these to a location within the repository.  Browse to these files using the node browser, and add the appropriate node references to the noderefs.jsp file.  Save the file and then browse to http://localhost:8080/customer/, and you should see the page rendered and the WEF toolbar.  You should be able to go ahead and edit any of the content items.</p>
<p><img class="aligncenter size-full wp-image-389" title="alfresco-web-editor-4" src="http://www.benh.co.uk/wp-content/uploads/2010/03/alfresco-web-editor-4.png" alt="alfresco-web-editor-4" width="1009" height="575" /></p>
<h1>AWE Tag Library</h1>
<p>As noted previously, the <strong>customer </strong>tag library is simply providing a mechanism to load a content item from the repository.  Within the index.jsp example, you will see the <em>customer:property</em> and <em>customer:conten</em>t tags used.  These are relatively self explanatory  in that either a property or the content is loaded, hence if you have null displayed for your title, that is because it has not been set.</p>
<p>The template has a <strong>awe:startTemplate </strong> tag which resides within the &lt;head&gt;&lt;/head&gt; section of the page, and also a <strong>awe:endTemplate </strong> tag which sits just inside the closing &lt;/body&gt; tag.  The <strong>awe:startTemplate </strong>tag<strong> </strong>essentially outputs a &lt;script&gt; tag and loads the WEF bootstrap webscript.  The <strong>awe:endTemplate</strong> tag on the other hand sets up the config for AWE i.e. a list of editable content items on the page and then renders a &lt;script&gt; tag to load the WEF resources script.</p>
<p>The <strong>awe:markContent </strong>tag is used to mark editable content on the page.  An edit icon is displayed on the page wherever the tag is used, or if CSS is disabled, an edit link with no image is used .  It is an option for the template developer as to where these are positioned, providing flexibility on where the most appropriate and logical position is for the content item in question.  In the example below, two parameters are specified, the <strong>id </strong>of the content item i.e. the node ref, and the title.  The <strong>title </strong>is used on the toolbar dropdown to list the available editable content items.  Note that within this example, no form is specified so the default form is assumed:</p>
<p><code>&lt;awe:markContent id="&lt;%=mainTextNodeRef%&gt;" title="Edit Press Release" /&gt;<!--formatted--></code></p>
<p>The example used later within the page utilises two additional attributes.  The <strong>formId </strong>allows the developer to specify a specific form to use, and the <strong>nestedMarker </strong>flag defines if the <em>awe:markContent</em> tag is used within a nested element.  If so, the element is used for a JavaScript flash effect, when a user is navigating using the drop down menu.  For example, a surrounding &lt;div&gt; element.</p>
<p><code><br />
&lt;div id="xyz"&gt;<br />
&lt;awe:markContent id="&lt;%=subTextNodeRef%&gt;" formId="description" title="Edit Trailing Text" nestedMarker="true" /&gt;<br />
&lt;/div&gt;<br />
<!--formatted--></code><br />
Please see the links below for documentation.  Hopefully this has provided a good introduction to some of the AWE and WEF capabilities.  Comments and feedback welcome!</p>
<p class="note">Documentation:<br />
<strong>Web Editor</strong> &#8211; <a href="http://wiki.alfresco.com/wiki/Web_Editor" target="_blank">http://wiki.alfresco.com/wiki/Web_Editor</a><br />
<strong>Web Editor Framework</strong> &#8211; <a href="http://wiki.alfresco.com/wiki/Web_Editor_Framework" target="_blank">http://wiki.alfresco.com/wiki/Web_Editor_Framework</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/alfresco-web-editor/getting-started/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WCM Top Resources</title>
		<link>http://www.benh.co.uk/alfresco/wcm-top-resources/</link>
		<comments>http://www.benh.co.uk/alfresco/wcm-top-resources/#comments</comments>
		<pubDate>Sun, 14 Mar 2010 10:25:31 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=329</guid>
		<description><![CDATA[There is a wealth of different resources available for Alfresco WCM including the Alfresco Wiki, the Content Community, forums, pre-recorded webinars to name but a few.  The following is a moving list of various resources for Alfresco WCM.  Please add a comment with your suggestions if you have found a valuable resource.  I aim to [...]]]></description>
			<content:encoded><![CDATA[<p>There is a wealth of different resources available for Alfresco WCM including the <a href="http://wiki.alfresco.com/wiki/Main_Page" target="_blank">Alfresco Wiki</a>, the <a href="http://share.alfresco.com/share/page/site-index" target="_blank">Content Community</a>, <a href="http://forums.alfresco.com/en/" target="_blank">forums</a>, <a href="http://www.alfresco.com/about/events/ondemand/" target="_blank">pre-recorded webinars</a> to name but a few.  The following is a moving list of various resources for Alfresco WCM.  Please add a comment with your suggestions if you have found a valuable resource.  I aim to keep this list short, hence resources will be removed as they become out of date or are replaced.</p>
<p><em>Note:  These resources do not cover installation and setup.  For further information on installation see <a href="http://www.alfresco.com/products/ecm/enttrial/" target="_blank">http://www.alfresco.com/products/ecm/enttrial/</a></em></p>
<p><span id="more-329"></span></p>
<h1>Getting Started</h1>
<ul>
<li><strong>Web CMS’s Dissected</strong> &#8211; where does Alfresco WCM fit in compared to other products? &#8211; Essential reading from Peter Monks for anyone who is new to Alfresco WCM, or starting to investigate the product.  <a href="http://blogs.alfresco.com/wp/pmonks/2008/11/05/web-cmss-dissected/" target="_blank">http://blogs.alfresco.com/wp/pmonks/2008/11/05/web-cmss-dissected/</a></li>
<li><strong>Getting Started with Web Content Management (WCM) 3.1 Enterprise</strong> &#8211; A PDF document stepping through the basics of the product including installing the sample website and configuring web forms.  THE place to start for basic product usage &#8211; <a href="http://www.alfresco.com/products/ecm/enttrial/files/getting_started_with_wcm_for_enterprise3_1.pdf" target="_blank">http://www.alfresco.com/products/ecm/enttrial/files/getting_started_with_wcm_for_enterprise3_1.pdf</a></li>
<li><strong>Really Simple WCM</strong> &#8211; A recorded webinar stepping through several features of the product including web forms, file system projection (CIFS, FTP), user roles, basic workflow, sandboxes, virtualisation server (preview), basic deployment (FSR and ASR) and snapshots.  <a href="http://webinars.alfresco.com/forms/simplewcm/" target="_blank">http://webinars.alfresco.com/forms/simplewcm/</a></li>
<li><strong>Alfresco Wiki</strong> &#8211; The source for reading up on all topics.  Browse by category &#8211;  <a rel="nofollow" href="http://wiki.alfresco.com/wiki/Category:WCM" target="_blank">http://wiki.alfresco.com/wiki/Category:WCM</a></li>
</ul>
<h1>Web Forms</h1>
<ul>
<li><strong>WCM Forms Quick Tutorial</strong> &#8211; Alfresco Wiki &#8211; This document provides a quick tutorial on how to register and use WCM Forms &#8211; <a href="http://wiki.alfresco.com/wiki/WCM_Forms_Quick_Tutorial" target="_blank">http://wiki.alfresco.com/wiki/WCM_Forms_Quick_Tutorial</a></li>
<li><strong>Learning Alfresco Web Forms by Examples</strong> &#8211; The definitive guide to WCM Xforms.  Dr Q runs through a series of hands on tutorials from the basics to advanced web form creation and usage.  <a href="http://drquyong.com/myblog/?p=65" target="_blank">http://drquyong.com/myblog/?p=65</a></li>
</ul>
<h1>Deployment</h1>
<ul>
<li><strong>WCM Deployment Features &#8211; </strong>Documentation on all of the WCM deployment options &#8211; http://wiki.alfresco.com/wiki/WCM_Deployment_Features</li>
<li><strong>Alfresco Transfer Service</strong> &#8211; A new service as part of 3.3 for the transfer of content between Alfresco servers (non AVM). <a title="Transfer Service" href="http://wiki.alfresco.com/wiki/Transfer_Service" target="_blank">http://wiki.alfresco.com/wiki/Transfer_Service</a></li>
</ul>
<h1>Preview</h1>
<ul>
<li><strong>WCM Preview</strong> &#8211; Alfresco Wiki document detailing the various preview options available including their specific use cases &#8211; <a href="http://wiki.alfresco.com/wiki/WCM_Preview" target="_blank">http://wiki.alfresco.com/wiki/WCM_Preview</a></li>
</ul>
<h1>Content Modeling</h1>
<ul>
<li><strong>WCM Content Modeling webinar</strong> &#8211; A very detailed webinar from Peter Monks stepping through how to take a web site or mock-up (wireframes etc), and break it down into a set of discrete assets that can be efficiently managed with Alfresco WCM.  <a href="http://www.alfresco.com/about/events/2009/06/wcm-content-modeling/" target="_blank">http://www.alfresco.com/about/events/2009/06/wcm-content-modeling/</a></li>
</ul>
<h1>Alfresco Web Editor and Web Framework</h1>
<ul>
<li><strong>Alfresco Web Editor</strong> &#8211; In-context editing for DM based content &#8211; <a title="Alfresco Web Editor" href="http://wiki.alfresco.com/wiki/Web_Editor" target="_blank">http://wiki.alfresco.com/wiki/Web_Editor</a></li>
<li><strong>Getting started guide</strong> &#8211; <a title="Alfresco Web Editor" href="http://www.benh.co.uk/alfresco/alfresco-web-editor/getting-started/" target="_blank">http://www.benh.co.uk/alfresco/alfresco-web-editor/getting-started/</a></li>
</ul>
<h1>Renditions</h1>
<ul>
<li><strong>Rendition API</strong> &#8211; Introduced in 3.3, the rendition API allows non AVM based content to be transformed, utilising Freemarker and XSLT.  <a title="Alfresco Rendition API" href="http://wiki.alfresco.com/wiki/DM_Renditions" target="_blank">http://wiki.alfresco.com/wiki/DM_Renditions</a>.  Documentation of the XSLT Rendering Engine are here &#8211; <a href="http://wiki.alfresco.com/wiki/XSLT_rendering_engine" target="_blank">http://wiki.alfresco.com/wiki/XSLT_rendering_engine</a></li>
</ul>
<h1>Spring Surf</h1>
<ul>
<li><strong>Spring Surf</strong> Home Page &#8211; <a title="Spring Surf" href="http://www.springsource.org/extensions/se-surf" target="_blank">http://www.springsource.org/extensions/se-surf</a></li>
<li><strong>Spring Surf</strong> Documentation and Tutorials &#8211; <a title="Spring Surf" href="http://www.springsurf.org/" target="_blank">http://www.springsurf.org/</a></li>
<li><strong>SURF Platform</strong> &#8211; What is SURF? &#8211; Alfresco Wiki &#8211; This provides a good first step for getting started with the Surf Platform &#8211; <a href="http://wiki.alfresco.com/wiki/Surf_Platform" target="_blank">http://wiki.alfresco.com/wiki/Surf_Platform</a></li>
<li><strong>SURF Deployment configurations</strong> &#8211; Alfresco Wiki &#8211; A detailed page on the various ways in which SURF can be configured based on the use case &#8211; <a href="http://wiki.alfresco.com/wiki/Surf_Platform_-_Deployment_Configurations" target="_blank">http://wiki.alfresco.com/wiki/Surf_Platform_-_Deployment_Configurations</a></li>
<li><strong>Getting Started with SURF</strong> &#8211; Three hands on tutorials covering building a basic web site from scratch using SURF.  Concludes with Alfresco WCM integration example -  <a href="http://www.benh.co.uk/alfresco/surf-part-1-getting-started/" target="_blank">http://www.benh.co.uk/alfresco/surf-part-1-getting-started/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/wcm-top-resources/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Alfresco WCM Roadmap Slides &#8211; 3.2r, 3.3 and 4x</title>
		<link>http://www.benh.co.uk/alfresco/alfresco-wcm-roadmap-slides-3-2r-4-x/</link>
		<comments>http://www.benh.co.uk/alfresco/alfresco-wcm-roadmap-slides-3-2r-4-x/#comments</comments>
		<pubDate>Wed, 03 Feb 2010 19:09:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=363</guid>
		<description><![CDATA[In case you missed them, here are the slides from the Alfresco WCM roadmap webinar presented on Feb 2nd. WCM Roadmap Versions 3 3 And 4 0 View more presentations from Alfresco Software.]]></description>
			<content:encoded><![CDATA[<p>In case you missed them, here are the slides from the Alfresco WCM roadmap webinar presented on Feb 2nd.</p>
<div id="__ss_3062720" style="width: 425px; text-align: left;"><a style="font:14px Helvetica,Arial,Sans-serif;display:block;margin:12px 0 3px 0;text-decoration:underline;" title="WCM Roadmap Versions 3 3 And 4 0" href="http://www.slideshare.net/alfresco/wcm-roadmap-versions-3-3-and-4-0">WCM Roadmap Versions 3 3 And 4 0</a><object style="margin:0px" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="425" height="355" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true" /><param name="allowScriptAccess" value="always" /><param name="src" value="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wcmroadmap-versions3-3and4-0-100203113356-phpapp01&amp;stripped_title=wcm-roadmap-versions-3-3-and-4-0" /><param name="allowfullscreen" value="true" /><embed style="margin:0px" type="application/x-shockwave-flash" width="425" height="355" src="http://static.slidesharecdn.com/swf/ssplayer2.swf?doc=wcmroadmap-versions3-3and4-0-100203113356-phpapp01&amp;stripped_title=wcm-roadmap-versions-3-3-and-4-0" allowscriptaccess="always" allowfullscreen="true"></embed></object></p>
<div style="font-size: 11px; font-family: tahoma,arial; height: 26px; padding-top: 2px;">View more <a style="text-decoration:underline;" href="http://www.slideshare.net/">presentations</a> from <a style="text-decoration:underline;" href="http://www.slideshare.net/alfresco">Alfresco Software</a>.</div>
</div>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/alfresco-wcm-roadmap-slides-3-2r-4-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SURF Part 3 &#8211; Alfresco WCM Content</title>
		<link>http://www.benh.co.uk/alfresco/surf-part-3-alfresco-wcm-content/</link>
		<comments>http://www.benh.co.uk/alfresco/surf-part-3-alfresco-wcm-content/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 18:24:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[Surf Framework]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[surf]]></category>
		<category><![CDATA[wcm]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=292</guid>
		<description><![CDATA[**NOTE: This articles uses features found in HEAD which are considered to be work-in-progress.  This article is for demo purposes only.** In this article I will look at deploying and consuming WCM content from a SURF web application.  To make this very simple, we have created a standalone Tomcat 6 bundle which has an example [...]]]></description>
			<content:encoded><![CDATA[<p><strong>**NOTE: This articles uses features found in HEAD which are considered to be work-in-progress.  This article is for demo purposes only.**</strong></p>
<p>In this article I will look at deploying and consuming WCM content from a SURF web application.  To make this very simple, we have created a standalone Tomcat 6 bundle which has an example SURF web application pre-configured (thanks to Michael Uzquiano for all the assistance!).  This is the same web app as used in the previous articles, so all previous material is still relevant.</p>
<p>Once the Tomcat bundle is deployed and your WCM instance configured, you will have working examples of:</p>
<ul>
<li>An AVM layout separating Surf content (components, templates etc) and Web content (XML content, CSS, images etc).</li>
<li>Deployment configuration allowing the Surf and/or Web content to be deployed to a local file system directory.</li>
<li>An FSR &#8211; configured for the deployment as above</li>
<li>A Surf website example of including static content e.g. an HTML file from the local file system.</li>
<li>A surf website example of dispatching dynamic content from the remote Alfresco repository.</li>
<li>Web form examples for the creation of example content.</li>
</ul>
<p>Initially I will describe the steps required to get up and running, and then I will dissect the configuration so that we fully understand how it is working.</p>
<p><span id="more-292"></span></p>
<h1>Prerequisites</h1>
<ul>
<li>It is expected that you are familiar with Alfresco concepts such as CIFS, Web Scripts, Web Forms etc.  <strong>This is not a beginners tutorial to Alfresco WCM!</strong></li>
<li>Alfresco v3.x installed with WCM configured and running at http://localhost:8080.  If this address is different, you will need to re-configure the Alfresco endpoint.  This is detailed below within the &#8220;Dynamic Content Example&#8221;, so do not be alarmed if your &#8220;Products&#8221; section does not work after the install.</li>
<li>This article is based on the <a href="http://wiki.alfresco.com/wiki/Surf_Platform_-_Deployment_Configurations" target="_blank">Surf Deployment Configurations wiki article</a> which I would highly recommend reading.</li>
</ul>
<h1>Download</h1>
<p>Download the <a href="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample.zip">surf-sample</a> Tomcat bundle and extract to your local file system e.g. c:\surf-sample.</p>
<h1>Installation</h1>
<p>Download the Surf demo Tomcat bundle and extract to your local file system.  Have a browse through the files and you will see that the following is included:</p>
<ul>
<li>surf-sample\sample &#8211; The Tomcat 6 bundle directory</li>
<li>surf-sample\setup\AVM &#8211; An example directory structure to be loaded into the AVM</li>
<li>surf-sample\setup\FSR &#8211; An example FSR</li>
<li>surf-sample\setup\web forms &#8211; Example web forms for creating news and product items</li>
<li>surf-sample\setup\web scripts &#8211; Example web scripts for the products section</li>
</ul>
<h3>Alfresco Setup</h3>
<ul>
<li>Create a new web project with the <acronym title="Domain Name Server">DNS</acronym> name &#8211; “<strong>demo</strong>”. If you do not use this name, you will have to make a small change to the “Product” web script. See the “Web Scripts” section below.</li>
<li>Connect via CIFS to the AVM as the &#8220;admin&#8221; user.</li>
<li>Copy the contents of the AVM structure dir from the surf-sample\setup\AVM\ROOT to the admin user sandbox via CIFS. (You could also zip up and bulk import if you prefer)</li>
<li>Submit this content to the Staging sandbox.</li>
</ul>
<p>The AVM directory structure should look like the following:</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-site1.gif"><img class="aligncenter size-full wp-image-293" title="surf-site1" src="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-site1.gif" alt="" width="313" height="341" /></a></p>
<h3>Web Forms</h3>
<p>I have included two example web forms with the files so that you can quickly create some example content to be used with deployment, and for testing the example functionality.  There are two web forms which need to be installed, one for the news articles and one for products.</p>
<h3>Article Web Form</h3>
<ul>
<li>Create a new article web form using the <strong>C:\surf-sample\setup\web forms\article\article.xsd</strong> file.  Add the output path pattern of <strong>/${webapp}/content/news/source/${name}.xml</strong></li>
<li>Add <strong>C:\surf-sample\setup\web forms\article\latestNews.html.ftl </strong>as a rendition with the output path pattern<strong><strong> /${webapp}/content/news/latestNews.html</strong></strong></li>
</ul>
<h3>Products Web Form</h3>
<p>The product XML items are read dynamically by the Surf webapp.</p>
<ul>
<li>Create a new product web form using the <strong>C:\surf-sample\setup\web forms\product\product.xsd.</strong> Add the output path pattern of <strong>/${webapp}/content/products/source/${name}.xml</strong></li>
</ul>
<p>Note there is also a <strong>article.html.ftl </strong>file, however at present this is not used.  Once the web forms are installed, you can test creating some content.  Verify that the output is being populated to the correct locations as listed above.</p>
<h3>Web Scripts</h3>
<p>The Products section uses a web script which must be installed.</p>
<ul>
<li>Copy the <strong>C:\surf-sample\setup\web scripts\products</strong> folder in to the Alfresco Data Dictionary\web scripts folder and refresh the web scripts. If your site name is not “demo”, you will need to edit the site reference within C:\surf-sample\setup\web scripts\products\products.get.js i.e.</li>
</ul>
<p><code><br />
var storeid = (&quot;demo&quot;);<br />
</code></p>
<h3>Deployment Setup</h3>
<p>All content is deployed to the C:\surf-sample\sample\deploy directory. This represents a stand alone directory which is configured to deliver the Alfresco content.  This directory is separated into two sections as follows:</p>
<ul>
<li>Web Content &#8211; e.g. HTML renditions, JS, CSS etc &#8211; deployed to C:\surf-sample\sample\deploy\webroot\ROOT</li>
<li>Surf Content &#8211; surf items such as templates, components etc &#8211; deployed to C:\surf-sample\sample\deploy\alfresco</li>
</ul>
<p>Configure two deployment targets:</p>
<ul>
<li>Edit your Web Project and add two File System Receivers using the details below.</li>
</ul>
<p><strong>Name:</strong> Content Production<br />
<strong>Excludes:</strong> [A-Za-z0-9:/_]*ROOT/WEB-INF/*<br />
<strong>Target Name:</strong> content</p>
<p><strong>Name:</strong> Surf Production<br />
<strong>Source Path:</strong> /ROOT/WEB-INF/classes/alfresco<br />
<strong>Target Name:</strong> alfresco</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample2.png"><img class="aligncenter size-full wp-image-297" title="surf-sample2" src="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample2.png" alt="" width="500" height="259" /></a></p>
<h3>FSR</h3>
<p>There is an example FSR located within C:\surf-sample\setup\FSR.  You can copy this directory to another location if required e.g. c:\FSR.  The C:\surf-sample\setup\FSR\application-context.xml file has an example configuration which will need to be edited to match your file system locations depending upon where the surf-sample app is located.  See the dir locations in bold below:</p>
<p><code><br />
&lt;!-- Target Configuration. Modify for your site. --&gt;<br />
&lt;property name="targetData"&gt;<br />
&lt;map&gt;<br />
&lt;entry key="alfresco"&gt;<br />
&lt;map&gt;<br />
&lt;entry key="root"&gt;&lt;value&gt;<strong>C:\surf-sample\sample\deploy\alfresco</strong>&lt;/value&gt;&lt;/entry&gt;<br />
&lt;entry key="user"&gt;&lt;value&gt;admin&lt;/value&gt;&lt;/entry&gt;<br />
&lt;entry key="password"&gt;&lt;value&gt;admin&lt;/value&gt;&lt;/entry&gt;<br />
&lt;/map&gt;<br />
&lt;/entry&gt;<br />
&lt;entry key="content"&gt;<br />
&lt;map&gt;<br />
&lt;entry key="root"&gt;&lt;value&gt;<strong>C:\surf-sample\sample\deploy\webroot</strong>&lt;/value&gt;&lt;/entry&gt;<br />
&lt;entry key="user"&gt;&lt;value&gt;admin&lt;/value&gt;&lt;/entry&gt;<br />
&lt;entry key="password"&gt;&lt;value&gt;admin&lt;/value&gt;&lt;/entry&gt;<br />
&lt;/map&gt;<br />
&lt;/entry&gt;<br />
&lt;/map&gt;<br />
&lt;/property&gt;<br />
<!--formatted--></code><br />
Once complete, you should be able to start the surf-sample Tomcat and give the site a test.  Create some content using the web forms and deploy it to the surf-sample app.  Start the Tomcat using <strong>C:\surf-sample\sample\bin\startup.bat</strong> and hit <a href="http://localhost/surf/page?p=index" target="_blank">http://localhost/surf/page?p=index</a></p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample3.png"><img class="aligncenter size-full wp-image-301" title="surf-sample3" src="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample3.png" alt="" width="500" height="347" /></a></p>
<h1><strong>Static Content Example</strong></h1>
<p>The Home Page of the site includes a static HTML file that is created using the article.xsd web form.  This creates the <strong>latestNews.html</strong> file within the repository to ROOT\content\news which is then deployed to the C:\surf-sample\sample\deploy\webroot\ROOT\content\news.  The Surf web application then includes the latestNews.html at request time.</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample4.png"><img class="aligncenter size-full wp-image-302" title="surf-sample4" src="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample4.png" alt="" width="500" height="354" /></a></p>
<p>The HTML include import is done by the Surf component, however before this will function, we need to configure Surf (using Spring) to look into the C:\surf-sample\sample\<strong>deploy</strong> directory for the static content and web scripts.  If you open C:\surf-sample\sample\shared\classes\alfresco\web-extension\custom-web-framework-application-context.xml you will see the example configuration:</p>
<p><code><br />
&lt;!-- Local Store Abstract  --&gt;<br />
&lt;bean id="webframework.localstore" class="org.alfresco.web.scripts.LocalFileSystemStore" abstract="true" init-method="init"&gt;<br />
&lt;property name="root"&gt;<br />
&lt;value&gt;<strong>/surf-sample/sample/deploy</strong>&lt;/value&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;<br />
&lt;!-- Web Scripts: Local Store --&gt;<br />
&lt;bean id="webframework.localstore.webscripts" parent="webframework.localstore"&gt;<!--formatted--></code><code> &lt;property name="path"&gt;<br />
&lt;value&gt;<strong>alfresco/site-webscripts</strong>&lt;/value&gt;&lt;/property&gt;<br />
&lt;/bean&gt;<!--formatted--></code></p>
<p>Once this is configured, components can access this static content.  The component that is used on the Home Page is C:\surf-sample\sample\deploy\alfresco\site-data\components\page.main.index.xml and looks like:<br />
<code><br />
&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br />
&lt;component&gt;<br />
&lt;scope&gt;page&lt;/scope&gt;<br />
&lt;region-id&gt;main&lt;/region-id&gt;<br />
&lt;source-id&gt;index&lt;/source-id&gt;<br />
&lt;component-type-id&gt;/component/common/include&lt;/component-type-id&gt;<br />
&lt;properties&gt;<br />
&lt;container&gt;div&lt;/container&gt;<br />
&lt;/properties&gt;<br />
&lt;resources&gt;<br />
&lt;resource id="source" type="webapp"&gt;/content/news/latestNews.html&lt;/resource&gt;<br />
&lt;/resources&gt;<br />
&lt;/component&gt;<br />
<!--formatted--></code></p>
<p>You can see that we are using one of the web scripts that comes bundled with Surf which is referenced by  /component/common/include.  The resource id is then passed in i.e. the html fragment.</p>
<p>Finally, it is also worth noting at this point that we have mapped a Tomcat alias to point to the &#8220;deploy&#8221; directory also.  This allows us to reference files such as CSS and images if required, using the &#8220;/files&#8221; alias.  Here is the server.xml extract:<br />
<code><br />
&lt;Context path="/files" docBase="${catalina.home}/deploy/webroot/ROOT" reloadable="true" crossContext="true"/&gt;<!--formatted--></code></p>
<h1><strong>Dynamic Content Example</strong></h1>
<p>The second example is the Products page which dynamically loads content from the Alfresco repository.  A list of products is dynamically generated using a web script connecting top the remote Alfresco repository.  When a link is clicked, the relevant content item is dispatched and loaded from the local file system.</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample5.png"><img class="aligncenter size-full wp-image-305" title="surf-sample5" src="http://www.benh.co.uk/wp-content/uploads/2009/03/surf-sample5.png" alt="" width="500" height="516" /></a></p>
<p>The first part of this is a web script that is called to list all of the product items.  This web script is actually located on the remote Alfresco server and therefore we have to configure Surf to search this location for web scripts.</p>
<p>Like configuring the local file store, there is a custom Spring file located in C:\surf-sample\sample\shared\classes\alfresco\web-extension.  Open the web-framework-config-custom.xml file and if you scroll to the bottom, you will see the following extract:</p>
<p><code><br />
&lt;config evaluator="string-compare" condition="Remote"&gt;<br />
&lt;remote&gt;<br />
&lt;endpoint&gt;<br />
&lt;id&gt;alfresco-system&lt;/id&gt;<br />
&lt;name&gt;Alfresco - System access&lt;/name&gt;<br />
&lt;description&gt;System account access to Alfresco&lt;/description&gt;<br />
&lt;connector-id&gt;alfresco&lt;/connector-id&gt;<br />
&lt;endpoint-url&gt;http://localhost:8080/alfresco/s&lt;/endpoint-url&gt;<br />
&lt;identity&gt;declared&lt;/identity&gt;<br />
&lt;username&gt;admin&lt;/username&gt;<br />
&lt;password&gt;admin&lt;/password&gt;<br />
&lt;unsecure&gt;true&lt;/unsecure&gt;<br />
&lt;/endpoint&gt;<br />
&lt;!-- The default endpoint --&gt;<br />
&lt;default-endpoint-id&gt;alfresco-system&lt;/default-endpoint-id&gt;<br />
&lt;/remote&gt;<br />
&lt;/config&gt;<br />
<!--formatted--></code><br />
This extract configures the remote Alfresco repository as an end-point.  You may also notice just above this that there is another entrance as follows:<br />
<code><br />
&lt;!-- Webapp Resource Resolver --&gt;<br />
&lt;resource-resolver&gt;<br />
&lt;id&gt;webapp&lt;/id&gt;<br />
&lt;name&gt;Alfresco Web Application Resource Resolver&lt;/name&gt;<br />
&lt;description&gt;Resolves data access for web application assets&lt;/description&gt;<br />
&lt;class&gt;org.alfresco.web.framework.resource.AlfrescoWebProjectResourceResolver&lt;/class&gt;<br />
&lt;alias-uri&gt;/files&lt;/alias-uri&gt;<br />
&lt;store-id&gt;demo&lt;/store-id&gt;<br />
&lt;/resource-resolver&gt;<br />
<!--formatted--></code></p>
<p>This lets Surf bind to web application resources, like static files, in this case, the actual product XML item we wish to view.</p>
<p>With the end-point and resource resolver in place we can call the remote web script.  So the process is fairly straight forward &#8211; the Surf component calls the remote web script that returns a list of products via JSON.  We then need a way to load an appropriate template to display each product, and that is done by a <strong>page-association</strong> item.  This tells Surf that there is an association between the content that is being loaded and the template we would like to use to display it.  Take a look at C:\surf-sample\sample\deploy\alfresco\site-data\page-associations\products.xml:<br />
<code><br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;content-association&gt;<br />
&lt;source-id&gt;{http://www.alfresco.org/model/wcmmodel/1.0}avmplaincontent&lt;/source-id&gt;<br />
&lt;dest-id&gt;products&lt;/dest-id&gt;<br />
&lt;assoc-type&gt;content-type&lt;/assoc-type&gt;<br />
&lt;format-id&gt;default&lt;/format-id&gt;<br />
&lt;/content-association&gt;<br />
<!--formatted--></code><br />
You can see here that the source-id is &#8220;{http://www.alfresco.org/model/wcmmodel/1.0}avmplaincontent&#8221; and that the dest-id is &#8220;products&#8221; meaning that all content of the type avmplaincontent would be rendered via the &#8220;products&#8221; template.</p>
<h1>Summary</h1>
<p>Hopefully this provides a preview of how nicely WCM content will integrate with Surf powered websites, and <a href="http://wiki.alfresco.com/wiki/Category:Web_Studio" target="_blank">Web Studio</a> is also on the horizon to complete the suite.  As noted previously, this Surf configuration and setup is based on the <a href="http://wiki.alfresco.com/wiki/Surf_Platform_-_Deployment_Configurations" target="_blank">Surf Deployment Configurations wiki article</a> which I would highly recommend reading.  This provides a really good and detailed overview of other possible Surf configurations.</p>
<p>Thanks to Michael Uzquiano for all the assistance!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/surf-part-3-alfresco-wcm-content/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>Screencast &#8211; Deployment And Delivery Overview &#8211; Static Content</title>
		<link>http://www.benh.co.uk/alfresco/screencast-deployment-and-delivery-overview-static-content/</link>
		<comments>http://www.benh.co.uk/alfresco/screencast-deployment-and-delivery-overview-static-content/#comments</comments>
		<pubDate>Wed, 25 Feb 2009 12:16:19 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[delivery]]></category>
		<category><![CDATA[deployment]]></category>
		<category><![CDATA[fsr]]></category>
		<category><![CDATA[static content]]></category>
		<category><![CDATA[wcm]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=282</guid>
		<description><![CDATA[This screencast covers the basics of Deployment And Delivery of Static Content using Alfresco WCM. It was written towards the end of 2008 and is available also on the Content Community for download, along with sample files. Its designed as a basic introduction to the WCM product and provides information on : Setting up a [...]]]></description>
			<content:encoded><![CDATA[<p>This screencast covers the basics of Deployment And Delivery of Static Content using Alfresco WCM. It was written towards the end of 2008 and is available also on the <a href="http://share.alfresco.com" target="_blank">Content Community</a> for download, along with sample files.</p>
<p>Its designed as a basic introduction to the WCM product and provides information on :</p>
<ul>
<li>Setting up a web project</li>
<li>Importing content</li>
<li>Basic content editing/authoring</li>
<li>Simple deployment using an File System Receiver (FSR)</li>
</ul>
<p><span id="more-282"></span></p>
<p style="text-align: center;">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_QuickBlog - Static_demo_skin_2057293639"
			class="flashmovie"
			width="700"
			height="1000">
	<param name="movie" value="http://www.benh.co.uk/alfresco/screencast/quickblog-static/QuickBlog - Static_demo_skin.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.benh.co.uk/alfresco/screencast/quickblog-static/QuickBlog - Static_demo_skin.swf"
			name="fm_QuickBlog - Static_demo_skin_2057293639"
			width="700"
			height="1000">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/screencast-deployment-and-delivery-overview-static-content/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SURF Part 2 &#8211; Pages and Navigation</title>
		<link>http://www.benh.co.uk/alfresco/surf-part-2-pages-and-navigation/</link>
		<comments>http://www.benh.co.uk/alfresco/surf-part-2-pages-and-navigation/#comments</comments>
		<pubDate>Thu, 19 Feb 2009 15:59:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[Surf Framework]]></category>
		<category><![CDATA[surf]]></category>
		<category><![CDATA[wcm]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=241</guid>
		<description><![CDATA[During part 1, the process of creating a simple web page using the SURF framework was discussed detailing creating a basic template and various components.  Next I will look at adding additional pages and building some simple navigation utilising SURF&#8217;s &#8220;Page Association&#8221; features. Setup If you have not got the basic home page up and [...]]]></description>
			<content:encoded><![CDATA[<p>During <a href="http://www.benh.co.uk/alfresco/surf-part-1-getting-started/" target="_blank">part 1</a>, the process of creating a simple web page using the SURF framework was discussed detailing creating a basic template and various components.  Next I will look at adding additional pages and building some simple navigation utilising SURF&#8217;s &#8220;Page Association&#8221; features.</p>
<p><span id="more-241"></span></p>
<h1>Setup</h1>
<p>If you have not got the basic home page up and running from <a href="http://www.benh.co.uk/alfresco/surf-part-1-getting-started/">part 1</a>, download the sample web application <a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf.zip" target="_blank">here</a> and deploy to your local Tomcat (or any other web app server).  Once installed and started you should be able to hit the home page using <a href="http://localhost/surf/page?p=index" target="_self">http://localhost:8080/surf/page?p=index</a> as long as you are using your local machine and have not renamed the web app folder.  You should then get the HTML template home page as follows:</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image1.png"><img class="aligncenter size-full wp-image-243" title="surf2-image1" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image1.png" alt="" width="500" height="470" /></a></p>
<h1>Overview</h1>
<p>The process of creating a new page is relatively simple.  It basically involves creating a new &#8220;page&#8221; item, and the relevant components that will make up that page as covered in part 1.  In this example I am also going to introduce a new template so that we have a different layout for our new page.  Here is an overview of the steps involved:</p>
<ul>
<li>Create the new FTL template file (for the different layout)</li>
<li>Create the new &#8220;template instance&#8221; so that the new template can be referenced from a page component</li>
<li>Create the new page component</li>
</ul>
<p>I will then move on the introduce some simple navigation using the Page Association item.</p>
<h1>Templates and Pages</h1>
<p>As noted, the process for creating the new template and page is identical to that covered in part 1 and therefore I will not describe the code in detail.  If you are in any doubt, refer to Part 1 accordingly.</p>
<p>I have decided to introduce a new template so that we can use a different page layout from that of the home page.  I have called this template &#8220;content.ftl&#8221; as it is a generic page for displaying any type of content.</p>
<p>Start by preparing a basic HTML page that will be used as a generic &#8220;content&#8221; page.  If you downloaded an HTML template for part 1, perhaps a second content page was also provided.  If not, you can take a copy of the current home page template.  It does not really matter at this stage what it looks like, as long as you can see it is different from your current home page layout.  You can always come back later and make CSS and other layout changes.  If you are using the template that is included as part of the download, you can use the following example content.ftl page:<br />
<code><br />
<strong>&lt;@region id="top" scope="global" /&gt;</strong><br />
&lt;body&gt;<br />
&lt;div id="content"&gt;<br />
<strong>&lt;@region id="header" scope="global" /&gt;</strong><br />
&lt;div id="left"&gt;<br />
&lt;ul&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Example list item&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Example list item&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Example list item&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Example list item&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<br />
&lt;/div&gt;<br />
&lt;div id="right"&gt;<br />
&lt;h2&gt;Aliquam metus turpis, luctus ac, sagittis eget&lt;/h2&gt;<br />
&lt;div id="line"&gt;&lt;/div&gt;<br />
&lt;p&gt;Suspendisse egestas fringilla odio. Donec lacinia tristique ante. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Etiam &lt;/p&gt;<br />
&lt;/div&gt;<br />
<strong>&lt;@region id="footer" scope="global" /&gt;</strong><br />
&lt;/div&gt;<br />
&lt;/body&gt;<br />
&lt;/html&gt;<!--formatted--></code></p>
<p>You will note above that I have included the different components that we have available using the <strong>&lt;region&gt;</strong> tag.  This just allows us to re-use the global components we require e.g. header and footers.</p>
<ul>
<li>Create the new <strong>content.ftl</strong> file in the /WEB-INF/classes/alfresco/templates directory.</li>
<li>Copy in your source HTML for your new layout, or the above example code into the new <strong>content.ftl</strong> file.</li>
<li>Add in your global components where needed e.g. headers and footers using the &lt;region&gt; tag.</li>
<li>Create a new template instance file in /WEB-INF/classes/alfresco/site-data/template-instances named <strong>content.xml</strong>.  You can copy the current &#8220;index.xml&#8221; file and remember to amend the &lt;template-type&gt; to point to the new <strong>content</strong> template.</li>
<li>Now create the new page.  Lets create a page called &#8220;<strong>products</strong>&#8220;.  Create the page xml item within /WEB-INF/classes/alfresco/pages named <strong>products.xml</strong>.  Remember to reference the new <strong>content</strong> template instance.</li>
</ul>
<p>Once this is complete, you should be able to manually request the page to test it using <strong>http://localhost/surf/page?p=products</strong>. Here is my example products page using the &#8220;content.ftl&#8221; template:</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image2.png"><img class="aligncenter size-full wp-image-251" title="surf2-image2" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image2.png" alt="" width="500" height="310" /></a></p>
<p>You can now go ahead and componentise the new page as you wish.  Perhaps separate the main content from the left pane and create web scripts to return the HTML where required.</p>
<p>Is is important that the navigation pane is componentised, as this is what we will be working with.  The image below shows the navigation component:</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image3.png"><img class="aligncenter size-full wp-image-257" title="surf2-image3" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image3.png" alt="" width="500" height="261" /></a></p>
<p>Here are the steps involved to create the navigation component:</p>
<ul>
<li>Create the new component in /WEB-INF/classes/alfresco/site-data/components.  I have named my example <strong>global.nav.xml</strong> as this will be a globally scoped/used component.</li>
<li>Create a new web script FTL and descriptor file within /WEB-INF/classes/alfresco/site-webscripts.  Remember to match the same URL references as defined within the component.</li>
<li>Chop out the HTML for the header navigation into the web script FTL file.</li>
<li>Include the component using the region tag into both the index and content template files:</li>
</ul>
<p><code><br />
&lt;@region id="nav" scope="global" /&gt;<br />
<!--formatted--></code></p>
<ul>
<li>Test the pages so that the new nav component is being included correctly on both the index and the products pages.</li>
</ul>
<p>We can now go ahead and create some dynamic navigation using Page Associations.</p>
<h1>Page Association</h1>
<p>From the Alfresco <a href="http://wiki.alfresco.com/wiki/Surf_Platform_-_Developers_Guide#Page_Association" target="_blank">Wiki page</a> &#8211; <em>The Page Association objects allows you to link two pages together. Most commonly, this link is of type child and is meant to depict a fixed structure like a navigation tree. However, other types are possible and there is no requirement to use Page Associations as a means to support only a single fixed tree.</em></p>
<p><em>Using associations, multiple trees are possible. The nature of the associations, when expanded beyond child, is very similar to that of classifiers, categories, or tags. In other words, Pages may be associated to other pages, but they may also be laterally associated to other elements. This allows for implementations of faceted navigation and tag clouds.</em></p>
<p>In this example, we will create a very simple navigation to link the Home page (index) to the new Products page.  To do this we will create a page association item.</p>
<ul>
<li>Create a new Page Association item within /WEB-INF/classes/alfresco/site-data/page-associations named <strong>index-products.xml</strong></li>
<li>Add the following code.  Note the source and destination id&#8217;s relate the pages together:</li>
</ul>
<p><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br />
&lt;page-association&gt;<br />
&lt;source-id&gt;index&lt;/source-id&gt;<br />
&lt;dest-id&gt;products&lt;/dest-id&gt;<br />
&lt;assoc-type&gt;child&lt;/assoc-type&gt;<br />
&lt;order-id&gt;1&lt;/order-id&gt;<br />
&lt;/page-association&gt;<!--formatted--></code></p>
<p>Once the association file is in place, we now need to modify the global nav web script to process the relationships and display the menu.  You should already have in place the <strong>nav.get.desc.xml</strong> file and <strong>nav.get.html.ftl</strong> (or files of similar name and purpose) web script files which currently just return the example menu HTML code, nothing dynamic.</p>
<p>In order to process the menu items, we will need to include some logic making use of a JavaScript file as part of the web script.</p>
<ul>
<li>Create a <strong>nav.get.js</strong> (or relative name if your nav web script is named differently) file within the web scripts directory &#8211; /WEB-INF/classes/alfresco/site-webscripts.</li>
</ul>
<p><code><br />
// renderer attribute<br />
var renderer = instance.properties[&quot;renderer&quot;];<br />
if(renderer == null)<br />
{<br />
renderer = &quot;horizontal&quot;;<br />
}<br />
model.renderer = renderer;</code><br />
<code><br />
// set up rendering attributes<br />
model.rootpage = sitedata.getRootPage();<br />
model.linkbuilder = context.getLinkBuilder();</code></p>
<p>This code makes use of an example basic navigation component with horizontal and vertical renderers.  This is included as part of the <a href="http://wiki.alfresco.com/wiki/Surf_Platform_-_Deployment_Configurations#Building_Alfresco_Surf" target="_blank">surf starter</a> war.</p>
<ul>
<li>Edit the <strong>nav.get.html.ftl</strong> file and remove the static HTML content.  Add the following code:</li>
</ul>
<p><code>&lt;#if renderer == "horizontal"&gt;<br />
&lt;@horizontal page=rootpage showChildren=true/&gt;<br />
&lt;/#if&gt;<br />
&lt;#macro horizontal page showChildren&gt;<br />
&lt;ul id="menu"&gt;<br />
&lt;li&gt;<br />
&lt;#assign href = linkbuilder.page(page.id, context.formatId)&gt;<br />
&lt;#assign classId = ''&gt;<br />
&lt;#if page.id == context.page.id&gt;<br />
&lt;#assign classId = 'current'&gt;<br />
&lt;/#if&gt;<br />
&lt;a href='${href}' id='${classId}'&gt;${page.title}&lt;/a&gt;<br />
&lt;/li&gt;<br />
&lt;#-- Children of Home Page --&gt;<br />
&lt;#list sitedata.findChildPages(page.id) as parentPage&gt;<br />
&lt;li&gt;<br />
&lt;#assign href = linkbuilder.page(parentPage.id, context.formatId)&gt;<br />
&lt;#assign classId = ''&gt;<br />
&lt;#if parentPage.id == context.page.id&gt;<br />
&lt;#assign classId = 'current'&gt;<br />
&lt;/#if&gt;<br />
&lt;a href='${href}' id='${classId}'&gt;${parentPage.title}&lt;/a&gt;<br />
&lt;/li&gt;<br />
&lt;/#list&gt;<br />
&lt;/ul&gt;<br />
&lt;/#macro&gt;<!--formatted--></code></p>
<p>The above code makes use of the <strong>findChildPages(sourceId)</strong> <a href="http://wiki.alfresco.com/wiki/Surf_Platform_-_Freemarker_Template_and_JavaScript_API" target="_blank">Surf API</a> call which simply finds all child page objects for the given top level page id.  It also demonstrates usage of the <strong>linkBuilder</strong> facility which dynamically creates the URL.  You will also notice that a style is being applied if we are viewing the current page i.e. <code>parentPage.id == context.page.</code></p>
<p>This example could easily be extended for second level navigation simply by passing in the parent item id:<br />
<code><br />
&lt;#-- Children of Home Page --&gt;<br />
&lt;#list sitedata.findChildPages(page.id) as parentPage&gt;<br />
&lt;#-- Sub Pages --&gt;<br />
&lt;#list sitedata.findChildPages(parentPage.id) as childPage&gt;<br />
<!--formatted--></code></p>
<p>This is a simplified version of the navigation code used within the Green Energy site which is part of the Alfresco Surf Code Camp material.  Jeff Potts has kindly made this <a href="http://ecmarchitect.com/archives/2009/02/05/891" target="_blank">available for download</a>, and I would recommend taking a look to learn more about Surf in general (including an example of second level navigation).</p>
<ul>
<li>Refresh the web scripts using <a href="http://localhost:8080/surf/service/" target="_blank">http://localhost:8080/surf/service/</a></li>
</ul>
<p>You should now have working navigation showing the Home page and the Products page:</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image4.png"><img class="aligncenter size-full wp-image-268" title="surf2-image4" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf2-image4.png" alt="" width="500" height="214" /></a></p>
<h1>Summary</h1>
<p>Here we have just created a new template (so we can alter the style of the page), and created a new page using the new template.  We then created a simple page association so that the navigation item could build the links. You can probably start to see how useful <a href="http://wiki.alfresco.com/wiki/Category:Web_Studio" target="_blank">Web Studio</a> will be, allowing new pages and navigation to be created using a GUI rather than hand coding each new page.</p>
<p>Next I will look at using Alfresco WCM with Surf, along with some deployment options.</p>
<h1>Download</h1>
<p>The completed web application is available for download here &#8211; <a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf1.zip">SURF Part 2 &#8211; Pages and Navigation</a>.</p>
<p class="note">See also &#8211; <a href="http://www.benh.co.uk/alfresco/surf-part-1-getting-started/" target="_self">SURF Part 1 &#8211; Getting Started</a> and <a href="http://www.benh.co.uk/alfresco/surf-part-3-alfresco-wcm-content/" target="_self">SURF Part 3 &#8211; Alfresco WCM Content</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/surf-part-2-pages-and-navigation/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SURF Part 1 &#8211; Getting Started</title>
		<link>http://www.benh.co.uk/alfresco/surf-part-1-getting-started/</link>
		<comments>http://www.benh.co.uk/alfresco/surf-part-1-getting-started/#comments</comments>
		<pubDate>Mon, 02 Feb 2009 10:39:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Alfresco WCM]]></category>
		<category><![CDATA[Surf Framework]]></category>
		<category><![CDATA[Web Applications]]></category>
		<category><![CDATA[surf]]></category>

		<guid isPermaLink="false">http://www.benh.co.uk/?p=139</guid>
		<description><![CDATA[This article is a step-by-step guide to manually building a simple standalone web site with the SURF framework. This will familiarise you with some of the major components and building blocks used by SURF and provide a good foundation for understanding how Web Studio works under the covers. As described by the Alfresco Wiki &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>This article is a step-by-step guide to manually building a simple standalone web site with the SURF framework. This will familiarise you with some of the major components and building blocks used by SURF and provide a good foundation for understanding how Web Studio works under the covers.</p>
<p>As described by the Alfresco Wiki &#8211; Alfresco Surf is a lightweight, scriptable web framework built on top of Alfresco&#8217;s Web Script and Templating runtime.  It is packaged as a single WAR file meaning it can exist as a standalone application.  One of the nice things about the SURF framework is that you do not HAVE to use Alfresco, or any other data source to construct a web application, so for the purposes of this example, we will simply construct a basic standalone website without using Alfresco. We will take a static HTML web site template, componentise it and demonstrate loading different areas of the page using very basic Web Scripts.<br />
<span id="more-139"></span></p>
<p class="note">09 Feb 2009 &#8211; Updated to use SURF starter WAR instead of alfwf.</p>
<h1>Overview</h1>
<p>SURF utilises the MVC pattern using various components and objects.  XML files are effectively bound together to allow a page to be loaded and rendered.  These include things like Pages, Templates, Components and Themes.</p>
<p>The array of Objects and configurations available to SURF is extensive and powerful and can be somewhat overwhelming for the purposes of just &#8220;getting started&#8221;. For this reason, I have chosen not to include the majority of these features and functions, however more advanced usage will be discussed in future articles. I would reccomend reading the Alfresco Wiki SURF Overview, as this explains the context of SURF in detail &#8211; <a href="http://wiki.alfresco.com/wiki/Surf_Platform" target="_blank">http://wiki.alfresco.com/wiki/Surf_Platform.</a> The <a href="http://wiki.alfresco.com/wiki/Surf_Platform_-_Developers_Guide" target="_blank">SURF Platform Developers Guide</a> also discusses in detail all of the available objects.</p>
<p>Take a look at the following diagram that represent a simplified path to how a page is loaded:<a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image.png"><img class="aligncenter size-full wp-image-172" title="surf-image" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image.png" alt="" width="238" height="701" /></a></p>
<p>In simple terms, the page is specified and requested by the URL.  The page definition then looks up the Template Instance, which then calls the actual template.  This could be for example a Freemarker template file.  The template file is broken down into regions which can each call page components.</p>
<h1>Build the SURF war file</h1>
<p>The SURF starter WAR file can be built from source using:<br />
<code><br />
ant incremental-surf-starter<br />
</code></p>
<p>This creates the starter WAR file which includes example components and configurations.  Alternatively you can download the WAR file <a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf.war">here</a>.  Please be aware this was built on 09 Feb and may have changed since then, so building from source is reccomended.</p>
<p>When the WAR file is deployed, you should be able to access the splash page on http://localhost:8080/surf/page providing that you are using your local machine (localhost) and you have not renamed the webapp folder i.e. surf.</p>
<p style="text-align: center;"><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-splash.png"><img class="size-full wp-image-227 aligncenter" title="surf-splash" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-splash.png" alt="" width="500" height="426" /></a></p>
<h1>Cache</h1>
<p>The SURF framework includes a cache facility and at the time of writing this was enabled by default.  To save application server restarts it is a good idea to disable it during the development process.</p>
<ul>
<li>Edit the /WEB-INF/classes/alfresco/web-framework-application-context.xml file.</li>
<li>Search for the word &#8220;updateDelay&#8221; and amend the value to &#8220;0&#8243;.  There are two occurances and properties to change.</li>
</ul>
<p><code><br />
&lt;property name="updateDelay"&gt;&lt;value&gt;0&lt;/value&gt;&lt;/property&gt;<br />
<!--formatted--></code></p>
<ul>
<li>Restart your application server for the change to take effect.</li>
</ul>
<h1>Site Configuration</h1>
<ul>
<li>Create a new site configuration file within /WEB-INF/classes/alfresco/site-data/configurations named default.site.configuration.xml.</li>
<li>Add the following code to configure the default page to be &#8220;index&#8221;:</li>
</ul>
<p><code><br />
&lt;?xml version="1.0" encoding="UTF-8"?&gt;<br />
&lt;configuration&gt;<br />
&lt;title&gt;Sample Site Configuration&lt;/title&gt;<br />
&lt;description&gt;Sample Site Configuration&lt;/description&gt;<br />
&lt;source-id&gt;site&lt;/source-id&gt;<br />
&lt;properties&gt;<br />
&lt;root-page&gt;index&lt;/root-page&gt;<br />
&lt;/properties&gt;<br />
&lt;/configuration&gt;<br />
<!--formatted--></code></p>
<h1>Creating The Home Page</h1>
<ul>
<li>Create a new page file within the pages dir &#8211; /WEB-INF/classes/alfresco/site-data/pages named <strong>index.xml</strong>. This will be the website home page.</li>
</ul>
<p><em>/WEB-INF/classes/alfresco/site-data/pages/index.xml</em><br />
<code><br />
&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br />
&lt;page&gt;<br />
&lt;title&gt;Home&lt;/title&gt;<br />
&lt;description&gt;Site Home page&lt;/description&gt;<br />
&lt;template-instance&gt;index&lt;/template-instance&gt;<br />
&lt;authentication&gt;none&lt;/authentication&gt;<br />
&lt;/page&gt;<!--formatted--></code></p>
<h1>Template-Instance</h1>
<p>The template-instance references the appropriate renderer, and uses freemarker by default.</p>
<ul>
<li>Create a new template-instance within /WEB-INF/classes/alfresco/site-data/template-instances</li>
<li>Call it <strong>index.xml</strong>. This must match the name used within the &lt;template-instance&gt; parameters within the page example above.</li>
</ul>
<p><em>/WEB-INF/classes/alfresco/site-data/template-instances/index.xml</em><br />
<code><br />
&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br />
&lt;template-instance&gt;<br />
&lt;template-type&gt;index&lt;/template-type&gt;<br />
&lt;/template-instance&gt;<br />
<!--formatted--></code><br />
In this example /WEB-INF/classes/alfresco/site-data/template-instances/index.xml references index.ftl within /WEB-INF/classes/alfresco/templates.</p>
<h1>Templates</h1>
<p>Next, we will create the corresponding template as referenced above by the  in /WEB-INF/classes/alfresco/templates named “index.ftl”. This is the main page structure of our site. As mentioned previously, for the purposes of this article, we will construct a new site using an HTML site template. Choose an example HTML template for your site. There are plenty available on the web e.g. <a href="http://www.solucija.com/free-templates" target="_blank">http://www.solucija.com/free-templates</a>. Select a basic layout so that the site construction is simple.</p>
<ul>
<li> Open the main page of your new downloaded HTML template (typically index.html) and copy the source code of the index.html into your newly created index.ftl.</li>
<li>Save the index.ftl template.</li>
</ul>
<p>Now you should be able to test the new page by hitting your app server using the URL <a href="http://localhost:8080/surf/page?p=index" target="_blank">http://localhost:8080/surf/page?p=index</a>. You should see your web template (probably with missing style and image data).</p>
<p style="text-align: center;">
<p style="text-align: center;"><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image1.png"><img class="aligncenter size-full wp-image-211" title="surf-image1" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image1.png" alt="" width="500" height="303" /></a></p>
<p>Now we will add in any missing page furniture files e.g. images, css, JavaScript etc so that the page will render correctly.</p>
<p>Copy the CSS file from the downloaded HTML template into /surf/css.</p>
<ul>
<li> Repeat the file copy for any other page furniture that may be part of your web template e.g. images and JavaScript files. For example, images should be copied to /surf/images and JavaScript to /surf/js etc.</li>
<li>Edit your main freemarker template (/WEB-INF/classes/alfresco/templates/index.ftl) to reference these CSS/image/JS files. You can also use the Freemarker reference to URL context &#8211; ${url.context} to navigate to the correct directory, for example:</li>
</ul>
<p><code><br />
&lt;link rel="stylesheet" type="text/css" href="<strong>${url.context}</strong>/css/style.css" media="screen" /&gt;<br />
<!--formatted--></code></p>
<ul>
<li>Do the same for any other CSS, JS and images which are referenced within your HTML template.</li>
<li>Refresh your browser and make sure that all of the referenced files are present. Remember you may have to alter the css file itself if it is referencing image files etc. You should then have a working home page.</li>
</ul>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image2.png"><img class="aligncenter size-full wp-image-213" title="surf-image2" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image2.png" alt="" width="500" height="524" /></a></p>
<h1>Cache Refresh</h1>
<p>When working with SURF editing files regularly, it may be required that the cache is cleared before your pages will render correctly. This can be done browsing to the cache invalidate page as follows:</p>
<p><a href="http://localhost:8080/surf/control/cache/invalidate" target="_blank">http://localhost:8080/surf/control/cache/invalidate</a></p>
<h1>Componentise The Page</h1>
<p>A component is an instance of a component type that has been &#8220;bound&#8221; into a region or a slot. Basically the page is made up of components which can have different scopes. These can be either global, template or page depending on where you would like to use each component.</p>
<ul>
<li>Global &#8211; Components to be used on ALL pages e.g. a logo</li>
<li>Template &#8211; components to be used on SOME pages i.e. &gt; 1 but &lt; all</li>
<li>Page &#8211; component to be used on a single page</li>
</ul>
<h1>Global Components</h1>
<p>Start by creating a global component such as the page header. These are sections of the page that will not change from one page to the next. On my example HTML template, the logo and general header section will not change between pages (with the exception of the top navigation which i will componentise later), so I will start with that.</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image3.png"><img class="aligncenter size-full wp-image-215" title="surf-image3" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image3.png" alt="" width="500" height="520" /></a></p>
<ul>
<li>Create a new file in /WEB-INF/classes/alfresco/site-data/components named <strong>global.header.xml</strong>.</li>
</ul>
<h1>Naming Components</h1>
<p>Naming SURF components is very important as it binds the component to a specific region of the page (i.e. where the component will be displayed), and defines the scope. The name is defined as follows scope.regionId.sourceId.xml so in the above example (global.header.xml) the component is of global scope, it is bound to a page region using header. Note there is no third parameter of the name (the sourceId binding to a specific page) in this example as this is a global scope component and therefore is used on all pages.</p>
<p class="note">To provide a little further information on the Source ID, as noted above the value depends on the scope of the binding.  So for page it&#8217;s the pageId, template it&#8217;s the templateId and as noted above  global it&#8217;s always &#8220;global&#8221; so we ignore it and don&#8217;t make it part of the binding.  The value is optional in the XML definitions for pages/templates/components because it can always be derived from the file name of the item &#8211; because the ID is bound in the filename.</p>
<p>Go ahead and create the global.header.xml as listed below:</p>
<p><em>/WEB-INF/classes/alfresco/site-data/components/global.header.xml</em><br />
<code><br />
&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br />
&lt;component&gt;<br />
&lt;scope&gt;global&lt;/scope&gt;<br />
&lt;region-id&gt;header&lt;/region-id&gt;<br />
&lt;source-id&gt;global&lt;/source-id&gt;<br />
&lt;url&gt;/header&lt;/url&gt;<br />
&lt;/component&gt;<!--formatted--></code></p>
<h1>Web Scripts</h1>
<p>One of the great things about SURF is the ability to run web scripts without requiring a connection to Alfresco. Introducing/detailing web scripts is out of scope for the purposes of this article however web scripts are discussed in detail on the <a href="http://wiki.alfresco.com/wiki/Category:Web_Scripts" target="_blank">Alfresco Wiki</a>.  I would recommend a basic understanding of Web Scripts before continuing.</p>
<p>For the purposes of this article, we will be using very simple Web Scripts to return our HTML components i.e. the html components that will make up our page.  We actually have a couple of options here as to how the Web Scripts will work.  For example, we could componentise the HTML into different physical files stored in a specific directory, and then use a web script to actually include the required HTML fragment file.  Alternatively, we can simply store the HTML fragment within the Web Script Freemarker template file, so that this is the content that is rendered.  Either option is fine, but I will use the latter for absolute simplicity!  So for each Web Script, we will have two files &#8211; the XML descriptor file and the FTL renderer file.</p>
<p>You may have noticed above within the global.header.xml component definition that there is a parameter named &lt;url&gt;. This specifies the web script url to request. With this example, the web script to be executed is being called by /header. Lets setup the /header web script and the related Freemarker file to return the header HTML.</p>
<p>Web scripts within SURF are typically stored within /WEB-INF/classes/alfresco/site-webscripts.</p>
<ul>
<li>Create a web script descriptor file named <strong>header.get.desc.xml</strong> within /WEB-INF/classes/alfresco/site-webscripts.</li>
<li>Add the following to the file:</li>
</ul>
<p><em>/WEB-INF/classes/alfresco/site-webscripts/header.get.desc.xml</em><code><br />
&lt;webscript&gt;<br />
&lt;shortname&gt;Header&lt;/shortname&gt;<br />
&lt;description&gt;Loads global Header&lt;/description&gt;<br />
&lt;url&gt;/header&lt;/url&gt;<br />
&lt;/webscript&gt;<br />
<!--formatted--></code></p>
<ul>
<li>Save and close this file and create the accompanying Freemarker template within the same directory. Name it <strong>header.get.html.ftl</strong>.</li>
</ul>
<p>Next we will chop out the HTML from our index.ftl that represents the region we are componentising i.e. the header HTML. Using my example, this is the header HTML that makes up outlined area in the image above.</p>
<ul>
<li> Edit the /WEB-INF/classes/alfresco/templates/index.ftl file and locate the HTML specific to your chosen global region e.g. header.</li>
<li>Cut this code so that it is saved to the clipboard and then paste it into the newly created WEB-INF/classes/alfresco/site-webscripts/header.get.html.ftl file. My HTML looks like the following, obviously this will be different depending upon what HTML template you downloaded:</li>
</ul>
<p><em>/WEB-INF/classes/alfresco/site-webscripts/header.get.html.ftl</em></p>
<p><code> &lt;div id="top"&gt;<br />
&lt;p&gt;&lt;a href="#"&gt;Home&lt;/a&gt;&lt;a href="#"&gt;About&lt;/a&gt;&lt;a href="#"&gt;Archive&lt;/a&gt;&lt;a href="#"&gt;Sitemap&lt;/a&gt;&lt;/p&gt;<br />
&lt;form id="search_engine" method="post" action="." accept-charset="UTF-8"&gt;<br />
&lt;p&gt;&lt;input class="searchfield" name="search_query" type="text" id="keywords" value="Search Keywords" onfocus="document.forms['search_engine'].keywords.value='';" onblur="if (document.forms['search_engine'].keywords.value == '') document.forms['search_engine'].keywords.value='Search Keywords';" /&gt;<br />
&lt;input class="searchbutton" name="submit" type="submit" value="Search" /&gt;&lt;/p&gt;<br />
&lt;/form&gt;<br />
&lt;/div&gt;<br />
&lt;div id="logo"&gt;<br />
&lt;img src="images/Alfresco-logo.jpg" width="225" height="65" alt="Alfresco Logo" /&gt;<br />
&lt;/div&gt;<br />
&lt;ul id="menu"&gt;<br />
&lt;li&gt;&lt;a class="current" href="#"&gt;Home&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Products&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Clients&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Services&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;About Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;li&gt;&lt;a href="#"&gt;Contact Us&lt;/a&gt;&lt;/li&gt;<br />
&lt;/ul&gt;<!--formatted--></code></p>
<p>Now we just need to reference the new component from the main index.ftl template &#8211; /WEB-INF/classes/alfresco/templates/index.ftl using the &#8220;region&#8221; tag.  This is effectively a pointer to the component.</p>
<ul>
<li>Edit the /WEB-INF/classes/alfresco/templates/index.ftl once again and locate the section of the page where the header HTML was previously removed.</li>
<li>Insert the region tag pointing to the header component as follows:</li>
</ul>
<p><code>&lt;@region id="header" scope="global" /&gt;<!--formatted--></code></p>
<ul>
<li>Save and close the file.</li>
</ul>
<p>Once you have created and saved the two web script files and referenced the component from the template, we can refresh the web script environment to register the new script and test it. To refresh the web script environment access http://localhost:8080/surf/service/. You will see a button at the bottom of the page named &#8220;Refresh Web Scripts&#8221;. Select this and the new script will be registered. You can then test the Web Script by accessing it via the URL as listed within the descriptor file i.e. http://localhost:8080/surf/service/header. You should see the page header HTML:</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image41.png"><img class="aligncenter size-full wp-image-216" title="surf-image41" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image41.png" alt="" width="276" height="356" /></a></p>
<p>Now when you hit the index home page once again, you should see your full page with the header global component being included &#8211; http://localhost:8080/surf/page?p=index</p>
<h1>Page Scope Components</h1>
<p>Once the header component is in place and running fine, we can move on to create some more components, this time using the page scope i.e. components that will change with each page. In my example, im going to build 2 for the home page named <strong>main</strong> and <strong>sidebar</strong>. I have highlighted where these components will be used within the index page:</p>
<p><a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image61.png"><img class="aligncenter size-full wp-image-217" title="surf-image61" src="http://www.benh.co.uk/wp-content/uploads/2009/02/surf-image61.png" alt="" width="500" height="506" /></a></p>
<p>The process is the same as we have just completed i.e.:</p>
<ul>
<li>Create the two component files within /WEB-INF/classes/alfresco/site-data/components</li>
<li>Name them accordingly using <strong>scope.regionId.sourceId.xml</strong></li>
<li>Create two new web scripts to return the required HTML for each area of the page</li>
<li>Chop the HTML out of the index.ftl page and paste into each of the corresponding web script FTL files</li>
<li>Edit the index.ftl and put in the placeholders to reference the components</li>
<li>Register the new web scripts</li>
<li>clear the SURF cache</li>
</ul>
<p>I will detail another example (as listed above), this time for the main content part of my page (the left hand body text).</p>
<ul>
<li>Create a new component within /WEB-INF/classes/alfresco/site-data/components named <strong>page.main.index.xml</strong>.</li>
<li>Configure the component for page scope, mapping to a region of choice e.g. “main” and mapping the source id to the index page. Finally map the url to the web script with a suitable URL e.g. /index/main</li>
</ul>
<p><em>/WEB-INF/classes/alfresco/site-data/components/page.main.index.xml </em><br />
<code><br />
&lt;?xml version='1.0' encoding='UTF-8'?&gt;<br />
&lt;component&gt;<br />
&lt;scope&gt;page&lt;/scope&gt;<br />
&lt;region-id&gt;main&lt;/region-id&gt;<br />
&lt;source-id&gt;index&lt;/source-id&gt;<br />
&lt;url&gt;/index/main&lt;/url&gt;<br />
&lt;/component&gt;<!--formatted--></code></p>
<ul>
<li>Create the new web script within /WEB-INF/classes/alfresco/site-webscripts. First the descriptor file which I will call <strong>index.main.get.desc.xml</strong>. Make sure the url mapping matches that set in the component file above i.e. /index/main.</li>
</ul>
<p><em>/WEB-INF/classes/alfresco/site-webscripts/index.main.get.desc.xml </em><br />
<code><br />
&lt;webscript&gt;<br />
&lt;shortname&gt;index&lt;/shortname&gt;<br />
&lt;description&gt;Returns the main page content for the index page.&lt;/description&gt;<br />
&lt;url&gt;/index/main&lt;/url&gt;<br />
&lt;/webscript&gt;<!--formatted--></code></p>
<ul>
<li>Next the Freemarker part of the web script. I will name it <strong>index.main.get.html.ftl</strong>. Chop out the HTML for the appropriate region from your index.ftl file and paste it into this file. Save again to /WEB-INF/classes/alfresco/site-webscripts.</li>
<li>Edit the /WEB-INF/classes/alfresco/templates/index.ftl file again and put in the region placeholder where the component will be bound to. The id must match that set within the component definition.</li>
</ul>
<p><code><br />
&lt;@region id="main" scope="page" /&gt;<br />
<!--formatted--></code></p>
<ul>
<li>Register the new web script by hitting http://localhost:8080/surf/service/ and select “Refresh Web Scripts”</li>
<li>Clear the SURF cache by visiting http://localhost:8080/surf/control/cache/invalidate</li>
<li>Refresh your home page to see the component included &#8211; http://localhost:8080/surf/page?p=index</li>
</ul>
<h1>Summary</h1>
<p>Once the above is completed you will have successfully setup a SURF page, created several components and bound them to the page in the appropriate areas. You will also have created some basic web scripts to return the HTML components. Go ahead and create any other required page components for your home page, and remember to use the appropriate scope e.g. global for a footer etc.</p>
<p>Its now probably a good time re visit the <a href="http://wiki.alfresco.com/wiki/Category:Surf_Platform" target="_blank">Wiki documentation on SURF</a> as this will give you a good understanding of what other features and capabilities are available.  What we have completed here has barely scratched the surface, however should be useful for moving forward.  Next I will look at adding new pages and navigation.</p>
<h1>Download</h1>
<p>The finished web application is available for download here &#8211; <a href="http://www.benh.co.uk/wp-content/uploads/2009/02/surf.zip">SURF Part 1 &#8211; Getting Started</a>.</p>
<p class="note">See also &#8211; <a href="http://www.benh.co.uk/alfresco/surf-part-2-pages-and-navigation/" target="_self">SURF Part 2 &#8211; Pages and Navigation</a> and <a href="http://www.benh.co.uk/alfresco/surf-part-3-alfresco-wcm-content/" target="_self">SURF Part 3 &#8211; Alfresco WCM Content</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.benh.co.uk/alfresco/surf-part-1-getting-started/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>
