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. JavaWeb学习记录(三)——网页中文编码问题

    方法一: public void doGet(HttpServletRequest request, HttpServletResponse response)            throws S ...

  2. JavaWeb学习记录(十九)——开发JSTL自定义标签

    一.防盗链标签 import javax.servlet.http.HttpServletResponse;import javax.servlet.jsp.JspException;import j ...

  3. Apache使用mod_deflate模块压缩页面优化传输速度

    可以写为一行,也可以写多行,默认为gzip SetOutputFilter DEFLATE # Restrict compression to these MIME types AddOutputFi ...

  4. spark_updateStateByKey

    java核心代码 JavaPairDStream<String, Integer> wordCounts = pair.updateStateByKey(new Function2< ...

  5. Android——GridView(显示文字)

    activity_test9的layout文件: <?xml version="1.0" encoding="utf-8"?> <Linear ...

  6. 课堂所讲整理:Set和Map

    Set相关知识: package org.hanqi.array; import java.util.*; public class Test2 { public static void main(S ...

  7. react 不能往组件中传入属性的值为 undefined

    在使用 andt design 的时候遇到个需求,需要清除 Select 组件选中后的值,让它变成什么都没选中,显示 placeholder 刚开始以为设置为 null 即可,结果发现设置为 null ...

  8. web前端学习策略

  9. centos启动流程[转]

    启动流程概览 在硬件驱动成功后,Kernel 会主动呼叫 init 程序,而 init 会取得 run-level 资讯: init 运行 /etc/rc.d/rc.sysinit 文件来准备软件运行 ...

  10. C++ 实用的小程序

    1. 打开test_ids.txt 将里面的东西添加"1_",然后另存为test_ids_repaired.txt #include <iostream> #inclu ...