Pictogram: APEX Developer – Plug-In Developer

Not every APEX developer should be a Plug-In developer.
The APEX developer uses the Plug-In a Plug In developer has created.

Following photo shows the pictograms we used during our presentation @ OBUG APEX SIG :

Pictogram Plug-In developer APEX developer

Pictogram Plug-In developer APEX developer

During the demo we showed our little green man while we created and elaborated the plug-in via the shared components.

When we implemented the plug in in a page, we showed the pictogram of the little red man.

As you can see the red guy brings different elements of the puzzle together: standard components (red) and a plug-in (the green piece).

OBUG APEX SIG

Today iAdvise has given a presentation during the OBUG APEX SIG at Oracle Belgium. The title of the presentation was “APEX Plug Ins: How to use them, How to build them.“.

The goal of the session was to give a general introduction on

  1. What are plug-ins ?
  2. How can you use them as an APEX Developer.
  3. How can you write them as an PLUG In Developer.

Especially part 3 of the presentation was a real challenge. We did a live demonstration of how you can gradually build up a new plug in from scratch. In 5 steps Stijn Van Raes demonstrated how to construct a “Clearable Text Item” plug-in. It is not the most complex plug-in, but it allowed us to describe every single step, pointing out the existing Plug-In API’s that you may use when writing your code. At every step, the necessary PL/SQL code was explained,  the resulting options for the APEX Developer demo’ed and  the effect at run time for the end user. Where relevant the resulting HTML code was inspected by using Firebug.

Because there is not yet that much documentation on those Plug-In API’s and their usage —  unless in the internal PL/SQL Packages of the APEX engine itself or in existing plug-ins–, we decided to make a kind of APEX4.0 Plugin Cheatsheet which lists the most important API procedures and functions and the different record types they use.

For the people who were interested, it was also possible in the afternoon to attend a hands-on session and try out everything we explained in the morning. We have elaborated two tutorials that repeated every single step with some extra explanation and the necessary code snippet. Everybody who attended the hands-on finished both tutorials without any problem.

UKOUG: Forms Migration

There were a lot of sessions on forms, most of them handled about migration.
So, here’s a little wrap up of the forms migration sessions I followed on the UKOUG conference.

When thinking about migration, you need to think again before making a decision.
Do it for the right reasons, make a good analysis and plan everything upfront.
The right reason is not because there’s a migration tool that migrates everything.
Such tool does not exist.
This is what most experienced people will tell you, unless they sell a migration tool.
Allthough, this is even told by Steven Davelaar(Oracle The Netherlands), who gave two sessions:
– Guidelines for moving from Forms to ADF and SOA
– JHeadstart Forms2ADF generator: Moving form Oracle Forms to a best practice ADF application
Two very interesting sessions on migration.

The first session was about making the decision, the strategy and the pitfalls.
Before you even want to migrate, ask yourself the proper questions and make an analysis:

  • current situation: forms version, designer, how is it used(standard or “creative forms”),…
  • current functionality: integration with standard functionalities
  • current DB model & future plans
  • current UI: need for a redesign?
  • current documentation: if there is none, what are you going to migrate?
  • current end users:  how are they using the application, are they happy?
  • current IT staff: are they eager to learn? (everything will be new)
  • what direction to you want to move to: richer ui, customization & personalization,…

And start with the beginning: pull out the logic from forms!
Well do this anyway, this will leave all options open, no matter what presentation layer.

Migration has a lot of pitfalls, so watch out!
When migrating, a re-design and re-implementation is probably needed.
Steven ended that session with the following sentence:

Make lasagna (layered approach) and/or ravioli (service oriented approach) instead of spaghetti (like most forms application with code and business logic in forms and on the database)

The second session was about the tool JHeadstart and how it can help you in a best practice migration.
He reminded us on the monday session: define a strategy before you start!
He explained what JHeadstart was (not a migration tool!): an ADF generator and a best practice toolkit.
It generates metadata(XML), not code.
A part of JHeadstart is the Forms2ADF generator, it generates metadata from your forms application.
The demo he gave was pretty impressive, he took an old forms application (that he made in 2002) and generated a new ADF application.
But watch out, it doesn’t migrate everything: not one line PL/SQL is converted, it’s only documented though in JHeadstart.
You have to choose by yourself where to implement that code(business logic on the database, forms logic in the different ADF layers).
What are the JHeadstart benefits: autocreated ADF business components, metadata, best practice architecture.
Steven mentioned also OraFormsFaces, this an integration module to let your forms run in a JSF web application.
Definitly check this tool when you’re thinking about moving/integrating forms to/into ADF.

Another session on migration: “Is Apex the new forms?”
Not a great session, but they started also with the same idea as Steven: analyse before migrating and put all Business logic on the database.
The session was given by an employee of PITTS, so of course the migration tool of the company was shown.
This tool takes a form as input and creates an Apex import script.

It was not as detailed as the demo that Steven did about JHeadstart, but maybe it can be used as best practice.
The tool didn’t convince me…it even didn’t convince the speaker, as his conclusion was simple: “Is Apex the new forms?  No!  Or at least not yet.”
At least he was honest: the tool is no silver bullet and there are limitations.

Conclusion: when doing a migration, think…and think again.
Do you have good reason to migrate?
Then analyse.
Don’t try to find the silver bullet…

New Patch available for ApEx 4.0

ApEx 4.0.1 is available for download, if you are running ApEx 4.0 then I suggest you upgrade as soon as possible.

- If you are already running ApEx 4.0 then download the patch from Oracle support, look for patch nr 9976149.
– If you are still running and older version then 4.0 then download ApEx from apex.oracle.com.

The new version nr of APEX is 4.0.1.00.03.

ApEx 4.0: ORA-001821 randomly showing up

This week, I had a problem with ApEx 4.0 where ORA-001821 was randomly showing up, not only in the applications but also in the ApEx Builder.

ORA-1821

The problem was that we queried a table across a database link but to a database version prior to 10gR1. Please note that other applications will also suffer from this one application where you used this database link.

Oracle describes the problem as:

In Application Express 4.0, the internal applications were modified to have an application date format of ‘DS’. The ‘DS’ date format was first introduced in database version 10gR1.

With the application date format of ‘DS’, each page view has the database session parameter NLS_DATE_FORMAT set to ‘DS’ by the APEX engine. Then, when a query is performed against the remote database (9iR2 or earlier), the remote database is unable to handle the request and says that ‘DS’ is an invalid value for NLS_DATE_FORMAT.

You can already download a patch that solves the problem, in Oracle support search for “note 1155453.1 – ORA-1821 When Querying a Table Across A Database Link After 4.0 Upgrade

ApEx 4.0: Map not showing data points correctly

In ApEx 4.0, when working with a map region (World without Greenland) (Map world/world_wo_gr.amap) you might experience that not all data points are correct.
For example: when you work with the map “World without Greenland” and you choose a query with Series Type of Bubble, Switzerland is positioned in America while Spain is in the ocean.

ApEx 4.0 data points not showing correctly

Oracle recognizes the bug (9950531) and will supply a fix in upcoming patch 4.0.1.
Meanwhile as a workaround the next action is suggested: setting “Series Type” to “Map”, and the countries will be correctly labeled