Wednesday, November 24, 2010

Pre-Review: Oracle Application Express 4.0 with Ext JS : RAW




Language : English
Paperback : 320 pages
Release Date : March 2011
ISBN : 1849681066
ISBN 13 : 978-1-84968-106-3
Author : Mark Lancaster


March 2011 the book “Oracle Application Express 4.0 with Ext JS”, written by Mark Lancaster, is expected to be published by Packt Publishing, but it’s available NOW already as a RAW edition.


What is a RAW edition? Well, basically, it’s a prerelease (Read As we Write). Some chapters are still missing and no guaranties, that anything you’re reading in this RAW edition will actually be in the final book release. So, this article will be a pre-review. Is it worth reading? I think it is. You will see: for this book, RAW means VERY WELL DONE already.

Do be mislead by the title. This book is not solely about how to spice up your APEX GUI with ExtJS. This book discusses application GUI development with APEX in general and extending APEX functionality with ExtJS in particular.

What will you learn from the book?

The book will guide you through the whole installation and setup process of your APEX development environment, discussing the different web server alternatives. One of my favorite chapters here is the explanation of how to combine APEX with Subversion as version control system to automate your build process.

If you’re not familiar with Ext you will get an (APEX free) introduction to get acquainted with Ext, starting with a simple hello-world-like example , learn about CSS manipulation, DOM navigation and manipulation, event handling and finally advance to object notation and namespacing. All in about 30 pages, code examples included. Just enough to get stated without getting bored.

Ext offers lots of web GUI enhancements, but to use those in APEX you will have to work with templates and themes. The book explains the of the APEX model, how to create your own template step-by-step and integrate ExtJS into it.

Once familiar to the basics of ExtJS enabled APEX GUI building, you now will go through a number of detailed examples, creating, modifying and enhancing templates with ExtJS and CSS techniques: Regions, Labels, Lists, Button, Popups, Breadcrumps, Calendars and Reports to start with. Next you will get some examples of how to add some more advanced Ext layout elements to your Application, like the Ext.DatePicker, Auto-growing text areas, auto-completing text fields, tab panels, toolbars and menus.

A book about APEX 4.0, especially when covering GUI aspects, should spent some pages on Plug-ins and Dynamic Actions. This book will teach you, how to build your (first?) own Plug-in with a simple example, step-by-step and create a AJAX enabled Plug-in and Dynamic Actions.

So far the well done RAW version of the book. What’s still to come? The Mark Lancaster plans include chapters about:

· Interactive Components

· IFramed Tabs and Popup Windows

· Mixing Ext with jQuery

· Performance tuning your JavaScript


I like this book already. Lots of I’m-going-to-try-this-immediately examples, clear writing, good basics and well explained advanced examples make me recommend this book. You should have some experience with Application Express, experience with Ext is not required.

Pity the complete source code of the examples is not yet available on the Packt Publishing site.

I’m looking forward to the finished version. Meanwhile, if you are interested in the RAW edition of the book. Packt offers a nice deal: buy the RAW version of this book and place a pre-order for the print book right now, with a 40% discount on both.

Wednesday, November 17, 2010

Oracle updates APEX Statement of Direction

statementofdirection Oracle just came with an update on its “Statement of Direction” for APEX. Once again Oracle confirms that APEX will continue its efforts to enhance this development platform, which should not be a surprise, but there were often doubts (especially from IT management) whether APEX will be a platform to base long term planning on, preferring ADF as the framework primarily promoted as the-way-to-go. Apex is mature, and will become more mature with the announced enhancements in this SOD.


  • Oracle continues to invest in the development and support of Oracle Application Express and new versions of Application Express will be released at least annually.

So, version 4.1 should not be too far away from being released, as 4.0 is almost half a year “old” now (not taking into account the time the EA release was available).

Oracle lists some features planed for the upcoming version, and I just would like to comment on some of them:


  • Development for Mobile Applications – Include themes and HTML templates suitable for smart phones and mobile devices.

Creating an APEX GUI for mobile devices using themes and templates is already possible with the current release, in fact, was possible with earlier releases as well. So I’m very curious what the Apex team comes up with, as I’m currently migrating a web application to Oracle/Apex which must be accessible from both: mobile and PC-based browsers.

  • Charting - Provide for chart rendering without using Flash (to enable display on mobile devices).

iWhatever users will be very thankful ;-).

  • Interactive Reporting – Allow multiple reports on one page and support pivot queries.

Great! Finally a pivot feature in Apex. I believe, this is the number 1 missing feature in Interactive reports, which keeps business users from using Apex as “Excel-replacement” analysis tool. Hopefully the user will be able to customize the pivot report just like in Excel.

  • Tabular Forms – Allow multiple tabular forms on one page and continue to expand tabular forms validations.
  • Master-Detail-Detail – Allow the generation of pages to support master-detail-detail relationships.

Not being able to have multiple tabular forms on one page (out-of-the-box) is one of those annoying things almost every developer has experienced when starting to develop with Apex. Developers and customers/users will appreciate this enhancement.

  • Use of ROWID – Allow usage of ROWID for Automatic DML processing (as an alternative to identifying the PK columns).

So a developer will be able to choose between ROWID and (manually identifying) PK columns? That would definitely be nice.

  • Modal Dialogue - Add ability to display a dialog on top of a page (the rest of the page will be grayed out).

This is possible now too, but only by using some JS library or writing your own DIV based layout. A build-in functionality would be of great help, as this often is a wanted functionality.

  • Data Upload - Enable end-users to upload data into an existing table (within an application).

I bet there are numerous Apex applications which have just this functionality. So, no need to come up with custom solutions anymore? Wizard based? How customizable will this feature be? I’m very curious.

Monday, November 1, 2010

It’s the little things in life …


Sometimes you get information and you ask yourself: "Why didn't I know this? This would have made (certain) things so much easier!" or "I didn't know I could do this". Well, this just happened to me and after asking a few colleges, I found out: I’m not the only Oracle developer who didn't know this (without being too concerned about the statistical relevance of the sample size, I would estimate that about 80% of PL/SQL developers might not know this). So I decided to write this little post.

Consider this piece of code:
CREATE TABLE examples (sample_str VARCHAR2 (100));

INSERT INTO examples (sample_str)
VALUES ('It''s the little things in life ...');

   v_stm VARCHAR2 (1000);
   v_stm := 'insert into examples (sample_str) values (''It''''s the little things in life ...'')';

Take a look at the quotation syntax. Most developers will recognize the double-quote as “escape” for the single quote to be able to insert/assign the quote as part of the string value. This syntax can get really messy, especially in combination with concatenations or nested quotes in dynamic SQL. Such code can be a real pain to debug and maintain. The wrong number of quote’s will result in a “ORA-01756: quoted string not properly terminated” error..

In 10g Oracle introduced a new quoting syntax. This new feature enables us to embed single-quotes in literal strings without having to resort to double, triple or sometimes quadruple quote characters. To use this mechanism, simply prefix the string with a “q”. The syntax is q'[...]', where the "[" and "]" characters can be any of the following (as long as they do not already appear in the string):

  • !
  • {}
  • []
  • ()
  • <>

Using this quoting syntax, the above example would look like this:

INSERT INTO examples (sample_str)
VALUES (q'[It's the little things in life ...]');

v_stm VARCHAR2 (1000);

v_stm := q'[insert into examples (sample_str) values ('It''s the little things in life ...')]';



Looks a lot better, doesn’t it?! Well, there is still one of these double quoted syntax things in this example. Guess what: The mechanism even allows you to code nested single-quoting syntax:

v_stm VARCHAR2 (1000);

v_stm := q'[insert into examples (sample_str) values (q'<It's the little things in life ...>')]';



Siquis in hoc artem populo non novit amandi, Hoc legat et lecto carmine doctus amet.