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 ...
随机推荐
- poj2553 强连通
题意:定义了一个图的底(bottom),是指在一个图中能够被所有点到达的点,问途中有哪些点是图的底. 首先是同一个强连通分量中的点都能够互相到达,强连通分量中一个点能到达其他点,也必然代表该强连通分量 ...
- python设置字体颜色
在开发项目过程中,为了方便调试代码,经常会向stdout中输出一些日志,默认的这些日志就直接显示在了终端中.而一般的应用服务器,第三方库,甚至服务器的一些通告也会在终端中显示,这样就搅乱了我们想要的信 ...
- 【转】 iOS日常学习 - iOS10上关于NSPhotoLibraryUsageDescription等问题
原文网址:http://blog.csdn.net/wang631106979/article/details/52578001 最近升级了Xcode8.0,真是很多坑啊,填完一个来另外一个,今天又遇 ...
- 论文阅读之:Is Faster R-CNN Doing Well for Pedestrian Detection?
Is Faster R-CNN Doing Well for Pedestrian Detection? ECCV 2016 Liliang Zhang & Kaiming He 原文链接 ...
- linux下删除所有.svn目录
linux下删除所有.svn目录方法为 find . -type d -name ".svn"|xargs rm -rf 或者 find . -type d -i ...
- Syscall param open(filename) points to unaddressable byte(s)
valgrind 调试出现如题所示的错误,原因是存取文件名的空间被释放了 源代码: cfg->snteam_cfg->snt.score.nd.wrd_dict_db_fn=cfg-> ...
- Oracle DBWR,LGWR,CKPT,ARCH 触发条件 总结
一. DBWR写磁盘数据触发条件 1. 当进程在辅助LRU链表和主LRU链表上扫描以查找可以覆盖的buffer header[空闲缓冲区]时,如果已经扫描的buffer header的数量到达一定的 ...
- 自然语言处理1——语言处理与Python(内含纠错)
学习Python自然语言处理,记录一下学习笔记. 运用Python进行自然语言处理需要用到nltk库,关于nltk库的安装,我使用的pip方式. pip nltk 或者下载whl文件进行安装.(推荐p ...
- 005. asp.net页面常用指令
页面指令 用于通知编译器在编译该页面时做出什么样的处理方式, 欢聚换来讲, 页面指令指定了执行该页面的运行时环境, 当编译器处理应用程序时, 可以通过这些指令来让编译器做特定的处理; 在asp.ne ...
- Oracle数据库—— 事务处理与并发控制
一.涉及内容 1.理解事务的概念和几个特性. 2.熟练掌握事务管理命令的使用. 3.理解并发操作的概念和数据库锁的类型. 二.具体操作 (12.5 实验) 1. 分析以下代码,说出代码中的哪些部分体现 ...