Sample TAPI APEX Application

If you attended my presentation at AUSOUG Perth earlier this month, or if you’ve had a peek at the slides, you may be interested in a more concrete demonstration of the ideas presented. So if you’d like to install and play with a sample application that includes a TAPI generator, feel free to download this (EDIT: updated, see below).

Disclaimer: this is provided for information (and entertainment) purposes only.

Prerequisites:
Oracle Application Express 4.2.2 or later

Read the README file for installation instructions.

appimage

If you’re only interested in the schema-level TAPI and not the APEX application, the zip file includes the DDL script that you can run directly in a schema without requiring Apex.

EDIT (18/11/2014): updated sample code to do the right thing in WHEN OTHERS triggers.

EDIT (20/11/2014): updated sample code with a further example for a FK to a table, which doesn’t use a surrogate key. Also added an exception handler to the Apex application.

EDIT (2/12/2014): added Grid Edit for event types, as an example of how a tabular form might work with a TAPI; added deployment package; moved code to Bitbucket.

EDIT (16/02/2014): upgraded to APEX 5, plus numerous improvements – refer to:

More updates and improvements will be added in the future – watch this space.


Help for your keyboard users

APEX’s Blue Responsive Theme 25 is a great theme for building a user-friendly website, and unlike many other themes which make the item labels clickable to get help, it renders little question-mark icons to the right of each item that has a help message defined.

theme-25-help-icon

One issue with this design, however, is that a keyboard-savvy user (such as myself) hates to switch between keyboard and mouse – so they Tab between each field as they fill in a form. With this theme, however, those little question-mark icons are in the tab order, so the user has to Tab twice between each field. If they’re not looking at the page they might forget; and if one item doesn’t happen to have a Help icon, they have to remember to only Tab once. All of this adds up to a poor user experience.

To fix this, we simply tell the browser to move the Help icons out of the tab order – and yet again, jQuery comes to the rescue as we can simply pick out all the elements with the class itemHelpButton and set their tabindex to “-1”:

$(".itemHelpButton").attr('tabindex',-1);

Put this code in the page attribute Execute when Page Loads – when the page loads, this will set the tabindex on all the help icons on the page, so now the user can tab through the page without interruption.


AUSOUG Conference Perth, November 2014

What a great conference – there’s been a lot of praise for the organisers and all the speakers. I haven’t missed a conference since I started 15 years ago, and I hope it keeps going (in one form or another) for a long time to come.

This year I attended the following sessions (some titles changed for effect):

Björn Rost – 12c for DBAs and Developers; FDA (time to drop those journal triggers)

Scott Wesley – CSS & JQuery hands-on lab; 5 Security & Performance Techniques

Branka NjegichCraig Purser – a Case Study about building a very slick Tablet app in Apex

Martin Power – how to recover from data block corruption (where I realised it’s about time I learned this “rman” thing)

Connor McDonald – 12c for Developers in only 1,000,000 slides

Penny Cookson – OHarmony (or, how to find a tall, dark DBA…)

Tim Hall – Performance Mistakes; PL/SQL Function Call Performance

Gavin Soorma – How to Migrate your Data to 12c

If you are interested, you can review the slides from my presentation here: Building Maintainable Applications in Apex. Whether or not you agree with all my points, I hope it at least makes you think 🙂