OAF_架构MVC系列1 - MVC的概述(概念)
2015-04-03 Created By BaoXinjian
MVC概要解析
1. Model
BC4J(Business Components For Java) have three basic component classes:
Application Module - a container for related BC4J Object
Entity Objects - encapsulate business rules
View Objects - present data to the Framework page
BC4J is used to Business Logic and Data Handling Model
1.1 Entity Objects (EO)
Entity Objects are generally based on one table which encapsulate the business rules. These objects are used by OAF page to perform update/insert/delete operations. You can join two EOs using Entity Associations.
1.2 View Objects (VO)
These objects contain a SQL query that queries the data from database and present it in the OAF page. VOs can be based on one or many EOs or a SQL query. Two VO can be linked together through a View Link.
1.3 Application Module (AM)
It is a very important component for the package, it is the one which governs the entire session pool, access to database and the business logic components, every page should be attached to some AM.
It is a container for related BC4J objects and provides the database connection. It also provides Transaction Context (OADBTransaction) or Transaction Management. An AM can have more nested AM contained in it along with other BC4J components. But it is mandatory to have an AM for an OAF page.
2. View
View contains the actual page items on page which user can see.
The view in OAF comprises of various page level items like text fields, buttons, regions, links etc. These items are visible on any OAF page.
These items can either be tied to VO attribute or having a constant value or populated at run time based through controller logic.
Please note that- View Layer is altogether different than View Object!!!!!
3. Controller
3.1 Controller:Controlling UI Behavior, You can override controller classes to:
Manipulate the UI at runtime
Manually initialize data items
Intercept and handle user events like button clicks
3.2 Controller handles all the user actions done on the page. OAF requires a java controller class to be defined for a page/region which handles various page level actions. The important methods in this class are:
a. ProcessRequest
This request is called when page is rendered. Any logic to be executed during page initialization is kept here.
b. ProcessFormRequest
Any page submit action causes ProcessFormRequest to be executed.
The logic put here typically is that which needs to be executed after actions like button click or any other page submit action.
The Controller class is mostly used to put logic for actions on page such as button clicks, navigation to other pages.
The two objects that are passed to controller methods are OAPageContext and OAWebBean.
OAPageContext provides access to objects like AM class, page parameters, session values, navigation methods.
OAWebBean is generally used to get a handle of page items.
Thanks and Regards
OAF_架构MVC系列1 - MVC的概述(概念)的更多相关文章
- 【.NET特供-第三季】ASP.NET MVC系列:MVC与三层图形对照
近期在开发小组在研究:BS项目中是利用'MVC框架'还是继续沿用'三层'的问题. 由于曾经的.NET项目大多数都是利用三层开发的,所以大多数人都可以对三层进行熟练地运用.而项目的開始我们也曾听说过MV ...
- 【.NET特供-第三季】ASP.NET MVC系列:MVC与三层图形对照(颠覆性理论)
在[.NET特供-第三季]系列博客中的第一篇<ASP.NET MVC系列:MVC与三层图形对照>发表之后,引起了领导的注意.同一时候,开发小组内部在交流MVC和三层之间关系的 ...
- OAF_架构MVC系列3 - View的概述(概念)
2014-06-18 Created By BaoXinjian
- OAF_架构MVC系列4 - Control的概述(概念)
2014-06-18 Created By BaoXinjian
- OAF_架构MVC系列2 - Model的概述(概念)
2014-06-22 Created By BaoXinjian
- MVC系列 引入MVC
1.必须的类库 system.web.Mvc system.Web.Razor system.web.webPages system.web.webpages.razor 添加方式如下图 2.MVC项 ...
- mvc项目架构分享系列之架构搭建初步
mvc项目架构分享系列之架构搭建初步 Contents 系列一[架构概览] 0.项目简介 1.项目解决方案分层方案 2.所用到的技术 3.项目引用关系 系列二[架构搭建初步] 4.项目架构各部分解析 ...
- Asp.net mvc项目架构分享系列之架构概览
Asp.net mvc项目架构分享系列之架构概览 Contents 系列一[架构概览] 0.项目简介 1.项目解决方案分层方案 2.所用到的技术 3.项目引用关系 系列二[架构搭建初步] 4.项目架构 ...
- Asp.net mvc项目架构分享系列之架构搭建初步
copy to:http://www.cnblogs.com/ben121011/p/5014795.html 项目架构各部分解析 Core Models IDAL MSSQLDAL IBLL BLL ...
随机推荐
- SVN代码提交冲突解决方案
SVN代码提交冲突解决方案 1.若你的代码被其他人修改并提交过了,期间你自己也修改过该文件,UPDATE的时候自己代码被覆盖. 右键——>显示日志 查看该文件的更新记录 找到需恢复的版本 右键— ...
- HDU-4089 Activation (概率DP求概率)
题目大意:一款新游戏注册账号时,有n个用户在排队.每处理一个用户的信息时,可能会出现下面四种情况: 1.处理失败,重新处理,处理信息仍然在队头,发生的概率为p1: 2.处理错误,处理信息到队尾重新排队 ...
- Oracle学习系列1
两个服务必须启动: OracleOraDb10g*TNListener 和 OracleService*** 使用sqlplusw先进行环境的设置 set linesize 300 ; set pag ...
- react 不能往组件中传入属性的值为 undefined
在使用 andt design 的时候遇到个需求,需要清除 Select 组件选中后的值,让它变成什么都没选中,显示 placeholder 刚开始以为设置为 null 即可,结果发现设置为 null ...
- java编程之:org.apache.commons.lang3.text.StrTokenizer
第一个api测试:按特殊符号进行分词,并遍历每一个分词部分 public static void main(String[] args) { String aString="AB-CD-EF ...
- linux查找目录下的所有文件中是否含有某个字符串
查找目录下的所有文件中是否含有某个字符串 find .|xargs grep -ri "IBM" find .|xargs grep -ri "IBM" -l ...
- 请让页面中的一个元素(10px*10px)围绕坐标(200, 300) 做圆周运动
<!DOCTYPE html> <html> <head> <title>Making things move</title> <me ...
- ASP.NET会话(Session)保存模式--终于知道session为什么丢失了
[原创]ASP.NET会话(Session)保存模式 作者:寒羽枫(cityhunter172) 大家好,已有四个多月没写东东啦.今日抽空就说一下 Session 在 .Net v1.0/v1.1 中 ...
- Axure轮播图
制作步骤如下: 1.新建一个动态面板,并添加几个动态面板状态(tab) 2.在所建的几个动态面板状态中添加要显示的每个广告的图片和相对应的代表第几个广告的数字. 3.添加页面交互事件.添加事件是在页面 ...
- Oracle数据库—— 事务处理与并发控制
一.涉及内容 1.理解事务的概念和几个特性. 2.熟练掌握事务管理命令的使用. 3.理解并发操作的概念和数据库锁的类型. 二.具体操作 (12.5 实验) 1. 分析以下代码,说出代码中的哪些部分体现 ...