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. POJ 1043 What's In A Name?(唯一的最大匹配方法)

                                                            What's In A Name? Time Limit: 1000MS   Memor ...

  2. LeetCode() Valid Anagram 有问题!!!

    为什么第一个通过,第二个不行呢? class Solution { public: bool isAnagram(string s, string t) { if(s.size() != t.size ...

  3. linux下重启mysql php nginx

    #  /etc/init.d/mysql restart #  /etc/init.d/php-fpm restart #  /etc/init.d/nginx restart

  4. 越狱Season 1- Episode 16

    Season 1, Episode 16 -Burrows:Don't be. It's not your fault. 不要,不是你的错 -Fernando: Know what I like? 知 ...

  5. memory CPU cache books

    http://www.amazon.com/Consistency-Coherence-Synthesis-Lectures-Architecture/dp/1608455645/ref=pd_sim ...

  6. SSE入门

    此文主要内容来自这篇文章,本文翻译只求能理解,不求逐句翻译. 正文: 我们将在本文中介绍如何在C++/C中使用SSE指令.我的目的不是用SSE写尽可能快的程序,而是试图讲明白它的使用方法. 什么是SS ...

  7. 转(JSONP处理跨域事件)

     前言: 由于Sencha Touch 2这种开发模式的特性,基本决定了它原生的数据交互行为几乎只能通过AJAX来实现. 当然了,通过调用强大的PhoneGap插件然后打包,你可以实现100%的Soc ...

  8. @include与jsp:include的区别

    1.可以使用一个JSP指令或者一个标准行为,在JSP页面中引入其他的页面片段. 2. include指令:在翻译阶段(将JSP页面转换成servlet的阶段),JSP的include指令会读入指定的页 ...

  9. MySQL 加锁处理分析 转

    MySQL 加锁处理分析  转 http://hedengcheng.com/?p=771 十二 13th, 2013 发表评论 | Trackback   1    背景    1 1.1    M ...

  10. Android监听点击事件实现的三种方法

    监听点击事件实现的三种方法:1.匿名内部类2.外部类3.直接实现接口 1.匿名内部类: package com.jereh.calculator; import android.content.Con ...