ADF Dynamic Tabs Shell Template: Relevance for New Projects
17 Nov 2009 by Simon Haslam (in ADF)
At OpenWorld one of the new features touted for PS1 was promised to assist building Fusion-style applications, based on Oracle's own development experience. Immediately this sounded interesting! I must admit I was thinking it would be something like the old af:PanelPage component in 10.1.3, but in fact it is a new template supplied with ADF, called 'Dynamic Tabs Shell'. Now when I say 'template' I'm not really doing it justice - it's more of a 'power-template' complete with its own backing bean to provide functionality accessible from your web page (e.g. via EL). My interest in this feature is primarily from two angles:
Documentation for the template (including a worked example) is covered by the Oracle UI Shell Functional Pattern. It's quite a long article though so takes time to digest. | |
Before getting into too much into detail, let me pull out a few key sentences from the above document, that describe the intended purpose of the template:
"The most salient behavior supported by the UI Shell is dynamic tabs. The tabs are dynamic in that they are rendered and dismissed upon demand by the user. Developers can ramp up quickly and easily to create a rich client UI promoted by Oracle's User Experience teams."
"as a functional UI pattern implementation, its UI design, features, and flexibility may be found sufficient for production development"
"The primary assumption of the ADF UI Shell is that each page based on the template will represent a significant module of an application, if not separate applications."
Next I ran up JDeveloper and tried it out for myself, along with the UIShell example application provided by Oracle.You can see the
facets in the picture above, plus the template attributes such as for
the branding logo (which curiously is not displayed correctly in the
design editor, but is at run-time). The template is in a library bundled with JDev called {JDEV_HOME}/adfv/jlib/oracle-page-templates-ext.jar
and I encourage you to look at the template (dynamicTabShell.jspx) as it gives some useful hints as to how to put a good template together. My other passing thought is that, because you can't nest templates (in theory anyway, and certainly the JDev design editor doesn't like it), you will have to set the template parameters for each page, therefore you are losing some of the benefits of having a template in the first place. Of course as we seem to be moving to towards building applications out of reusable page fragments anyway, perhaps that will become less important since even a moderately-sized application may have very few actual pages.
So far, so good - now to address my questions:
Firstly, would the template be useful for improving developer productivity?
We already have (static) tabs and, with ADF 11g, we aleady have templates. The whole purpose of this new template though is to support a multi-tabbed interface, where the user can choose to open and close tabs of their own (i.e. like document windows in a traditional client-server application, like MS Word). So the intial question we need to ask is, when would we need dynamic tabs?
Experienced web users often open a new page in a new browser window (or, more recently, in a new tab) to allow them to multi-task and I think this is the kind of behaviour dynamic tabs is targetting. Let's take an insurance application for example: traditionally you might have a tab for the customer's personal details, a tab showing all their policies and a tab for their claim history. If we move to dynamic tabs we allow more than one instance of the same activity to be in progress at once. For instance, there might be a tab for editing customer A and a different tab for customer B. This offers the user much more flexibility in what they see, putting them more in control.
This is very sophisticated functionality for a web UI, though is presumably being employed by Fusion Apps. However there's clearly a difference between what Oracle can invest in building a 'next generation' application for sale globally, as compared to something most organisations can justify building for themselves.
If you have a definite requirement to provide dynamic tabs the template provides useful functionality for opening and closing them (including close boxes and notification if data needs to be saved) that would seem sensible to reuse, rather than writing from scratch. The critical question is how well this is supported declaratively (with modest training) and so making the provision of dynamic tabs affordable, and how that compares to productivity benefits for the end user. Unfortunately I think it's a bit soon to answer that!
Now to address the second question; does the template embody best practice that we can use for our own templates? I think the answer here is probably yes, from both the perspective of layout components and integration with skinning, as well as packaging up additional UI-only functionality alongside the template.
Finally, you could use the template as a 2 column layout, without any creating dynamic tabs. However I suspect that, by the time you've handled the repetitive attributes as mentioned earlier, it may be better just to use some of it as a one-off skeleton for your own organisation/application-specific template (particularly if you've not created a template before).
Summary
It's difficult for me to draw too many conclusions based on a relatively short amount of investigation, however, my initial suggestions are:
- this is not a template for a first, pilot ADF project: firstly because you almost certainly won't need dynamic tab functionality, and secondly because using it fully is not going to be trivial,
- the template is worth studying prior to building your own templates so see what experienced Oracle developers consider best practice,
- it should be well suited to modern, dynamic enterprise applications though you will need an initial exercise to work out how best to structure the application and navigation, along with applying the organisation's look and feel,
- it doesn't look suitable for retrofitting: you can use it from the start of your application (or subsystem) development but probably can't easily apply it to existing pages.
I'll start a discussion over on the ADF Enterprise Methodology Group to see what other people in the ADF community think - if it turns out I've missed something I'll update this posting in a week or two.
