版權(quán)所有:(xiaodaoxiaodao)藍(lán)小刀 ?? xiaodaoxiaodao@gmail.com

http://www.tkk7.com/xiaodaoxiaodao/archive/2007/09/17/145970.html

轉(zhuǎn)載請(qǐng)注明來源/作者

?

?

翻譯:Alfresco WCM Website Framework (WSF)

?

翻譯原文來源于http://wiki.alfresco.com/wiki/WSF

翻譯時(shí)間:This page was last modified 11:11, 10 September 2007

Wiki 的更新時(shí)間可以在頁面最底部看到。

?

第一次把英文的東西付諸于文字,恭喜自己一下先:)

?

由于個(gè)人翻譯水平經(jīng)驗(yàn)有限,歡迎批評(píng)指正。

?

WSF

內(nèi)容

Alfresco WCM Website Framework (WSF)

The Alfresco Website Framework is (currently) an Alfresco Forge Project whose goal is to produce a basic website framework/skeleton that provides web developers a starting point for building new websites using Alfresco WCM. The WSF is Copyright of Alfresco and licensed under GPL.

Important Note: The WSF should currently be considered and viewed as an experimental playground as we explore ways of developing a series of best practices and design patterns for Alfresco WCM site development. Please keep this in mind as you begin to explore the WSF. Your feedback and suggestions are critical to the project's success. The eventual goal is to turn these into a robust and scalable platform for all Alfresco-based WCM activities.

Alfresco WCM Website Framework (WSF)

Alfresco Website Framework 當(dāng)前是 Alfresco Forge Project下的一個(gè)項(xiàng)目,它的目標(biāo)是為web站點(diǎn)構(gòu)建一個(gè)基礎(chǔ)的框架,當(dāng)web開發(fā)人員使用Alfresco WCM創(chuàng)建新的web站點(diǎn)時(shí),web站點(diǎn)可以基于這個(gè)框架進(jìn)行開發(fā)。WSF基于GPL協(xié)議,版權(quán)歸Alfresco所有。

注意: WSF 現(xiàn)在還在測(cè)試驗(yàn)證中,我們正在研究其他的更好的使用Alfresco WCM 進(jìn)行站點(diǎn)開發(fā)的方法,所以在你考慮使用WSF 之前,最好三思。同時(shí)希望你能夠提供一些反饋和意見,這對(duì)于我們會(huì)非常有用。我們的最終目標(biāo)是為所有基于Alfresco WCM的應(yīng)用建立一個(gè)健全可升級(jí)的平臺(tái)。

NEWS

  • WSF 2.0 Development to Commence : We're going to start working on the next version of WSF and have created a wiki page to capture our design goals and plan for achieving them at WSF Development.
  • Roadmap Updated : The roadmap has been updated with some new thoughts on the web presentation framework and some possible features.

新聞

  • WSF 2.0 開始開發(fā) : 我們即將著手與WSF 下一個(gè)版本的開發(fā),并且創(chuàng)建了一個(gè)wiki網(wǎng)頁,用來記錄開發(fā)目標(biāo)和一些WSF Development的開發(fā)計(jì)劃。
  • Roadmap 更新 : roadmap上添加了一些關(guān)于web表示層的新想法和一些可能的特性。

?

WSF Features

  • Dynamic Navigation Channels
    • Three-level site navigation tree: Modeled and managed as web content.
    • Horizontal, Vertical Navigation: DHTML drop down menus and breadcrumbs.
  • Content Lists
    • Latest Content: Content list based on timestamp
    • Channel Content List: List of content under centain channels/
    • Multimedia File List: Embedded Flash Player lists videos and audio files.
    • Alfresco Documents: Traditional alfresco document list (via Open Search)
    • Featured Content List: Highlight a specific article to be featured on the front page.
  • Single Content View
    • Content Details
    • Picture of The Day: Supports slide show of multiple pictures.
    • Message of The Day: Single text block.
  • Sitemap
    • Implements Google Sitemap
  • Site Treeview
    • Treeview of all site assets and their properties.
  • Site Statistics
    • Display metrics related to site dynamic content.
  • Map Mashup
    • Display dynamic content (user profile) on Yahoo map.
  • Content Syndication
    • Alfresco document feed via Open Search REST API.
    • Alfresco WCM web content feed (Articles) in RSS format.
  • Site Preview
    • Site Preview toolbar
  • Site Configuration
    • Many site parameters are configurable e.g. style, header, footer, navigation, tool bar, locale etc.

WSF 特性

  • 動(dòng)態(tài)導(dǎo)航頻道
    • 三層站點(diǎn)導(dǎo)航樹:作為web內(nèi)容被設(shè)計(jì)和管理。
    • 水平,垂直導(dǎo)航:DHTML 下拉菜單和breadcrumbs 面包屑式導(dǎo)航。
  • 內(nèi)容列表
    • 最新內(nèi)容:基于時(shí)間戳的內(nèi)容列表。
    • 頻道內(nèi)容列表:某個(gè)頻道的內(nèi)容列表。
    • 多媒體文件列表:Flash Player文件列表視頻和音頻文件。
    • Alfresco 文檔::傳統(tǒng)alfresco 文檔列表(通過Open Search自定義搜索引擎)
    • 特殊內(nèi)容列表:在前端頁面高亮顯示指定的一篇文章。
  • 單個(gè)內(nèi)容視圖
    • 內(nèi)容詳細(xì)
    • 每日?qǐng)D片:支持多個(gè)圖片幻燈片顯示。
    • 每日消息:?jiǎn)蝹€(gè)文本塊。
  • 站點(diǎn)地圖
    • 實(shí)現(xiàn)自Google網(wǎng)站地圖
  • 站點(diǎn)樹狀顯示
    • 顯示所有的站點(diǎn)資源和屬性。
  • 站點(diǎn)統(tǒng)計(jì)
    • 顯示站點(diǎn)動(dòng)態(tài)內(nèi)容統(tǒng)計(jì)信息。
  • 地圖Mashup
    • 顯示基于Yahoo 地圖的動(dòng)態(tài)內(nèi)容(用戶代理)
  • 內(nèi)容Syndication
    • Alfresco 文檔feed 通過Open Search REST API.
    • Alfresco WCM RSS 格式的web 內(nèi)容feed (文章)
  • 站點(diǎn)預(yù)覽
    • 站點(diǎn)預(yù)覽工具欄
  • 站點(diǎn)配置
    • 很多站點(diǎn)參數(shù)是可配置的:例如style, header, footer, navigation, tool bar, locale 等等。

Installation

1.? The code from the SVN server includes a pre-generated demo-website.war file under the "extra" folder. You can freely use this and skip the following three steps. If you wish to build from scratch, please read on.

2.? Setup three environment variables

1.? ALFRESCO_REPOSITORY -- points to the root folder of your local alfresco svn repository.

2.? TOMCAT_HOME -- points to your alfresco tomcat home folder.

3.? VIRTUAL_TOMCAT_HOME -- points to your virtual alfresco tomcat home folder.

3.? Run ant script to build your alfresco instance.

4.? Run ant script under alfresco/core.

1.? If you point ALFRESCO_REPOSITORY to Enterprise HEAD, run ant -f build-head.xml build-demo-website

2.? For others, run ant build-demo-website

安裝

  1. SVN服務(wù)器上拿到的代碼含有一個(gè)demo-website.war 文件,位于"extra" 文件夾下。你可以自由使用這個(gè)war包并且跳過下面的三步。如果你希望從代碼重新創(chuàng)建,那么繼續(xù)往下讀。
  2. 創(chuàng)建三個(gè)環(huán)境變量Setup three environment variables
    1. ALFRESCO_REPOSITORY – 指向你本地alfresco svn資源的根目錄。
    2. TOMCAT_HOME – 指向你的alfresco tomcat根目錄。
    3. VIRTUAL_TOMCAT_HOME – 指向你的virtual alfresco tomcat 根目錄。
  3. 運(yùn)行ant 腳本以便創(chuàng)建alfresco實(shí)例。.
  4. alfresco/core.目錄中運(yùn)行ant 腳本
    1. 如果你把ALFRESCO_REPOSITORY 指定到 Enterprise HEAD, 運(yùn)行ant -f build-head.xml build-demo-website
    2. 指定到其它路徑, 運(yùn)行ant build-demo-website

Uploading Site and Forms:

Create and configure new web forms with XSD files under folder contentmodels and associate them with the corresponding XSLs under folder templates. When setting up web forms, take all default values except for the Output path pattern.

1.?

??? 1.? Web form: article.

??????? 1.? Content output path pattern: /${webapp}/content/article/${name}.xml

2.? Template: article.xsl Output path pattern: /${webapp}/content/article/${name}.${extension}

3.? Template: article-list.xsl Output path pattern: /${webapp}/content/article/${name}-list.jsp

4.? Template: article-feature.xsl Output path pattern: /${webapp}/content/article/${name}-feature.jsp

5.? Template: article-rss.xsl Output path pattern: /${webapp}/content/article/${name}-rss.xml

??? 2.? Web form: news-flash.

??????? 1.? Content output path pattern: /${webapp}/content/news-flash/${name}.xml

2.? Template: news-flash.xsl Output path pattern: /${webapp}/content/news-flash/${name}.${extension}

3.? Template: news-flash-list.xsl Output path pattern: /${webapp}/content/news-flash/${name}-list.jsp

4.? Template: news-flash-feature.xsl Output path pattern: /${webapp}/content/news-flash/${name}-feature.jsp

??? 3.? Web form: multi-media.

??????? 1.? Content output path pattern: /${webapp}/content/multi-media/${name}.xml

2.? Template: multi-media-list.xsl Output path pattern: /${webapp}/content/multi-media/${name}-list.${extension}

??? 4.? Web form: navigation.

??????? 1.? Content output path pattern: /${webapp}/content/navigation/${name}.xml

2.? Template: navigation-sitemap.xsl Output path pattern: /${webapp}/content/navigation/${name}-sitemap.xml

3.? Template: navigation-menu.xsl Output path pattern: /${webapp}/content/navigation/${name}-menu.${extension}

??? 5.? Web form: motd.

??????? 1.? Content output path pattern: /${webapp}/content/motd/${name}.xml

2.? Template: motd.xsl Output path pattern: /${webapp}/content/motd/${name}.${extension}

??? 6.? Web form: potd.

??????? 1.? Content output path pattern: /${webapp}/content/potd/${name}.xml

2.? Template: potd.xsl Output path pattern: /${webapp}/content/potd/${name}.${extension}

??? 7.? Web form: profile.

??????? 1.? Content output path pattern: /${webapp}/content/profile/${name}.xml

2.? Template: profile.xsl Output path pattern: /${webapp}/content/profile/${name}.${extension}

??? 8.? Web form: site-configuration.

??????? 1.? Content output path pattern: /${webapp}/content/site-configuration/${name}.xml

??????? 2.? Create a new web project and associate it with all eight web forms we just created.

??????? 3.? Bulk import the "demo-website.war" file.

4.? Create a site-configuration content item using web form, site-configuration, and name it as SC and put it under "/content/site-configuration". You can just create a dummy one with the name SC and then update it with the SC.xml under extra folder.

5.? Create a navigation content item using web form, navigation, and name it as NavigationTree and put it under "/content/navigation". Again, you can just create a dummy one and update it with NavigationTree.xml under extra folder. If you want to use different name, you then need to adjust the navigation setting in SC.xml.

6.? Create web content, MOTD, POTD, News flash, Article etc. and put them under corresponding folders under "/content". To make news-flashes and articles available for channel pages, you need to edit your navigation content item and link them as content links (Check Feature option if you want them to be displayed as feature items). For MOTDs and POTDs, you can do the channel association when you edit them.

上傳站點(diǎn)和表單:

contentmodels 文件夾下使用XSD文件創(chuàng)建和配置新的web表單,并且在templates文件夾下關(guān)聯(lián)到相應(yīng)的XSLs文件。 當(dāng)創(chuàng)建web表單之后,除了輸出路徑模式之外的其它值可以使用缺省值。

  1. ?
    1. Web 表單: article.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/article/${name}.xml
      2. 模板: article.xsl 輸出路徑模式: /${webapp}/content/article/${name}.${extension}
      3. 模板: article-list.xsl 輸出路徑模式: /${webapp}/content/article/${name}-list.jsp
      4. 模板: article-feature.xsl 輸出路徑模式: /${webapp}/content/article/${name}-feature.jsp
      5. 模板: article-rss.xsl輸出路徑模式: /${webapp}/content/article/${name}-rss.xml
    2. Web 表單: news-flash.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/news-flash/${name}.xml
      2. 模板: news-flash.xsl 輸出路徑模式: /${webapp}/content/news-flash/${name}.${extension}
      3. 模板: news-flash-list.xsl 輸出路徑模式: /${webapp}/content/news-flash/${name}-list.jsp
      4. 模板: news-flash-feature.xsl 輸出路徑模式: /${webapp}/content/news-flash/${name}-feature.jsp
    3. Web 表單: multi-media.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/multi-media/${name}.xml
      2. 模板: multi-media-list.xsl 輸出路徑模式: /${webapp}/content/multi-media/${name}-list.${extension}
    4. Web 表單: navigation.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/navigation/${name}.xml
      2. 模板: navigation-sitemap.xsl 輸出路徑模式: /${webapp}/content/navigation/${name}-sitemap.xml
      3. 模板: navigation-menu.xsl 輸出路徑模式: /${webapp}/content/navigation/${name}-menu.${extension}
    5. Web 表單: motd.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/motd/${name}.xml
      2. 模板: motd.xsl 輸出路徑模式: /${webapp}/content/motd/${name}.${extension}
    6. Web 表單: potd.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/potd/${name}.xml
      2. 模板: potd.xsl 輸出路徑模式: /${webapp}/content/potd/${name}.${extension}
    7. Web 表單: profile.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/profile/${name}.xml
      2. 模板: profile.xsl 輸出路徑模式: /${webapp}/content/profile/${name}.${extension}
    8. Web 表單: site-configuration.
      1. 內(nèi)容輸出路徑模式: /${webapp}/content/site-configuration/${name}.xml
  2. 創(chuàng)建新的web工程,并把它關(guān)聯(lián)到剛才創(chuàng)建的8個(gè)web表單。
  3. 批量導(dǎo)入"demo-website.war" 文件。
  4. 使用site-configuration這個(gè)web表單創(chuàng)建一個(gè)站點(diǎn)配置,命名為SC并把它放到 "/content/site-configuration"文件夾下。你也可以創(chuàng)建一個(gè)臨時(shí)文件,命名為SC,然后在其它文件夾下把它更新為SC.xml
  5. 使用navigation 這個(gè)web表單創(chuàng)建一個(gè)導(dǎo)航內(nèi)容,命名為NavigationTree并把它放到"/content/navigation"文件夾下。同樣的,你也可以創(chuàng)建一個(gè)臨時(shí)文件,在其它文件夾下把它更新為NavigationTree.xml。 如果你希望使用別的名字,可以在SC.xml.文件中進(jìn)行配置。
  6. 創(chuàng)建web 內(nèi)容, MOTD, POTD, 新聞flash, 文章等等,并把它們放到"/content"下的相應(yīng)文件夾下。為了讓頻道頁面可以使用新聞flash 和文章,你需要編輯導(dǎo)航內(nèi)容項(xiàng)并通過內(nèi)容鏈接鏈接到它們 (如果希望它們可以作為特征項(xiàng)顯示請(qǐng)查看特征選項(xiàng)).。對(duì)于MOTDs POTDs, 當(dāng)你編輯它們的時(shí)候就可以關(guān)聯(lián)到相應(yīng)的頻道。.

Roadmap

As we look towards evolving WSF, we hope to introduce a full-featured web development framework, AJAX support, widgets, skinnable UI templates and more.

Here are some ideas:

  • Web Development Framework : It would be beneficial to integrate WSF with one (or more) web frameworks such as Tapestry, Cocoon, Struts, etc. One key design goal, however, is that while support for an MVC architecture is desirable, we don't want to "slow down" the development process by requiring that the controllers be compiled. As such we're looking for a Java-compatible MVC web development framework that perhaps leverages dynamic languages. We're leaning towards using Groovy and Grails.
  • Dynamic Website : Dynamic content selection using [Web Scripts] as the back-end components and a front-end tag library.
  • Skinnable UI : We wish to establish CSS and UI conventions that facilitate the process of "skinning" or branding the website.
  • AJAX Support : As we look to add more interactivity to WSF, it would be ideal to use AJAX and DHTML techniques and integrate them into the content model and upcoming WCM search features. Possible toolkits include GWT, MooTools, YUI, Prototype, Dojo, etc.
  • Content Syndication and Mashable APIs : No web framework in this day and age would be complete without support for syndication formats (RSS and ATOM) and APIs (using REST, XML, JSON). As such, a skeleton package of syndicators and APIs would be beneficial to developers.
  • User Generated Content : Support for comments, tagging, perhaps blogs, etc.
  • User Management : This is more of a nice-to-have, but it's possible to have Alfresco WCM offer the ability to create "community sites" as such user management becomes critical. We could use something like OSUser as the foundation for this.

導(dǎo)航地圖

當(dāng)我們關(guān)注WSF的進(jìn)展時(shí), 我們期望可以引入完全輪廓的web開發(fā)框架,AJAX 支持,widgetsUI皮膚模板,等等。

下面是一些想法:

  • Web 開發(fā)框架 : 這對(duì)于在WSF中集成一個(gè)或多個(gè)框架例如Tapestry, Cocoon, Struts, 等等會(huì)比較有用。一個(gè)關(guān)鍵的設(shè)計(jì)點(diǎn),作為一個(gè)理想的MVC體系,我們不希望由于需要控制器的被編譯而"slow down"開發(fā)過程。所以我們正在尋找Java可兼容的MVC web開發(fā)框架,這種框架可以提供動(dòng)態(tài)語言支持。我們正傾向使用GroovyGrails.
  • 動(dòng)態(tài)web站點(diǎn) : 使用后臺(tái)組件[Web腳本]和前臺(tái)標(biāo)簽庫(kù)實(shí)現(xiàn)動(dòng)態(tài)內(nèi)容選擇。
  • UI 皮膚 : 我們希望通過CSSUI協(xié)定可以web站點(diǎn)的皮膚化處理更容易一些。
  • AJAX 支持 : 我們希望WSF具有更好的交互性,所以在內(nèi)容模型和WCM搜索特性中使用AJAX DHTML技術(shù)比較理想。一些可行的小工具包括GWT, MooTools, YUI, Prototype, Dojo, 等等。
  • 內(nèi)容Syndication Mashable API : 一個(gè)不支持syndication格式(RSSATOM)APIs (使用REST, XML, JSON)web框架在今天來說是不完善的。所以,一個(gè)syndicators APIs 的基礎(chǔ)包對(duì)于開發(fā)人員來說非常有用。
  • 用戶內(nèi)容創(chuàng)建 : 支持注釋,標(biāo)簽,可能還有博客等等。
  • 用戶管理 : 這會(huì)非常友好,不過Alfresco WCM 有可能創(chuàng)建一個(gè)"站點(diǎn)聯(lián)合",這就使用戶管理變的比較重要。我們可以使用一些類似OSUser的東東作為其基礎(chǔ)。

翻譯原文來源于http://wiki.alfresco.com/wiki/WSF



翻譯: Alfresco WCM Website Framework (WSF).pdf 下載地址:

翻譯: Alfresco WCM Website Framework (WSF).rar

? ?

?

版權(quán)所有:(xiaodaoxiaodao)藍(lán)小刀 ?? xiaodaoxiaodao@gmail.com

?