DotNetNuke Skinning Whitepaper 翻译记录(总揽部分)

  翻译: 

总览

 

DotNetNuke崇尚简单原则,简单在不同的应用领域有不同的解释,在DotNetNuke中,我们的目标是使复杂的皮肤体系有一个人性化的表现——在使用和管理上简易方便。另外,性能是任何web应用程序的一个关键的问题,因此,我们在这个标准中多次强调这一点。好消息是在DotNetNuke 的皮肤体系中兼具优越的性能和简易性,这在一些案例中已经被证明。

 

在底层技术上,ASP.NET用户控件明显优越于模版管理。因为用户控件是经过编译的,这在性能上明显高于解释型语言。从后台编码的业务逻辑中提取表现层也是一个关键的特点。

 

为了使创建皮肤对web设计者来说尽可能的简单而且灵活,我们决定使用纯粹的HTML来定义皮肤。这样做的好处是设计者可以使用他们习惯的工具来创建和维护皮肤。我们定义了一些占位符来将皮肤对象从静态标记中分离出来,设计者可以在设计完成后插入到他们的皮肤中。占位符就是如[TOKEN] 一样的简单文本,它和皮肤对象是一一对应的。为了减轻在替换过程中的性能损失,我们建立了一套简单的皮肤上传机制来进行这种替换生成可以直接由DotNetNuke表现出来的用户控件。这个预处理仅在皮肤上传过程中执行一次。这个方法让我们享受用户控件在性能上的优势而且满足了web设计者与web开发者独立开发的需求。

 

在布局方面,DotNetNuke允许皮肤设计者自由的组织他们想要的页面布局。为了将内容模块插入页面,设计者可以创建任意数量的可以放置模块的内容栏。这种自由的方法提供了在界面设计上的灵活性,但同时也在无缝集成即插即用的皮肤系统上增加了一定的复杂性。为了达到真正的即插即用,每个皮肤的布局,名称,内容栏的数量必须是协调的。

 

大多数皮肤解决方案都存在一个弱点,那就是皮肤组件总是去定义他自己的布局和外观表现。在DotNetNuke 中,内容模块向这种体系提出了强有力的挑战,通过复杂的内容模块和大量的函数来表达一个单一的控件,使得控件至少包含了一部分布局特性。这就严格限制了他的使用,必须依赖于皮肤的指定区域 ( 比如他可以仅被插入到一个大的皮肤栏目中)。更糟糕的是如果一个内容模块包含静态的文字,颜色,图片或者样式,这就更限制了他在皮肤解决方案中的作用。


 原文:

Overview

 

One of the guiding principles in DotNetNuke is simplicity. This principle has different interpretations in different application areas but in terms of skinning, the goal was to expose a complex architecture in a manner which was simple to use and manage. In addition, a critical aspect of any web application is performance; therefore, a great deal of emphasis was placed on this criteria as well. The good news is that simplicity often compliments performance and in the case of DotNetNuke skinning, this definitely proved to be the case.

 

In terms of base technology, the benefits of ASP.NET user controls were a clear winner in terms of template management. The fact that user controls are compiled provides a definite advantage over parsed or interpretive methods in terms of performance. The abstraction of the presentation from business logic in the “code-behind” is also a key feature.

 

To make the process of creating skins as simple and flexible as possible to web designers we decided to use pure HTML as the basis of the skin definition. This allows designers to use their tool of choice for creating and maintaining skins. We defined some placeholders to separate the skin objects from the static markup which designers can then include in their skin. Placeholders are simply [TOKEN] text which uniquely identify a skin object. To mitigate the performance impact of replacing these placeholders at runtime, we created a simple skin upload mechanism which does the substitution of placeholders with the skin objects to produce a user control file which can then be rendered by the engine. This pre-processing occurs only once when the skin is uploaded.  This technique provides us with the performance benefit of user control skinning yet also includes the abstraction necessary for web designers to work independently from web developers.

 

In terms of layout, DotNetNuke uses a free-form skinning approach which allows the skin designer to organize the page in any layout they desire. For injection of content modules into the page, the designer can create an unlimited number of content panes which can be associated to the placement of modules in the database. This free-form approach offers the ultimate in design flexibility but also imposes some complications in terms of seamless plug-and-play skinning. For true plug-and-play, the layout, name, and quantity of content panes would have to consistent in each skin.

 

The Achilles Heel of any skinning solution is a component which attempts to define its own static layout or presentation. In DotNetNuke, content modules represent the biggest challenge to the skinning architecture. Depending on the complexity of the content module and the number of functions it attempts to expose in a single control, it is highly likely that it at least includes some embedded layout characteristics. This severely limits its usage in a skin depending on its footprint ( ie. it may only fit inside of larger skin panes ). Even worse is when a content module embeds static font, color, images, or styles as it severely reduces the effectiveness of the skinning solution.

DotNetNuke Skinning Whitepaper 翻译记录:
DotNetNuke Skinning Whitepaper 翻译记录(简介部分)
DotNetNuke Skinning Whitepaper 翻译记录(术语与win客户端程序部分)
DotNetNuke Skinning Whitepaper 翻译记录(技术部分)
DotNetNuke Skinning Whitepaper 翻译记录(定义部分)
DotNetNuke Skinning Whitepaper 翻译记录(DotNetNuke部分)

你可能感兴趣的:(dotnetnuke)