web quick start with tribloom: a tale of two wqs implementations

38
About Me President and CTO of Tribloom Inc. Customizing Alfresco since 2008 Many website and customized Share implementations on Alfresco Would like to share my experiences with WQS Twitter: MMcCarthy01 Blog: www.tribloom.com\blogs\michael 12/6/11 © Tribloom, Inc. 2011 1

Upload: alfresco-software

Post on 05-Dec-2014

1.581 views

Category:

Technology


0 download

DESCRIPTION

This session will cover various topics related to developing a production Web Quick Start (WQS) website along with how to customize WQS. We'll discuss a WQS website and WQS intranet implementation. We will dive into the details of each implementation and cover lessons learned.

TRANSCRIPT

Page 1: Web Quick Start with Tribloom: A tale of two wqs implementations

About Me

!  President and CTO of Tribloom Inc. !  Customizing Alfresco since 2008 !  Many website and customized Share

implementations on Alfresco !  Would like to share my experiences with WQS !  Twitter: MMcCarthy01 !  Blog: www.tribloom.com\blogs\michael

12/6/11 © Tribloom, Inc. 2011 1

Page 2: Web Quick Start with Tribloom: A tale of two wqs implementations

What are we talking about?

!  Background !  Web Quick Start !  Website !   Intranet !  Demo !  Q&A

12/6/11 © Tribloom, Inc. 2011 2

Page 3: Web Quick Start with Tribloom: A tale of two wqs implementations

Background

Client Seeking: !  Document management !  Website !   Intranet

Leading To: !   Increased process automation !  Reduced operating costs

The Answer? !  Alfresco

12/6/11 © Tribloom, Inc. 2011 3

Page 4: Web Quick Start with Tribloom: A tale of two wqs implementations

Document Management – High Level

Goals: !  Replace existing shared drive infrastructure !  Each department has its own folder on shared drive !  Some documents on shared drive are shared on

company intranet Implementation:

!  Use company AD server for SSO !  Create Share site templates for departmental sites !  Bulk load some content !  Custom versioning scheme !  UI customizations !  Content modeling !  Advanced Workflow

12/6/11 © Tribloom, Inc. 2011 4

Page 5: Web Quick Start with Tribloom: A tale of two wqs implementations

Website- High Level

Goals: !  Simple, professional, website for marketing and

information !  Content for website should be managed outside of IT

department !  Outside company produced website design

Implementation: !  Create company theme in WQS !  Custom pages, templates, and components !   Incorporate Lightbox for “image gallery”

12/6/11 © Tribloom, Inc. 2011 5

Page 6: Web Quick Start with Tribloom: A tale of two wqs implementations

Intranet – High Level

Goals: !  Display links to content from departmental sites !  Display area for company links and applications !  Provide FAQ functionality !  Departments responsible for their own content !  Site search should find content in departmental sites

Implementation: !  Tie Share site content to Web Quick Start site using

aspects, associations, and behaviors !  FAQs articles are tagged to allow sorting !  Modify search query to return all content

12/6/11 © Tribloom, Inc. 2011 6

Page 7: Web Quick Start with Tribloom: A tale of two wqs implementations

Web Quick Start

!  Why Web Quick Start !  How do you customize WQS (Surf) !  How do you customize WQS (WQS API)

12/6/11 © Tribloom, Inc. 2011 7

Page 8: Web Quick Start with Tribloom: A tale of two wqs implementations

Why Web Quick Start?

Speed !  Quick implementation, about 5 weeks each

Ease of Use !  The end user can easily maintain existing content

and add new content without any technical skills Ease of Implementation

!  Easy integration with Alfresco repository !  WQS uses technologies we already know from

Alfresco (CMIS, Surf, Webscripts)

12/6/11 © Tribloom, Inc. 2011 8

Page 9: Web Quick Start with Tribloom: A tale of two wqs implementations

How Do You Customize WQS? (Surf)

!  Sample finance and government sites are Spring Surf !  Similar to Share, overwrite or add “web” assets such

as JS, CSS, and images in webapps/wcmqs !  js !  css !  images

!  Recommended method is to create directories under webapps/wcmqs/WEB-INF/classes/surf !  site/pages – for XML files !  site/templates – for XML files !  Templates – for Freemarker files !  Webscripts – for webscript files

12/6/11 © Tribloom, Inc. 2011 9

Page 10: Web Quick Start with Tribloom: A tale of two wqs implementations

Surf Override File Structure

12/6/11 © Tribloom, Inc. 2011 10

Page 11: Web Quick Start with Tribloom: A tale of two wqs implementations

Surf Override File Structure (cont)

12/6/11 © Tribloom, Inc. 2011 11

Page 12: Web Quick Start with Tribloom: A tale of two wqs implementations

How Do You Customize WQS? (WQS API)

WQS API !  The WQS API is written in Java and uses Spring !  Create subclasses as necessary and load them using

Spring !  Subclass:

!  Spring bean:

12/6/11 © Tribloom, Inc. 2011 12

Page 13: Web Quick Start with Tribloom: A tale of two wqs implementations

How Do You Customize WQS? (WQS API)

!  Can build against WQS client API jar !  /webapps/wcmqs/WEB-INF/lib/*

!  May need to download the WQS source code and modify classes for extension !  Before:

!  After:

12/6/11 © Tribloom, Inc. 2011 13

Page 14: Web Quick Start with Tribloom: A tale of two wqs implementations

The Website

!  Platform !  The good !  The bad

!  Publishing !  Customization details

!  Theme !  Pages, Templates,

& Components ! Webscripts !  Information schema !  Image gallery

12/6/11 © Tribloom, Inc. 2011 14

Page 15: Web Quick Start with Tribloom: A tale of two wqs implementations

The Platform

!  SUSE Linux 11.1 !  MySQL 5.5.8 !  Tomcat 6.0.29 !   Java 1.6.0_24 !  Alfresco 3.4.2 initially, later Alfresco 3.4.3

!  There is a CMIS bug in 3.4.2

12/6/11 © Tribloom, Inc. 2011 15

Page 16: Web Quick Start with Tribloom: A tale of two wqs implementations

Old New

12/6/11 © Tribloom, Inc. 2011 16

WQS Implementation #1 – The Website

Page 17: Web Quick Start with Tribloom: A tale of two wqs implementations

The Website

The Best Of Times !  OOTB Finance and Government sites easy to modify !  Very little customization !  Most work was creating theme from static designs

12/6/11 © Tribloom, Inc. 2011 17

Page 18: Web Quick Start with Tribloom: A tale of two wqs implementations

The Website

The Worst Of Times !  Download documents does not work OOTB (in IE)

(this has been fixed in later versions) !  Publishing from editorial to live is not cross server

OOTB, only simple single server publishing is supported OOTB without customization

12/6/11 © Tribloom, Inc. 2011 18

Page 19: Web Quick Start with Tribloom: A tale of two wqs implementations

Single Server Publishing

Supported OOTB !  Transfer Service used

internally for Editorial to Live publishing

12/6/11 © Tribloom, Inc. 2011 19

Page 20: Web Quick Start with Tribloom: A tale of two wqs implementations

Two Server Publishing

Not Supported OOTB !  Option 1: Replicate

Editorial to Delivery and republish from Editorial to Live there

!  Option 2: Publish on Editorial and transfer from Editorial to Delivery !  Use

onEndInboundTransfer policy to hook into Editorial Editorial to Live transfer and begin transfer to Delivery Live

12/6/11 © Tribloom, Inc. 2011 20

Page 21: Web Quick Start with Tribloom: A tale of two wqs implementations

Website Customization Details

!  Theme !  Duplicate existing theme and modify CSS and

images /webapps/wcmqs/css/<theme>/* !  styles.css !  Some image files

!  Create custom pages, templates, components and webscripts

12/6/11 © Tribloom, Inc. 2011 21

Page 22: Web Quick Start with Tribloom: A tale of two wqs implementations

Surf Page

!  Surf page XML binds to a URI !  Defines template instance !  Defines components

12/6/11 © Tribloom, Inc. 2011 22

Page 23: Web Quick Start with Tribloom: A tale of two wqs implementations

Surf Template and Template Instance

12/6/11 © Tribloom, Inc. 2011 23

!  Defines template !  Defines components

!  Defines regions

Page 24: Web Quick Start with Tribloom: A tale of two wqs implementations

Webscript

!  Descriptor

!  Controller

12/6/11 © Tribloom, Inc. 2011 24

Page 25: Web Quick Start with Tribloom: A tale of two wqs implementations

Webscript (cont)

!  View

12/6/11 © Tribloom, Inc. 2011 25

Page 26: Web Quick Start with Tribloom: A tale of two wqs implementations

Website Customization Details (cont)

!  WQS Share site information schema !  Create folders and collections (i.e. for image

collections on the side of each page)

12/6/11 © Tribloom, Inc. 2011 26

Page 27: Web Quick Start with Tribloom: A tale of two wqs implementations

Website Customization Details (cont)

!   Image Gallery !  WQS already uses LightBox, incorporated it into

site to allow image gallery functionality

12/6/11 © Tribloom, Inc. 2011 27

Page 28: Web Quick Start with Tribloom: A tale of two wqs implementations

The Intranet

!  The good !  The bad !  Customization details

!  Non WQS content !  Content model !  Object diagram !  Policies !  API extenstions !  Pages, Templates,

& Components !  Searcy query

!  Information Schema

12/6/11 © Tribloom, Inc. 2011 28

Page 29: Web Quick Start with Tribloom: A tale of two wqs implementations

Old New

12/6/11 © Tribloom, Inc. 2011 29

WQS Implementation #2 – The Intranet

Page 30: Web Quick Start with Tribloom: A tale of two wqs implementations

The Intranet

The Best of Times !   It is easy to use the WQS API to access properties of

content that are not directly exposed via the API !   It is easy to override the search query

12/6/11 © Tribloom, Inc. 2011 30

Page 31: Web Quick Start with Tribloom: A tale of two wqs implementations

The Intranet

The Worst of Times !  The WQS API needed some changes in order to

usefully extend the core classes (this has been fixed in later versions)

!  The Editorial to Live process does not work well with outside associations on WQS content, we needed to modify the process to re-create the association at the end of the transfer (this process is very similar to how you would create a two server publishing scheme)

12/6/11 © Tribloom, Inc. 2011 31

Page 32: Web Quick Start with Tribloom: A tale of two wqs implementations

Intranet Customization Details

!  Biggest customization to display non-WQS content !  Content model changes

!  New aspects (internal/external links) !  Custom WQS article subclass with association to Share

site content

12/6/11 © Tribloom, Inc. 2011 32

Page 33: Web Quick Start with Tribloom: A tale of two wqs implementations

Object Diagram

12/6/11 © Tribloom, Inc. 2011 33

fni:article fni:intranetContent

ws:article

fni:intranetExternalLink ws:image

fni:site

fni:app

Page 34: Web Quick Start with Tribloom: A tale of two wqs implementations

Intranet Customization Details

!  Behaviors (Policies) !  Automatically create content in WQS when aspect added,

move when renamed or moved (need to move not rename for QName path to be accurate) !  onAddAspect !  onMoveNode

!  Automatically delete content from WQS when aspect removed or deleted !  onRemoveAspect !  beforeDeleteNode

!  Extensions to WQS API to handle non-WQS content !  AssetFactoryWebscriptImpl !  AssetImpl

12/6/11 © Tribloom, Inc. 2011 34

Page 35: Web Quick Start with Tribloom: A tale of two wqs implementations

Intranet Customization Details (cont)

!  Custom components and webscripts to display !  Search modifications (updated query to include

associated non-WQS content) !  Duplicate

org.alfresco.module.org_alfresco_module_wcmquickstart.webscript.AssetSearch with corresponding descriptor

!  Other customizations !  Custom components and webscripts for “Apps”,

“Corporate Sites”, and FAQ !  Create folders and collections to easily maintain

12/6/11 © Tribloom, Inc. 2011 35

Page 36: Web Quick Start with Tribloom: A tale of two wqs implementations

Conclusion

!  Building websites is quick and relatively painless using WQS

!  Since WQS uses Surf for a front end OOTB, it is easy to learn and requires little coding to create a custom feeling website

!  WQS provides easy management of website content for end users

12/6/11 © Tribloom, Inc. 2011 36

Page 37: Web Quick Start with Tribloom: A tale of two wqs implementations

Demo

12/6/11 © Tribloom, Inc. 2011 37

Page 38: Web Quick Start with Tribloom: A tale of two wqs implementations

Q&A

12/6/11 © Tribloom, Inc. 2011 38