版权所有:(xiaodaoxiaodao)蓝小刀    xiaodaoxiaodao@gmail.com

http://www.blogjava.net/xiaodaoxiaodao/archive/2007/09/17/145970.html

转载请注明来源/作者

 

 

翻译:Alfresco WCM Website Framework (WSF)

 

翻译原文来源于http://wiki.alfresco.com/wiki/WSF

翻译时间:This page was last modified 11:11, 10 September 2007

Wiki 的更新时间可以在页面最底部看到。

 

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

 

由于个人翻译水平经验有限,欢迎批评指正。

 

WSF

内容

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 当前是 Alfresco Forge Project下的一个项目,它的目标是为web站点构建一个基础的框架,当web开发人员使用Alfresco WCM创建新的web站点时,web站点可以基于这个框架进行开发。WSF基于GPL协议,版权归Alfresco所有。

注意: WSF 现在还在测试验证中,我们正在研究其他的更好的使用Alfresco WCM 进行站点开发的方法,所以在你考虑使用WSF 之前,最好三思。同时希望你能够提供一些反馈和意见,这对于我们会非常有用。我们的最终目标是为所有基于Alfresco WCM的应用建立一个健全可升级的平台。

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 开始开发 : 我们即将着手与WSF 下一个版本的开发,并且创建了一个wiki网页,用来记录开发目标和一些WSF Development的开发计划。
  • Roadmap 更新 : roadmap上添加了一些关于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 特性

  • 动态导航频道
    • 三层站点导航树:作为web内容被设计和管理。
    • 水平,垂直导航:DHTML 下拉菜单和breadcrumbs 面包屑式导航。
  • 内容列表
    • 最新内容:基于时间戳的内容列表。
    • 频道内容列表:某个频道的内容列表。
    • 多媒体文件列表:Flash Player文件列表视频和音频文件。
    • Alfresco 文档::传统alfresco 文档列表(通过Open Search自定义搜索引擎)
    • 特殊内容列表:在前端页面高亮显示指定的一篇文章。
  • 单个内容视图
    • 内容详细
    • 每日图片:支持多个图片幻灯片显示。
    • 每日消息:单个文本块。
  • 站点地图
    • 实现自Google网站地图
  • 站点树状显示
    • 显示所有的站点资源和属性。
  • 站点统计
    • 显示站点动态内容统计信息。
  • 地图Mashup
    • 显示基于Yahoo 地图的动态内容(用户代理)
  • 内容Syndication
    • Alfresco 文档feed 通过Open Search REST API.
    • Alfresco WCM RSS 格式的web 内容feed (文章)
  • 站点预览
    • 站点预览工具栏
  • 站点配置
    • 很多站点参数是可配置的:例如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服务器上拿到的代码含有一个demo-website.war 文件,位于"extra" 文件夹下。你可以自由使用这个war包并且跳过下面的三步。如果你希望从代码重新创建,那么继续往下读。
  2. 创建三个环境变量Setup three environment variables
    1. ALFRESCO_REPOSITORY – 指向你本地alfresco svn资源的根目录。
    2. TOMCAT_HOME – 指向你的alfresco tomcat根目录。
    3. VIRTUAL_TOMCAT_HOME – 指向你的virtual alfresco tomcat 根目录。
  3. 运行ant 脚本以便创建alfresco实例。.
  4. alfresco/core.目录中运行ant 脚本
    1. 如果你把ALFRESCO_REPOSITORY 指定到 Enterprise HEAD, 运行ant -f build-head.xml build-demo-website
    2. 指定到其它路径, 运行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.

上传站点和表单:

contentmodels 文件夹下使用XSD文件创建和配置新的web表单,并且在templates文件夹下关联到相应的XSLs文件。 当创建web表单之后,除了输出路径模式之外的其它值可以使用缺省值。

  1.  
    1. Web 表单: article.
      1. 内容输出路径模式: /${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. 内容输出路径模式: /${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. 内容输出路径模式: /${webapp}/content/multi-media/${name}.xml
      2. 模板: multi-media-list.xsl 输出路径模式: /${webapp}/content/multi-media/${name}-list.${extension}
    4. Web 表单: navigation.
      1. 内容输出路径模式: /${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. 内容输出路径模式: /${webapp}/content/motd/${name}.xml
      2. 模板: motd.xsl 输出路径模式: /${webapp}/content/motd/${name}.${extension}
    6. Web 表单: potd.
      1. 内容输出路径模式: /${webapp}/content/potd/${name}.xml
      2. 模板: potd.xsl 输出路径模式: /${webapp}/content/potd/${name}.${extension}
    7. Web 表单: profile.
      1. 内容输出路径模式: /${webapp}/content/profile/${name}.xml
      2. 模板: profile.xsl 输出路径模式: /${webapp}/content/profile/${name}.${extension}
    8. Web 表单: site-configuration.
      1. 内容输出路径模式: /${webapp}/content/site-configuration/${name}.xml
  2. 创建新的web工程,并把它关联到刚才创建的8web表单。
  3. 批量导入"demo-website.war" 文件。
  4. 使用site-configuration这个web表单创建一个站点配置,命名为SC并把它放到 "/content/site-configuration"文件夹下。你也可以创建一个临时文件,命名为SC,然后在其它文件夹下把它更新为SC.xml
  5. 使用navigation 这个web表单创建一个导航内容,命名为NavigationTree并把它放到"/content/navigation"文件夹下。同样的,你也可以创建一个临时文件,在其它文件夹下把它更新为NavigationTree.xml。 如果你希望使用别的名字,可以在SC.xml.文件中进行配置。
  6. 创建web 内容, MOTD, POTD, 新闻flash, 文章等等,并把它们放到"/content"下的相应文件夹下。为了让频道页面可以使用新闻flash 和文章,你需要编辑导航内容项并通过内容链接链接到它们 (如果希望它们可以作为特征项显示请查看特征选项).。对于MOTDs POTDs, 当你编辑它们的时候就可以关联到相应的频道。.

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.

导航地图

当我们关注WSF的进展时, 我们期望可以引入完全轮廓的web开发框架,AJAX 支持,widgetsUI皮肤模板,等等。

下面是一些想法:

  • Web 开发框架 : 这对于在WSF中集成一个或多个框架例如Tapestry, Cocoon, Struts, 等等会比较有用。一个关键的设计点,作为一个理想的MVC体系,我们不希望由于需要控制器的被编译而"slow down"开发过程。所以我们正在寻找Java可兼容的MVC web开发框架,这种框架可以提供动态语言支持。我们正倾向使用GroovyGrails.
  • 动态web站点 : 使用后台组件[Web脚本]和前台标签库实现动态内容选择。
  • UI 皮肤 : 我们希望通过CSSUI协定可以web站点的皮肤化处理更容易一些。
  • AJAX 支持 : 我们希望WSF具有更好的交互性,所以在内容模型和WCM搜索特性中使用AJAX DHTML技术比较理想。一些可行的小工具包括GWT, MooTools, YUI, Prototype, Dojo, 等等。
  • 内容Syndication Mashable API : 一个不支持syndication格式(RSSATOM)APIs (使用REST, XML, JSON)web框架在今天来说是不完善的。所以,一个syndicators APIs 的基础包对于开发人员来说非常有用。
  • 用户内容创建 : 支持注释,标签,可能还有博客等等。
  • 用户管理 : 这会非常友好,不过Alfresco WCM 有可能创建一个"站点联合",这就使用户管理变的比较重要。我们可以使用一些类似OSUser的东东作为其基础。

翻译原文来源于http://wiki.alfresco.com/wiki/WSF



翻译: Alfresco WCM Website Framework (WSF).pdf 下载地址:

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

   

 

版权所有:(xiaodaoxiaodao)蓝小刀    xiaodaoxiaodao@gmail.com