Friday, July 11, 2014

ADF : Lifecycle of a POJO Data Control

Though ADF BC is the Oracle recommended Business Services layer , but for many use cases  we end up using POJOs and exposing them in the UI via POJO Datacontrols
e.g. consuming Webservices as WS Proxy , calling 3rd party or IDM APIs

I would like to point out that its highly recommended that you generate datacontrols out of the POJO and consume them in the UI rather than get a handle to the POJO directly in the UI surpassing any binding layer per se. That ways we can leverage cool features like sorting , filtering etc OOTB as well as the results are not cached when the table is bound to a pageFlowScope bean.
I have seen even ignorant so called 'Sr Solution Architects' use the wrong approach & face weird issues & blame it on ADF !!

This post is intended to share the insights I received from Oracle PMs and others on the popular ADF Enterprise Methodology Group (EMG) on the below use case.

A POJO  in the model layer with its constructor and a few public methods which return a list or the like which is finally exposed as a Datacontrol to a ADF UI.
When will the POJO Datacontrol and the POJO be initialized and in what memory scope would it be kept in case it needs to be accessed in various places on the same page or in different pages in same/different TFs ?

See   the ADF EMG post & Frank's reply on the forum post for more details  and precise answers on the above.