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的概述(概念)的更多相关文章

  1. 【.NET特供-第三季】ASP.NET MVC系列:MVC与三层图形对照

    近期在开发小组在研究:BS项目中是利用'MVC框架'还是继续沿用'三层'的问题. 由于曾经的.NET项目大多数都是利用三层开发的,所以大多数人都可以对三层进行熟练地运用.而项目的開始我们也曾听说过MV ...

  2. 【.NET特供-第三季】ASP.NET MVC系列:MVC与三层图形对照(颠覆性理论)

           在[.NET特供-第三季]系列博客中的第一篇<ASP.NET MVC系列:MVC与三层图形对照>发表之后,引起了领导的注意.同一时候,开发小组内部在交流MVC和三层之间关系的 ...

  3. OAF_架构MVC系列3 - View的概述(概念)

    2014-06-18 Created By BaoXinjian

  4. OAF_架构MVC系列4 - Control的概述(概念)

    2014-06-18 Created By BaoXinjian

  5. OAF_架构MVC系列2 - Model的概述(概念)

    2014-06-22 Created By BaoXinjian

  6. MVC系列 引入MVC

    1.必须的类库 system.web.Mvc system.Web.Razor system.web.webPages system.web.webpages.razor 添加方式如下图 2.MVC项 ...

  7. mvc项目架构分享系列之架构搭建初步

    mvc项目架构分享系列之架构搭建初步 Contents 系列一[架构概览] 0.项目简介 1.项目解决方案分层方案 2.所用到的技术 3.项目引用关系 系列二[架构搭建初步] 4.项目架构各部分解析 ...

  8. Asp.net mvc项目架构分享系列之架构概览

    Asp.net mvc项目架构分享系列之架构概览 Contents 系列一[架构概览] 0.项目简介 1.项目解决方案分层方案 2.所用到的技术 3.项目引用关系 系列二[架构搭建初步] 4.项目架构 ...

  9. Asp.net mvc项目架构分享系列之架构搭建初步

    copy to:http://www.cnblogs.com/ben121011/p/5014795.html 项目架构各部分解析 Core Models IDAL MSSQLDAL IBLL BLL ...

随机推荐

  1. 后台向前台传递entity的list然后构筑combobox的方法(easyui)

    遇问题,莫着急,深呼吸. 后台写法:JsonUtil.toJson(new ArrayList<Entity>());此处jsonUtil是已封装的方法,即将entity的list转为js ...

  2. 控制文本和外观------CSS Binding(CSS类名绑定)

    <style> .myColor{color:red;font-size:13px} .yourColor{color:green;font-size:34px}</style> ...

  3. appium简明教程(6)——启动appium及android模拟器

    一般情况下,我们都从命令行启动appium. windows下,dos命令窗口输入 appium 如果该命令报错,那么请重装appium npm install -g appium 如果安装出错,请自 ...

  4. Httptunnel教程

    hts --forward-port localhost:22 80 htc -F 6789 192.168.10.1:80

  5. 如何才能将Faster R-CNN训练起来?

    如何才能将Faster R-CNN训练起来? 首先进入 Faster RCNN 的官网啦,即:https://github.com/rbgirshick/py-faster-rcnn#installa ...

  6. 我今天也学习了做jquery插件

    先贴代码 (function ( $ ) { var id=33; $.fn.validate=function(options){ // This is the easiest way to hav ...

  7. 套接字I/O模型-WSAAsyncSelect

    利用这个异步I/O模型,应用程序可在一个套接字上接收以Windows消息为基础的网络事件通知.WSAAsyncSelect和WSAEventSelect提供读写数据能力的异步通知,但它们不提供异步数据 ...

  8. 拿什么来拯救你,我的table

    分类: Html/CSS | 转载请注明: 出自 海玉的博客 本文地址: http://www.hicss.net/how-to-save-you-my-table/ table曾经在网页开发中占据着 ...

  9. js调用百度地图API创建地图,搜索位置

    实现代码: <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <met ...

  10. 在Linux中搭建一个FTP服务器

    在Linux中搭建一个ftp服务器,以供两个工作小组保管文件使用.禁用匿名.第一个小组使用ftp账号:ftp1,工作目录在:/var/ftp/ftp1:第二个小组使用ftp2,工作目录在:/var/f ...