Thursday 27 December 2012

Review: Oracle APEX Best Practices

November 2012 was the launch of a new APEX book from Packt publishing. Kudos to authors Learco, Iloon & Alex.

I'd like to offer the following review.

Oracle APEX Best Practices

Front page - title & byline to the point; three author contribution - nice to keep things balanced.  I'd probably buy it without looking at the contents. Sometimes it's a shame not to still discover these books for the first time on shelves.

Ubiquitous scenic photograph included - that I'm sure the authors had no influence on ;-)

Chapter 1, Prepare and Build

Not just your obligatory first chapter on setting up APEX - it covers plenty of best practices just in this first chapter. It doesn't go into a huge level of detail - it's not going to be the one-stop-shop for all information, but awareness is key. For this reason it is actually quite a large chapter!

Some highlights:
web server choices; multiple application framework; page design ideas based on table configuration

Chapter 2, Leveraging the database

Instrumentation is what every application should have - the APEX team includes some by default, and the database data dictionary views are also considered instrumentation. This chapter first covers Tyler Muth's logger package - although I would have liked to have read some use case scenarios to really seal the deal.

It then breaks down how to speed up your lookup tables with hash clusters and/or index organised tables - don't sound too scared. It does scratch the surface and explains it fairly well, but I recommend further research.

I think analytic functions are a little like learning to ride a bike. The authors do fairly well in explaining what they're all about, then provide some good examples - especially a cool one combining row_number() and pivot, and another on the essential string aggregate listagg(). In the caveat section, they show an example of analytic overkill - using row_number() to identify duplicates when "group by" will do. However, there is an advantage in using analytics if you need to identify the primary keys as well.

The authors then cover group by features such as grouping & rollup/cube.
Quality goes on with describing how to use scheduled jobs to encapsulate longer running jobs the user does not need to wait for; then looks at another favourite of mine - pipelined functions.
The chapter finishes with a look at ordsys for image processing & context indexing for document content searching just like google.

Best. chapter. ever.

To illustrate how useful & ubiquitous this chapter is, I already used most of these features in a recent APEX project - instrumentation, pipelining, analytics, ordsys, jobs.

Some highlights (I think I knew what these were going to be just by reading the summary):
instrumentation, analytical functions, grouping, pipelined functions, image proccesing, context indexing

Chapter 3, Printing

The most common question with the least definitive answer.

It quickly turned into a reference manual installation guide, but why not? - it explains the process well. There are good nuggets of information in this chapter, just depends on what you're looking for: BI Publisher, Apache FOP, Oracle Reports, Cocoon, JasperReports & two plug-ins, Reports to PDF & Embedded PDF.

My only complaint - there was only a brief note on the 32k limit for report columns. This means images you source dynamically from the database must be less than 22k + message fluff. This is what I experienced in 4.1, and it would have been nice to have dedicated paragraph on the matter - but there is plenty on the web!

I spoke too soon!! Writing this as I went along, I came to a brilliant summary of the 32K limit.

Some highlights:
incorporating images, Print API, suggested alternatives

Chapter 4, Security

Good intro, and great quote to start "Oracle Application Express is secure, but developers can make it insecure"

It covers functional settings, wide-ranging technical aspects - The first half covers administration aspects that you won't find in my APEX Security presentation - they didn't really have the sizzle a presentation needs ;-)

The second half covers the tools a developer needs to be aware of. It has great coverage for cross site scripting (XSS). For added humour, the authors referenced an XKCD comic to illustrate SQL injection. A few authorisation aspects not normally covered were in there. A couple of third party suggestions added to the end.

Some highlights:
VPD, APEX Listener, XSS

Chapter 5, Debugging & Troubleshooting

Starts with good detail on debugging in APEX. Later some browser extensions are mentioned - but I prefer the inspection tools native to Chrome.
It has only a small section on error handling, but really covers or at least mentions everything an APEX developer should be aware of.

Some highlights:
remote debugging, JavaScript console wrapper

Chapter 6, Deploy and Maintain

Another topic that probably needs more good published content, and the authors again do a good job.

Given the quality of the other chapters, I was looking forward to a deeper discussion regarding application IDs, particularly related to Interactice Reports.
They cover feedback well, but miss migrating it between environments.
They also mention my favourite APEX activity report though - Weighted Page Performance.
In regard to pro-active monitoring, I think error handling should have been be covered - with this we could log errors and actively notify the development team before the user picks up the phone to support.

Some highlights:
Version control, Feedback

Appendix, Database cloud service and APEX 4.2

The appendix, while probably vestigial in humans, here includes some interesting supplementary information on the Oracle Cloud Service, RESTful web services & a super quick mention of the data load feature in SQL Workshop.

Summary

Buy this book. Perfect information if you are intermediate to advanced, but what should be a required read for all APEX technologists. Kudos to the authors & publisher.

Past reviews

In the past I've reviewed other Oracle APEX books
Oracle Application Express Forms Converter
Oracle APEX 4.0 Cookbook
I've been technical review for some others, which I should also write up a light review for the blog.

Scott

No comments: