Archive for November, 2007

Personalizing ADF Applications through User Preferences

While of course the applications we build using ADF Faces technology are perfect and cater optimally to every end user’s needs, some end users seem to disagree. Even though we have just delivered the most wonderful and functional application to their door, they ask for changes. Frequently small changes, such as hide a certain component from a page, change the number of records visible in a table layout, change the set of columns shown in a summary table, change the list of allowable options for dropdownlists and radio groups and other such small changes. The screenshot demonstrates how for various users the numbers of records displayed in the table varies:

.... Read the rest of this entry »

OOW 2007: The Great Oracle SQL Quiz. We have a winner: Laurent Schneider

Just under an hour ago, we completed The Great Oracle SQL Quiz session at Oracle Open World. Around one hundred attendants managed to find their way to the session which took place right after the ‘biggest company party in the world’ and for some reason amidst dozens of sessions on JD Edwards. One of them was me – after having set up my laptop in the wrong room only to be evicted by the real speaker in that room just a few minutes prior to 8.30am, the designated start time of the Quiz.

Unfortunately for most of the audience, Laurent Schneider was among them..... Read the rest of this entry »

Enforcing PL/SQL naming conventions through a simple SQL query (using Oracle 11g PL/Scope)

Yesterday I wrote a blog article on how to use the Oracle 11g PL/Scope compiler setting to derive compiler warnings about potential incorrect usage of variables. This incorrect usage consists of variables being declared but never used, variables being referenced before they have been assigned a value and variables being assigned a value that is never referred to (see http://technology.amis.nl/blog/?p=2581 ).

Last night I discussed this article with Michael Rosenblum from Dulcian Software and he told me that he was using the USER_IDENTIFIERS generated by the PL/SQL compiler with the correct PL/Scope settings to enforce naming conventions. Before we got into any details, we moved onto other topics, but his suggestion settled itself in the back of my mind. That was a very interesting idea! Before, to enforce any kind of naming convention, we had to try to parse the PL/SQL code and make some educated guesses about variable definitions and their relative position in the program unit. Using USER_IDENTIFIERS that becomes very much easier.

Let’s take a look at what it could mean to use USER_IDENTIFIERS for enforcing naming conventions for Variables and other identifiers such as Parameters, Types and Program Units..... Read the rest of this entry »

Maven based configuration management with automatic build number

An important questions in software deployment and testing is “What is the version of the software I am looking at”. It is frustrating for a tester or an end user not knowing if the planned upgrade is performed or not. Having a solid version numbering policy is a solution to overcome these problems.

There are several places where you want to have the version number of your software available:
-    visible for the end user on the login screen.
-    visible in the software distribution package (war / ear) for the deployment operator.
-    visible in configuration files.
-    and even visible in the deployed online manual.

The task of proper version numbering can be performed manually. This takes a solid knowledge of all places where this number is used and a good deal of perseverance when performing these repeating actions.
In a project under development, using an agile development method, there will be frequent builds and releases (daily or even hourly). This asks for automated build numbering. When using maven and subversion, this task can be automated with the maven buildnumber plugin.

Read the rest of this entry »

JDeveloper 11g – Declarative Components – Rapid, No Programming Composition of custom JSF components

In my current ADF Faces (10.1.3) project, I have created several custom JSF components. These components combine chunks of recurring page structure content. By using custom components, I can reuse such chunks by simply embedding tags with a little configuration – attributes and facets – in my pages. It works really well. Sometimes our thoughts about a particular recurring page element change, the component changes and we deploy the jar-file with the component definitions. None of the pages that use the components has to change. The one downside to this whole scenario, at least in te beginning, is the complexity of creating custom components. It involves creating two or three classes, setting up configuration in a TLD and faces-config.xml file and writing some rather low-level code. One particular challenge never quite got resolved: how to leverage the functionality of existing ADF Faces components in my custom components.

JDeveloper 11g surprises me with a declarative way of creating new JSF components – or at least reusable page fragments that are packaged and deployed and used as normal JSF components. All I really have to do is create a JSF page, make it look the way I want my reusable component to look, using attributes and facets to allow dynamic configuration of the component, and deploy it to an ADF Library. I do not do any programming, nor do I have to create any configuration file.....

Read the rest of this entry »

Oracle 11g – Generating PL/SQL Compiler Warnings (Java style) using PL/Scope

The Oracle 11g PL/Scope feature allows us to have the PL/SQL compiler generate information on all identifiers used in our PL/SQL code. Using the information generated and available from the USER_IDENTIFIERS data dictionary view, we can do some interesting things. Say for example we have the following stored procedure:

create or replace
procedure wonderful_program
is
  l_name     varchar2(100):='LUCAS';
  l_salary   number(10,2);
  l_job      varchar2(20);
  l_hiredate date;
  l_mgr      number(4);
begin
  l_salary:= 5432.12;
  dbms_output.put_line('My Name is '||l_name);
  dbms_output.put_line('My Job is '||l_job);
  dbms_output.put_line('I started this job on '||l_hiredate);
  l_hiredate:= sysdate-1;
  dbms_output.put_line('Sorry, in fact I was hired yesterday.');
  l_name:='Lucas Jellema';
  dbms_output.put_line('My full name is...');
  l_salary:= l_salary + 10;
end wonderful_program;

Can you tell some things that are wrong or at least dodgy with this procedure? 

Using the information PL/Scope gathered, we can tell the following:

COMPILER_WARNING
--------------------------------------------------------------------------------
L_MGR: variable is declared but never used (line 7)
L_JOB: reference on line 11 but variable may not be initialized (assigned a value)
L_HIREDATE: reference to variable on line 12 comes before the earliest assignment. Variable may not have been initialized on line 12
L_HIREDATE: assignment on line 13 is never used. Last reference to the variable is on line 12
L_NAME: assignment on line 15 is never used. Last reference to the variable is on line 10

Note that these warnings are very similar to what Java Compilers will warn us about. I will show in this article how we can use the PL/Scope data to retrieve such warnings about our PL/SQL programs..... Read the rest of this entry »

Another trip down memory lane at OOW: JDeveloper History

Oracle celebrates its 30th anniversary this year, and this was the main theme of Larry’s key note speech on sunday night. But there are other anniversaries to celebrate this year. It has been ten years since Oracle purchased JBuilder, buying itself into the market of Java development IDEs. This was reason for Oracle product managers Duncan Mills and Clemens Utschig to indulge in their own little "trip down memory lane", in a presentation called "Oracle Fusion Middleware, Past, Present and Future". In this presentation, Duncan and Clemens took us from the purchase of JBuilder through Oracle Valhalla (gotta love the artwork on that logo, I’ll try to obtain it and put it in this post), Oracle AppBuilder, and then JDeveloper 1.0, 2.0 3.0, 9i, 10g, to finally end up at the JDeveloper 11g preview releases.

Rather than this being an all-slide affair, Duncan still has most of these old versions running on his laptop, so they were able to illustrate the evolution of application development through the years with live demo’s. I would have never imagined I would be watching two product managers at OOW 2007, where 11g is the buzzword on everyones lips, giving a demo on InfoBus technology (remember that predecessor to BC4j?!). Fun and weird at the same time. Also it was kind of disturbing that the overall impression was not "Wow, incredible how much things improved with the years". Rather, it was more like "Wow, see how fast those old IDE’s launched!!!".

Although the presentation had plenty of entertainment value, it was kind of unfortunate (to not use a stronger term), that they ran out of time before they reached the "Future" part of their presentation,  and had to hurry to get at least one brief glimps of an 11g application across. Although Duncan and Clemens probably had a lot of fun preparing for this presentation, I think that most people in the audience travel to San Francisco to hear product managers share their insight into what lies ahead, and not what lies behind us, and I couldn’t help but feel a bit disappointed by this presentation. But I am sure there will be plenty other presentations where the "Future" will be discussed in detail, and even if not, there’s always the DemoGrounds where 11g demo’s are "made to order" all day long!

Presenting at OOW: Mixing E-Business & Pleasure – integration scenarios for Oracle E- Business Suite and SOA Suite

On Sunday afternoon Peter Ebell and I presented at the Oracle Open World (OOW) conference in San Francisco as part of an “afternoon of business cases” that was put together by the Oracle Development Tools User Group (ODTUG).
Our story is related to the work that we do for customer Sabic Innovative Plastics. Sabic implements Oracle E-Business Suite 11i and selected Oracle SOA Suite for the integration of the new ERP system with their existing systems.
Our presentation covers the integration scenarios for Oracle E- Business Suite and SOA Suite from the point of view of Sabic’s specific business case which is based on customer focus and simplification of its IT landscape. Judged by the number of presentations on this subject at OOW, working with SOA Suite in an E- Business Suite environment is a hot topic. Not surprisingly, considering that this provides a glimpse of what the future of Oracle Fusion Applications may bring.

A pdf version of the presentation we delivered at OOW may be downloaded here. Please note: this is an abbreviated version of the full story that we present at the SOA Technology seminar on E-Business Suite and SOA Suite collaboration that is organized by Oracle Netherlands. This event takes place on November 22 at the Oracle office in the Netherlands (in Dutch only); for more information and for signing up for the seminar go here.

Special thanks to Sabic Innovative Plastics for their help and kind cooperation in putting together the presentation. We also thank the ODTUG organization for allowing us to be part of their afternoon of business cases.

Personalize Resource Bundles in ADF applications with JHeadstart 10.3.2 run time

It is common in Java Web Applications, including ADF Faces applications, to not hard code application boiler plate text such as prompts, titles, tooltips and button labels. Instead, the page definitions contain keys and references to Resource Bundles. The Resource Bundles contain the actual text to be displayed, to be found based on the key. For every language we want the application to support, we provide a separate resource bundle. The JSF framework ensures that a user will get text from the correct resource bundle, depending on the Locale set in the browser or possibly a user preference in the application that overrides the browser locale.

We are seeing frequent requests for highly customizable applications: after we have deployed the application and made it available to the end users, these end users want to tune the application to their personal prreferences. These customizations may range from specifying fonts and colors, hiding fields, adding or removing options in drop down lists and personalizing the text in prompts, titles and button labels.

This last requirement would look something like this:

As we just discussed, these text elements typically come from resource bundles that are usually implemented as files on the application server’s file system. Changing them at run time is not easily achieved and not overly desirable from for example a maintenance perspective. Additionally: we have a resource bundle file per language, but not per user. Personalizing the texts in the application for individual users is not supported at all.

There is solution to the challenge our most assertive end users put to us: .... Read the rest of this entry »

OOW 2007: Christmas Present from Oracle for Developers (11g Fusion Middleware…. Preview Release)

Today, during Thomas Kurian’s keynote session at Oracle Develop, a gift for the holidays was promised: before it’s Christmas, Oracle will put a Technology Preview of its 11g Fusion Middleware stack on OTN, with WebCenter, Coherence, the latest in BPEL, ADF 11g Rich Client Components and more. Whether or not the SCA based Service Infrastructure is part of the preview or the MDS, I am not sure. But it is an interesting package all the same, if only for the latest WebCenter stuff. It seems that WebCenter is a key component in most of the upcoming Fusion Application’s functionality!

Note that while this present is nice, it actually also tells us that the production release of 11g Fusion Middleware isn’t exactly around the corner. I had no very specific expectations for 11g, but my hopes were more like early 2008. Official statements from Oracle – and even the unofficial ones I have been getting – say only Calendar Year 2008. No specifics. At the present I would not put any money on getting the software anmy earlier than Q3 of Calendar Year 2008, possibly even later in the year.