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 ...
随机推荐
- LeetCode() Valid Anagram 有问题!!!
为什么第一个通过,第二个不行呢? class Solution { public: bool isAnagram(string s, string t) { if(s.size() != t.size ...
- php文件删除
<?php $dirname="shangchuan/uploads"; deldir($dirname); function deldir($dirname){ if(fi ...
- HDU-5536 Chip Factory (字典树)
题目大意:给n个数,编号为1~n,取三个编号不同的数,使表达式(a+b)^c的值最大. 题目分析:将这n个数按二进制位建立一棵trie.枚举i.j的和,查询亦或最大值,但在查询之前要把i.j在trie ...
- JS构造函数详解
//构造函数 //使自己的对象多次复制,同时实例根据设置的访问等级可以访问其内部的属性和方法 //当对象被实例化后,构造函数会立即执行它所包含的任何代码 function myObject(msg) ...
- (转) Reinforcement Learning for Profit
Reinforcement Learning for Profit July 17, 2016 Is RL being used in revenue generating systems today ...
- git checkout 和 git checkout --merge <branch_name>使用
一.git checkout //查看当前分支$ git branch master *t2 testing //checkout会覆盖当前工作区文件和覆盖暂存区内容,所以发现分支有未提交的警告,执行 ...
- dictEntry **table;
typedef struct dictht { dictEntry **table; PORT_ULONG size; PORT_ULONG sizemask; PORT_ULONG used;} d ...
- C# TextBox 只能输入数字
private void textBox1_KeyPress(object sender, KeyPressEventArgs e) { TextBox txt = sender as TextBox ...
- ABBYY可以给我们解决那些问题
不同的行业组织和企业有不同的业务流程和规定,在OCR文字识别领域,ORC文字识别软件ABBYY给各个行业都提供了有效解决方案,满足其特定需求的同时还帮助他们提高业务流程处理效率,降低成本,全球大量的纸 ...
- Axure折叠与展开效果的实现
http://www.masterchat.cn/article/20120501/217.html 视频教程 项目效果 点击表头,内容会展开或者收缩. 第一步,用矩形工具分别建立如下效果的图形 2, ...