Skip to content

定义-Definitions

ARCHIVED

!注意“归档”

This chapter has not been updated for the current version of Orchard, and has been ARCHIVED.

Application

应用

An application is a packaged and ready to use specialized web site.

应用程序是一个打包且随时可用的专用网站。

Examples

例子

Our CMS application is one example of an application. Other examples include Blog, Wiki, Forum or Media Gallery.

我们的CMS应用程序是应用程序的一个示例。其他示例包括博客,Wiki,论坛或媒体库。

Contents

内容

An application can be downloaded as source code by developers, but the most common form will include a precompiled dll, images, stylesheets, theme files and possibly a selection of plug-ins.

应用程序可以由开发人员下载为源代码,但最常见的形式将包括预编译的dll,图像,样式表,主题文件以及可能的插件选择。

An application typically includes one or several packages (see definition below).

应用程序通常包括一个或多个包(请参阅下面的定义)。

Packaging

打包

Orchard applications can be deployed using WebPI, i.e. as MS-Deploy packages. They can also be xcopied into a web site.

可以使用WebPI部署Orchard应用程序,即作为MS-Deploy软件包。它们也可以被复制到一个网站上。

Package

A package is the deployment vehicle for all extensions. It is a versioned zip archive.

包是所有扩展的部署工具。它是一个版本化的zip存档。

Theme

主题

A theme is a packaged look and feel for the front-end of the application.

主题是应用程序前端的打包外观。

Themes are also sometimes called skins.

主题有时也被称为皮肤。

The most obvious way to personalize an application, themes provide a simple way to modify the structure and styling of the application markup. They should be easy to create, modify, install and switch. They should enable radical changes in presentation to the point where it would be difficult to tell what application technology is powering the site by looking at its UI or its markup.

个性化应用程序最明显的方法是,主题提供了一种简单的方法来修改应用程序标记的结构和样式。它们应该易于创建,修改,安装和切换。它们应该能够在演示中进行彻底的改变,以便通过查看UI或其标记来判断哪些应用程序技术为站点提供动力。

Contents

内容

A theme usually consists of a file that contains the meta-data and possibly some helpers, a CSS file, images and markup files. Some if not most of the markup files are templates.

主题通常由包含元数据的文件和可能的一些帮助程序,CSS文件,图像和标记文件组成。一些(如果不是大多数)标记文件是模板。

Packaging

打包

The theme can either be exploded into its constituent files or can be uploaded under zipped form.

主题可以分解为其组成文件,也可以以压缩形式上传。

Template

模板

A template is a file that contains only structural markup, but no content-specific markup. For example, a template file may describe a two-column layout. In that case, it would contain a place holder for each of the two columns but it does not specify what contents goes into them. This enables templates to be used to display a wide variety of contents. It enables the separation of layout from contents.

模板是仅包含结构标记但不包含特定于内容的标记的文件。例如,模板文件可以描述两列布局。在这种情况下,它将包含两列中每一列的占位符,但它没有指定进入它们的内容。这使模板可用于显示各种内容。它可以实现布局与内容的分离。

Contents

内容

A template is usually one aspx file that defines the markup for the template and the meta-data of the template (author, available zones, etc.). It can have stylesheet, image or other dependencies.

模板通常是一个aspx文件,它定义模板的标记和模板的元数据(作者,可用区域等)。它可以包含样式表,图像或其他依赖项。

Packaging

打包

A template is deployed as part of the views of the application, or as part of a theme or package.

模板作为应用程序视图的一部分进行部署,或作为主题或包的一部分进行部署。

Widget

窗口小部件

A widget is a self-contained piece of UI that can be injected into specific placeholders in application pages.

窗口小部件是一个独立的UI,可以注入应用程序页面中的特定占位符。

Widgets are similar to WebParts, and like WebParts can be added to predefined zones on the page but they are much simpler in implementation.

Widgets may surface the features of a plug-in or other feature of the application, and in many cases depend on underlying application or extended features.

窗口小部件可以显示应用程序的插件或其他功能的功能,并且在许多情况下取决于底层应用程序或扩展功能。

Examples

例子

Examples of widgets include:

小部件的示例包括:

  • category list

  • 类别清单 *

  • latest posts

  • 最新的帖子 *

  • ads

  • 广告 *

  • blogroll

  • 博客链接 *

  • search field

  • 搜索字段 *

  • rating UI

  • 评级UI *

Contents

内容

A widget is implemented as a code file (containing meta-data and code), a manifest and at least one user control (also sometimes called partial view in the context of MVC), and optionally an admin user control and resources such as CSS and image files. A widget may have its own controller and routes.

小部件被实现为代码文件(包含元数据和代码),清单和至少一个用户控件(有时也称为MVC上下文中的部分视图),以及可选的管理用户控件和资源,例如CSS和图像文件。小部件可能有自己的控制器和路由。

Packaging

打包

A widget can be either exploded into its different constituent files or packaged into a zip file and uploaded to the application under this form.

窗口小部件可以分解为其不同的组成文件,也可以打包成zip文件并上传到此表单下的应用程序。

A widget may be packaged together with its dependencies (such as a plug-in or other type of extension).

窗口小部件可以与其依赖项(例如插件或其他类型的扩展)一起打包。

Plug-in

插入

A Plug-in is a piece of code that hooks into a specific extensibility point of the application to add new features.

插件是一段代码,它挂钩到应用程序的特定扩展点以添加新功能。

Plug-ins are sometimes called add-ons, extensions or modules in other CMS platforms.

插件有时在其他CMS平台中称为加载项,扩展或模块。

Plug-ins do not typically expose UI of their own, but may come with one or several specialized widgets whose purpose is to surface their features.

插件通常不会公开自己的UI,但可能带有一个或几个专门的小部件,其目的是显示其功能。

Examples

例子

Examples of plug-ins include:

插件示例包括:

  • replacing emoticon character sequences with images

  • 用图像替换表情字符序列 *

  • spam protection

  • 垃圾邮件保护 *

  • profanity filters

  • 亵渎过滤器 *

  • order validation rules

  • 订单验证规则 *

  • comments

  • 评论 *

  • ratings

  • 评级 *

  • search

  • 搜索 *

  • payment

  • 付款 *

  • shipping

  • 运输 *

Code

The code of a simple plug-in looks like this:

简单插件的代码如下所示:

public class LiberalBiasPlugin {

    public string ProcessHTML(string input) {

        return input.Replace("fox", "NPR");

    }

}

Contents

内容

A plug-in is typically a single file written in C# (or in another .NET language). Other plug-in managers than the default reflection-based plug-in manager will be able to handle plug-ins written in IronPython or IronRuby, as well as plug-ins that are deployed as precompiled dlls.

插件通常是用C#(或另一种.NET语言)编写的单个文件。除了默认的基于反射的插件管理器之外的其他插件管理器将能够处理用IronPython或IronRuby编写的插件,以及部署为预编译dll的插件。

Packaging

打包

A plug-in may be deployed as a simple code file into app_code or as a class in a compiled dll deployed in bin or even in the GAC (although that last option is somewhat unlikely).

插件可以作为简单的代码文件部署到app_code中,也可以作为在bin中甚至在GAC中部署的已编译dll中的类(虽然最后一个选项不太可能)。

A plug-in's code file or dll may be distributed and installed as part of a packaged zip file that may contain one or several widgets and corresponding resources.

插件的代码文件或DLL可以作为打包的zip文件的一部分进行分发和安装,该文件可以包含一个或多个小部件和相应的资源。

Content-type

内容类型

A content-type is a top-level feature of the application such as blog or wiki, a collection of top-level content entities..

内容类型是应用程序的顶级功能,例如博客或wiki,顶级内容实体的集合。

Examples

例子

Examples of content-types include:

内容类型的示例包括:

  • Blog

  • 博客 *

  • Wiki

  • 维基 *

  • Forum

  • 论坛 *

  • Product

  • 产品 *

  • Media

  • 媒体 *

Packaging

打包

A content-type is typically deployed as part of a package.

内容类型通常作为包的一部分进行部署。

Content Item

内容项目

A content item is a unit of contents in a content-type.

内容项是内容类型中的内容单元。

An item is a concept that is close to an entity but more centered around the idea of contents (as in contents management). An item can appear in a list but will also typically have its own page in the site.

项目是一个接近实体的概念,但更多地以内容的概念为中心(如内容管理)。项目可以显示在列表中,但通常也会在站点中拥有自己的页面。

Examples

例子

Examples of items include:

项目示例包括:

  • Blog post

  • 博客文章 *

  • Product

  • 产品 *

  • Photo

  • 照片 *

  • Video

  • 视频 *

  • CMS page

  • CMS页面 *

Contents and packaging

内容和包装

Items cannot be dissociated from their type.

物品不能与其类型分离。

Content part

内容部分

A content part is a feature that can enrich any existing content-types without prior knowledge of the content part by the content-type or by the content-type from the content part.

内容部分是可以在没有内容部分的先验知识的情况下通过内容部分或内容部分的内容类型来丰富任何现有内容类型的特征。

Examples

例子

Examples of content parts include:

内容部分的示例包括:

  • Search

  • 搜索 *

  • Tagging

  • 标记 *

  • Comments

  • 评论 *