Kentico中门户网站模板和ASPX模板之间的区别 [英] Difference between portal template and ASPX template in Kentico

查看:81
本文介绍了Kentico中门户网站模板和ASPX模板之间的区别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Kentico中的门户网站模板和ASPX模板有什么区别?

What is the difference between portal template and ASPX template in Kentico?

哪个更可取?

推荐答案

作为核心"开发人员和经过认证的Kentico培训师,我始终使用并始终建议在ASPX模板上使用Portal Engine.

我之所以这样说是因为门户引擎提供了丰富的UI,用于创建和配置模板.您可以直接在CMS Desk中创建模板并向其中添加Web部件.您还将获得一个不错的属性编辑器对话框,其中包含每个字段类型的自定义选择器以及每个字段的宏编辑器.这意味着,如果某个字段需要一个文档类型列表,则门户引擎属性"对话框将为您显示带有复选框的文档类型列表.再简单不过了.

I say that because the Portal Engine gives a rich UI for creating and configuring templates. From directly within the CMS Desk you can create templates and add web parts to them. You also get a nice property editor dialog with custom selectors for each field type, as well as the macro editor for each field. That means that if a field is expecting a list of document types, the Portal Engine Properties dialog will show you a list of document types with check boxes. It couldn't get easier.

另一个主要区别是(至少在当前), ASPX模板开发方法不支持小部件.我不确定这是否会在应于今年某个时候首次亮相的6.0版本中进行更改.

One other major difference is that (at least at this time), the ASPX template development method does NOT support widgets. I'm not sure if that will be changing in 6.0 which is supposed to debut sometime this year.

另一个巨大的好处是,受过专业培训的内容管理员可以对模板进行编辑.同样,如果他们经过适当的培训,则可以在CMS Desk的设计"选项卡中编辑模板.这可以减轻很多通常对开发人员来说过大的工作量.认为:嘿,开发人员,您可以更改此模板上的静态文本吗?"或嘿,开发人员,您可以将此Web部件移动到另一列吗?".

Another huge benefit is that properly trained content administrators have the ability to make edits to the templates. Again, if they're properly trained, they can edit the template in the design tab in the CMS Desk. That can alleviate a lot of work that normally is overkill for a Developer. Think: "Hey Dev, can you change the static text on this template?" or "Hey Dev, can you move this web part to the other column?".

要扮演魔鬼的拥护者,这是ASPX模板的优点.模板基本上是母版页,因此它们是基于文件的,可以轻松地与源代码管理结合使用.对于模板配置至关重要的代码繁重的站点(应用程序),这可能是一个更好的选择.

To play devil's advocate, here are the benefits of ASPX Templates. The Templates are basically master pages, so they are file based and can be easily used in conjunction with source control. This may be a better fit for a code-heavy site (application) where the configuration of the templates is critical.

使用ASPX模板,编写更复杂的代码可能会更容易.例如,如果一个Web部件(用户控件)直接取决于另一个Web部件的状态,则使用ASPX模板可以更轻松地完成此操作.但您也可能会争辩说,您的代码应更分离,而不要依赖模板:P

With ASPX templates it might be easier to write more complex code. For example, if one web part (User Control) directly depends on the state of another web part, then this would be more easily accomplished using ASPX Templates. But you could also argue that your code should be more decoupled and not rely on other web parts existing in the template :P

这篇关于Kentico中门户网站模板和ASPX模板之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆