Webx Turbine 中 valves查找资源的过程

WebxTurbine框架解析
本文介绍WebxTurbine框架的核心概念,包括映射、解释、target、URL到target的转换规则以及模板、布局和模块的具体作用。此外,还详细阐述了turbine如何通过target和不同valves来查找template、layout和module资源。

Webx Turbine

turbine使用约定大于配置的思想,规则是实现约定好的。webx turbine中有四个重要的概念:

概念映射解释
targetURL->targeturl映射成target,再根据不同valves,把target映射成不同的资源
templatetarget->templatetemplate为内容展示,可以是velocity,jsp等。
layouttarget->layoutlayout是具体的页面布局
moduletarget->modulemodule是具体的执行逻辑,可以使screen,actioncontrol,是具体的业务逻辑。

target映射关系

turbine通过target和不同valves查找应用的template,layout,module资源。不同的valves查找的规则不同,webx维护一个查找映射关系:
关系如下:

keyvalue(对应类)
extension.inputExtensionMappingRule
extension.outputExtensionMappingRule
actionDirectModuleMappingRule
screenFallbackModuleMappingRule
screen.templateDirectTemplateMappingRule
screen.notemplateDirectModuleMappingRule
layout.templateFallbackTemplateMappingRule
control.notemplateDirectModuleMappingRule
controlFallbackModuleMappingRule
control.templateDirectTemplateMappingRule

其中Direct*类一般为直接映射,即直接按照xxx/yyy/zzz(xxx.yyy.zzz)查找template或者module。而Fallback*类查找方式:
xxx/yyy/zzz(xxx.yyy.zzz)
xxx/yyy/default(xxx.yyy.default)
xxx/default(xxx.default)
default(default)

常用valves与查找规则

valves对应类key
PerformScreenPerformScreenValvescreen.notemplate
PerformTemplateScreenPerformTemplateScreenValvescreen
RenderTemplateRenderTemplateValvescreen.template, layout.template
PerformActionPerformActionValveaction
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值