Monday, May 03, 2010

Mapping ADF(Faces + ADFbc) to J2EE MVC

An interesting mail I found today.Simple and explanatory.

How to map the ADF application projects to J2EE MVC Architecture.

To be simple..
what ever you see in Model.jpr(which contains ADF BC componenets like EO,VO,AM ) . Interestingly they call this as Business Services in ADF and call "Data Bindings" and "Data Controls" as ADF Model. Data Controls(Application Modules) will be part of your Model.jpr and Data Bindings will be part of your UI.jpr.
So, Simply MODEL means combination of Data Bindings and Data Controls in ADF
It can be ADFbc,TopLink,EJB, even POJOs.

View (V in MVC):
View is simply what ever user see and interact with application. So, what ever u see under UI.Jpr like .jsff, .jspx, Flow.xml etc.. all these comes under View Componenets. You can see lot many XML files under UI.jpr, like PageDef.xml(this is where you will have your page level Data Bindings) and other configuration files(like web.xml, adfc-config.xml etc..)

Controller (C in MVC):
Unfortunately you can't map declaratively as we do for M and V. But, in ADF controller is "FacesServlet" which is the first controller java servlet which will listen to user request and initiate the faces life cycle process. In most of the Web frameworks(like , Struts, JSF) a servlet acts as a controller. So, here in ADF it is "FacesServlet"(you can search for this entry in web.xml). "FacesServlet" job is to listen to user request and decide which View to be shown to the user by interacting with which Model Components.
(Note: In Jdev, Controller basically resides in UI project itself, thats why they name UI project as ViewControler (where as Model project name is Model))


Anonymous said...

Hello. Often the Internet can see links like [url=]Buy cialis without prescription[/url] or [url=]Buy cialis without prescription[/url]. Is it safe to buy in pharmacies such goods?

Janaki said...

Simple and good

Anonymous said...

Nice. good

Anonymous said...

Eroplerie xaikalitag Tieptcotoxype [url=]iziananatt[/url] Untobehen abelvezef