Monday, August 12, 2013

ViewController in ADF

There are basically two types of UI pages:
1) JSPX: (JSF Page)

  • We can directly run this page and see on a browser.

2)JSFF

  • This is just a fragment and provides re-usability 
  • It cannot be run as such but has to be used as a part of some other page
  • To run this fragment we have to put this on a JSPX page.

Entity Object, View Object, Application Module and Data Control

ENTITY OBJECT(EO):
An Entity Object points to a table in the database(in simple words). Each table has a different entity object. All the queries are written on this Entity Object instead of directly working on the table itself. This is like a facade design pattern. 

VIEW OBJECT(VO):
A View Object actually points to an Entity Object and is used to query the table that is pointed by the Entity object. 

APPLICATION MODULE (AM):
Application Module actually holds the transactions. It has the ability to rollback or commit the transaction, in case, there is a server breakdown. It actually holds all the view objects that query the database tables. A query can be run in an AM only.

DATA CONTROL:
In simple words, an application module can be used in the model only. For every AM we create there will be a corresponding data control. Both AM and its data control both are same(may be not literally). The VOs that we have added in the AM reflect in its corresponding data control also. We also have the operations (esp., commit, rollback etc). The VO's in the data control can be directly dropped onto the page and the data queried can be showed in the form of a table, form, chart, graph etc. 

Basic Understaning of Framework

There can be two kind of Applications using ADFramework:
1) Web Application:
    Its an application that can be deployed on to a server and can be accessed by the web. Generally we go with this kind of application when we are trying to build an end to end application. It follows an MVC architecture.
  •   Model project: We write all the business logic to connect to the database(Project names here start with a capital letter)
  • ViewController:  We create the view components.Controller controls the data and its navigation to the view components.
2) Desktop Application:
    Installed on a particular desktop and use it from there.