Chapter 2: Working with OFBiz

特别注意:OFBiz版本是Release 4.0,其他版本的可能会导致显示不正确的问题!!


Create Our First Webapp


在ofbiz-compnent.xml中,有着如下定义:
<webapp name="practice"
title="Practice"
server="default-server"
base-permission="OFBTOOLS"
location="webapp/practice"
mount-point="/practice"
app-bar-display="true"/>

需要注意的是,这里的title,影响的是menu bar上的显示:


如果我将title改成Practice11111,重启ofbiz后,显示就编变成了:


MVC of OFBiz


M - Model, static, refers to the data structure of the software. A "model" is a collection of data entities in a network of relationships with one another.

The  Model in OFBiz is defined in ${component:party}\entitydef\entitymodel.xml. Each OFBiz component can have one (or zero) of such folders.

V - View, static, that is, the user-interface.static.

When using the OFBiz widget technology, user-interface definitions reside in folders named widget.

When using HTML or FTL technologies, user-interface definitions should reside in folders named webapp.


C - Controller, dynamic, refers to the wiring between the Model and the View, defines business logic and work flow of software.

When using pure Java, business logic definitions should reside in folders named src .

When using Minilang or BeanShell, business logic definitions usually reside in folders named script, and also in the folder WEB-INF\actions inside webapp.

When using Event-Condition-Action (ECA), business logic is defined in the folder servicedef, in file seca.xml or eeca.xml.

When using OFBiz Services, business logic definitions span over the folders servicedef and script. In the folder servicedef, files with names starting "services" (for example services.xml, service_view.xml) declare the usage pattern of services. Complementing that, in the folder script or src , we have the actual implementation or definition of those services. script和src中才是具体实现!

The files controller.xml and web.xml in the folder WEB-INF are also considered controller components in the MVC architecture.




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值