EpiServer CMS 5 R2:自定义页面提供程序 - 正确的选择?

发布于 2024-07-13 11:57:02 字数 1446 浏览 14 评论 0原文

我在一个新项目中使用 EpiServer CMS 5R2。 我的任务是创建一个 CustomPageProvider 来链接到我们无法控制的现有后端存储。 然而,查看示例提供程序(XmlPageProvider),该提供程序似乎负责维护 EpiServer 所需的元信息(来自 example.xml 文档):

<page id="10011" parent="10010" pagetypeid="3" versionid="1" security="Everyone:Read;Administrators:Create,Edit">
  <property name="PageGUID">35a988fe-2bc1-4e45-a41f-3a009a660551</property>
  <property name="PageTypeID">3</property>
  <property name="PageWorkStatus">4</property>
  <property name="PageFolderID">118</property>
  <property name="PageTypeName">[Public] Standard page</property>
  <property name="PageMasterLanguageBranch">en</property>
  <property name="PageLanguageBranch">en</property>
  <!---- SNIP! ---->
  <property name="Heading">A subpage</property>
  <property name="MainBody"><p>an external subpage</p></property>
  <property name="SecondaryBody"><p>second body</p></property>
  <property name="MetaAuthor">John Doe</property>
</page>

我对此有点担心,因为我希望 EpiServer 负责这个的。 这是一个大容量网站,如果我的服务不必包含额外的数据存储来维护这些信息,那就太好了,至少可以说,会存在缓存能力问题。

因此,问题是:

  1. 自定义页面提供程序是否适合该工作?

  2. 如果是这样,有没有办法把这个责任推回到 EpiServer 上?

  3. 如果没有,您能给我一些关于如何最好地存储这些数据的建议吗? 因为它超出了我们的数据源的范围。

非常感激!

罗伯特·史蒂文森-莱格特

I'm using EpiServer CMS 5R2 on a new project. I've been tasked with creating a CustomPageProvider to link to an existing back end store which we don't have control of. However looking at the sample provider (XmlPageProvider) it appears that the provider is responsible for maintaining the meta information that EpiServer needs for example (from the examples.xml document):

<page id="10011" parent="10010" pagetypeid="3" versionid="1" security="Everyone:Read;Administrators:Create,Edit">
  <property name="PageGUID">35a988fe-2bc1-4e45-a41f-3a009a660551</property>
  <property name="PageTypeID">3</property>
  <property name="PageWorkStatus">4</property>
  <property name="PageFolderID">118</property>
  <property name="PageTypeName">[Public] Standard page</property>
  <property name="PageMasterLanguageBranch">en</property>
  <property name="PageLanguageBranch">en</property>
  <!---- SNIP! ---->
  <property name="Heading">A subpage</property>
  <property name="MainBody"><p>an external subpage</p></property>
  <property name="SecondaryBody"><p>second body</p></property>
  <property name="MetaAuthor">John Doe</property>
</page>

I'm a little concerned by this as I would prefer EpiServer takes care of this. This is a high volume website and it would be nice if my services didn't have to contain an extra data store in order to maintain this information, there will be cacheability concerns to say the least.

So, questions:

  1. Is a custom page provider the right tool for the job?

  2. If so, is there a way to push this responsibility back onto EpiServer?

  3. If not, can you give me any recommendations on how best to approach storing this data? As it is over and above what will be coming from our data source.

Much appreciated!

Robert Stevenson-Leggett

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

_蜘蛛 2024-07-20 11:57:02

从我在 EpiServer CMS 论坛上提出的问题得到了这个:
http://world.episerver.com/Forum/ Pages/thread.aspx?id=27574&pageIndex=1

RE:自定义页面提供商发帖者:
约翰·比约恩福特 (Johan Björnfot) 于 2009 年 2 月 3 日,
13:43:28

您不必存储任何元数据
后端存储中的信息。
有辅助方法
PageProviderBase,例如
InitializePageData(设置元数据
属性)和 SetPropertyValues
(设置元和/或自定义属性)
这可以帮助您初始化
PageData 对象。

所以你的问题的答案:

  1. 听起来 PageProvider 很适合您的目的。

  2. 使用InitializePageData来处理MetaData(InitializePageData将设置
    元属性的默认值
    例如状态已发布等)。
    但是如果您想将圆顶设置为其他
    元数据属性值比
    默认状态,例如状态(发布
    等)你可以通过调用来做到这一点
    然后设置PropertyValues。

  3. 如果需要将其他数据存储在后备存储之外
    有几个选项(自定义
    数据库中的表、基于文件的表等)。 哪个
    使用哪个取决于您
    环境,要存储的数据类型
    等等

Got this from my question at the EpiServer CMS forum:
http://world.episerver.com/Forum/Pages/thread.aspx?id=27574&pageIndex=1

RE:Custom Page Providers Post by:
Johan Björnfot on 03 February 2009,
13:43:28

You do not have to store any meta
information in your backend storage.
There is helper methods in
PageProviderBase, e.g.
InitializePageData (sets metadata
properties) and SetPropertyValues
(sets meta and/or custom proeprties)
that helps you with initialization of
PageData objects.

So the answers to your questions:

  1. It sounds like PageProvider could fit well for your purpose.

  2. Use InitializePageData to handle MetaDatas (InitializePageData will set
    default values for meta properties
    e.g. status to published and so on).
    If you however want to set dome other
    meta data property value than the
    default ones e.g. status (Publish
    etc.) you can do that by calling
    SetPropertyValues afterwards.

  3. If additional data needs to be stored outside backing storage there
    are several options for this (custom
    table in db, filebased etc.). Which
    one to use is dependent on your
    environment, type of data to store
    etc.

混吃等死 2024-07-20 11:57:02

要使用自定义页面提供程序还需要企业许可证,但许多客户没有。 这样您就不会忘记与客户核实该问题......

To use Custom Page Provider requires an enterprise license as well which many customers don't have. Just so you don't forget to check with the customer on that issue...

强辩 2024-07-20 11:57:02

您仍然需要处理管理页面 guid、id 和 url - 这对于外部数据存储来说可能很棘手。 查找 MappedPageProvider - 它会为您处理所有这些事情。

You still have to deal with managing page guids, id's and urls - which can be tricky with external data stores. Look up the MappedPageProvider - it takes care of all that for you.

浪荡不羁 2024-07-20 11:57:02

页面提供程序是从外部数据源导入数据的好方法,听起来好像它们可能适合您的情况。

也就是说,我在这里要小心,因为您必须安装大量管道,并且必须非常注意大型数据源的性能。

准确理解 EPiServer 何时以及如何请求页面数据非常重要 - 即何时使用页面缓存以及何时尝试访问数据源。 最终,您将必须以可有效搜索的格式缓存有关页面的大量信息,特别是在数据源的链接相对较慢的情况下。

这里有一个关于此问题的非常全面的讨论:EPiServer 页面提供程序和性能

Page providers are a great way of piping in data from an external data source and they sound asthough they may be appropriate in your case.

That said, I'd be careful here as there is quite a lot of plumbing that you have to put in place and you have to take considerable care over performance for large data sources.

It's important to understand exactly when and how EPiServer asks for page data - i.e. when it uses the page cache and when it tries to hit the data source. Ultimately you will have to cache quite a lot of information about your pages in a format that can be efficiently searched, particularly if the link to your data source is relatively slow.

There's a pretty comprehensive discussion about this here: EPiServer page providers and performance.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文