写在前面:
转载请注明出处
- 什么是Pipeline?
Pipeline是由多个processor的一个组, Sitecore按一定顺序执行完所有Pipeline, 包括所有的processor来完成一个页面周期 - 什么是processor?
process就是.NET类里面的method, 是某个assemly里的function. - 为什么要写pipeline备忘录
在之前的开发中, 有时候需要对一个pipeline里面的processor添加一些功能, 或在processor之前做一些准备在进行processor时, 总是要通过搜索互联网来查一下到底要对哪个pipeline里的哪个processor进行修改最好, 而且网上也没有特别好的以列举方式的文章, 所以为了方便查阅pipelin和proccessors处在哪个阶段, 以便最快速度完成进度.
Sitecore HTTP request pipelines备忘录:
preprocessRequest:
SuppressFormValidation
NormalizeRawUrl
IIS404Hanlder
WebDAVCustomHandler
FIlterUrlExtensions
StripLanguage
RewriteUrl
OverrideDialogs
OverrideXmlControl
ResolveCLientPath
httpRequestBegin:
CheckIgnoreFlag
EnsureServerUrl
StartMeasurements
StartDiagnostics
IgnoreList
IgnoreBundleEntries
OnRequestBundleRegistrarProcessor
DisplayFatalErrors
SiteResolver
SetRuntimeSettings
CheckMode
UserResolver
ResolveUserFromRequest
EnableExperienceModePipeline
DatabaseResolver
BeginDiagnostics
DeviceResolver
PresetResolverPipeline
DevicePipeline
LanguageResolver
ResolveLanguage
CustomHandlers
FilterUrlExtensions
HandleActionRequest
QueryStringResolver
DynamicLinkResolver
AliasResolver
DefaultResolver
FileResolver
PreviewResolverPipeline
ItemResolver
HandleSimulationRequest
TransferRoutedRequest
LaunchRequest
ContextItemPipeline
ResolveContentLanguage
DeviceSimulatorResolver
LayoutResolver
TransferMvcLayout
TransferControllerRequest
CheckDevice
PageEditorHandleNoLayout
ExecuteRequest
renderField:
SetParameters
GetFieldValue
GetTextFiledValue
ExpandLinks
GetImageFieldValue
GetLinkFieldValue
GetInternalLinkFieldValue
GetMemoFieldValue
GetDateFieldValue
GetDocxFieldValue
GetIntegerFieldValue
GetNumberFieldValue
AddBeforeAndAfterValues
HighlightContentChange
ProtectedImageLinkRenderer
RenderWebEditing
虽然在融合之后的Sitecore.config中 (通过/showconfig.aspx查看), 在"renderField" pipeline之后是"httpRequestProcessed" pipelie, 但在实际的周期中其实是"renderLayout" pipeline。在"renderLayout"中, 有一些processeor是专门用来调用其他pipeline的, 譬如"startAnalytics"; 这些被调用的pipeline中也包含一些processor, 并在这些processor中再调用其他pipeline. 具体如下 (由于列表方式比较复杂, 所以改为xml):
renderLayout:
<renderLayout>
<CheckIgnoreFlag></CheckIgnoreFlag>
<PageHandlers></PageHandlers>
<SecurityCheck></SecurityCheck>
<StartAnalytics>
<CheckProconditions></CheckProconditions>
<CreateTracker>
<GetTracker></GetTracker >
</CreateTracker>
<StartTracking>
<JourneyPepeline></JourneyPepeline>
<RaiseStartTracking></RaiseStartTracking>
<InitializeTracker>
<IsMediaRequest></IsMediaRequest>
<CreateVisit>
<InitializeWithRequestData></InitializeWithRequestData>
<XForwardedFor></XForwardedFor>
<UpdateGeoIpData></UpdateGeoIpData>
<ParseReferrer>
<ParseGenericSearchEngine></ParseGenericSearchEngine>
</ParseReferrer>
<ParseSelfReferrer></ParseSelfReferrer>
<SetTrafficType></SetTrafficType>
<InitializeProfile></InitializeProfile>
<SetChannel></SetChannel>
</CreateVisit>
<CreatePage></CreatePage>
<EnsureNextPageData></EnsureNextPageData>
<Robots></Robots>
<RunRules></RunRules>
</InitializeTracker>
<TrackerInitialized></TrackerInitialized>
<UpdateGeoIpData></UpdateGeoIpData>
<GeoIpPipeline></GeoIpPipeline>
<ProcessQueryStringCampaign></ProcessQueryStringCampaign>
<ProcessQueryStringPageEvent></ProcessQueryStringPageEvent>
<ProcessQueryStringTriggers></ProcessQueryStringTriggers>
</StartTracking>
</StartAnalytics>
<EvaluateTestExposure></EvaluateTestExposure>
<PageLevelTestItemResolver></PageLevelTestItemResolver>
<ContentTestDataSourceResolver></ContentTestDataSourceResolver>
<InsertRenderings>
<GetItem></GetItem>
<GetLatestTestingItem></GetLatestTestingItem>
<AddPageDesignerRenderings></AddPageDesignerRenderings>
<AddRenderings></AddRenderings>
<Testing></Testing>
<EvaluateConditions></EvaluateConditions>
<Personalization></Personalization>
</InsertRenderings>
<PageExtenders></PageExtenders>
<ExpandMasterPages></ExpandMasterPages>
<BuildTree></BuildTree>
<InsertSystemControls></InsertSystemControls>
<InsertUnusedControls></InsertUnusedControls>
<BrowserCaching></BrowserCaching>
<InjectExperienceExplorerControlPipeline></InjectExperienceExplorerControlPipeline>
</renderLayout>
到此就Sitecore就完成了一个整个HTTP request的包含所有基本pipeline的周期!
本文介绍Sitecore HTTP请求周期中的关键Pipeline及Processor,包括预处理请求、解析客户端路径、设备识别等,帮助开发者理解并修改特定阶段的功能。

3625

被折叠的 条评论
为什么被折叠?



