Oracle Application Express-What's It All About?: The Guided Tour
Oracle Application Express-What's It All About?: The Guided Tour
—Peter Lorenzen
WM-data, Denmark
Editor’s Note: If you’re not familiar with APEX, Peter’s article Apache HTTP Server is no longer installed by default. You
will point you in the right direction. If you already use APEX, have to install it from the companion CD. It is not possible to
you might want to give it a quick read to see if you agree install the normal APEX version on Oracle Database XE in a
with what he says. supported fashion. To see how APEX in XE differs from the
standard APEX, check http://tinyurl.com/uu6pl.
Introduction
Oracle Application Express (APEX) applications are The Guided Tour
popping up all over the place. The product is free and All development in APEX takes place in a workspace.
has a lot of things going for it. My associates and I have Workspaces can be created and maintained in the
successfully used APEX for a number of smaller development Administration Services application by an administrator.
projects. One project was for RTX Telecom that uses APEX When a developer logs into a workspace, the Workspace
to control over one million DECT telephones in Romania. In home page appears. Here the three main parts of a
this article I will try to explain what APEX is and what it workspace are presented: Application Builder, SQL
can be used for, based on our experiences. Workshop, and Utilities.
APEX?
Application Builder is where most of the application
development takes place. SQL Workshop consists of tools
APEX is a browser-based Web development environment that will help you view and manage database objects. It’s the
that enables you to quickly develop database-centric Web stuff you would otherwise use Oracle SQL Developer or Toad
applications. APEX was launched as an MS Access/Excel for. You can upload your script collection, run scripts, or use
killer. The focus has been on consolidating fragmented the visual query builder. All in all, it is a nice set of tools.
information into the database in a user-friendly manner. Most developers probably would not use the tools, but for
APEX does this well, but it also makes sense to use it in casual users they are fine. APEX Utilities lets you import/
a range of other situations. Oracle developed APEX from export data from the database, generate DLL, view object
scratch and it is not based directly on any other product. So reports, and restore dropped database objects.
it’s not a new release of Oracle WebDB! APEX debuted in
On the right side of the Workspace home page are some
2004 when version 1.5 was released with Oracle Database
administration links that let you maintain users, user
10gR1. It was first named HTML DB, but later renamed. At
groups, and miscellaneous workspace stuff (see Figure 1).
the time of writing the current version of APEX is 2.2.1.
APEX demands at least a version 9.2.0.3 database. APEX
is built on the Apache HTTP Server and the mod_plsql
Apache module. This is a proven architecture that has
been around for a long time. Mod_plsql makes it possible to
generate Web pages directly from PL/SQL. If you have used
the PL/SQL Web toolkit or generated WSG modules with Figure 1. Workspace Components
Oracle Designer, you have used mod_plsql. This architecture
makes APEX perform well and scale with the database. It
is possible to use the Apache HTTP Server from an Oracle
Application Development
In the Application Builder you can develop applications
Application Server (OAS). You don’t need an OAS unless
as you do in Oracle Designer. When you change a property,
you have a very high load and need the better integration to
metadata is saved to the database. Creation of objects
performance tools that OAS offers.
is mostly wizard-based, but when you need to change
The free Oracle Database10g Express Edition (XE) has something later you need to know which property to change.
a default APEX installed. What a cool package; a trimmed Designing a page is not WYSIWYG, but you can see the
down 10.2 database and APEX included absolutely free! The order of items, buttons, and so on. APEX has a string of
APEX is a special release 2.1 that does not use the Apache built-in page types such as Forms, Reports, and Charts.
HTTP Server and the mod_plsql module. Instead it uses the
embedded Apache HTTP Server and the PL/SQL gateway, FORMS
which were introduced with Oracle XML DB in release 9.2 Forms can be built with a wizard or manually. They can
of the database. TIP: If you are using a 10g database, the be based on a table, view, procedure, SQL query, or Web
Continued
ODTUG TECHNICAL JOURNAL SECOND QUARTER 2007 13
Oracle Application Express—What’s it All About? (Continued)
service. Forms items are HTML form elements; some are being very pleased with a built-in theme. A theme consists
enriched with extra features, for example, the date fields, of templates. Each template controls the layout of a specific
which can have an associated pop-up calendar. Aside from component, for example, a button. Templates consist of
normal Forms, it is also possible to create master detail HTML, CSS, and graphics. The theme concept is very flexible
Forms, tabular Forms, and others. and makes it possible to get exactly the layout you want
REPORTS without changing your code.
You can create HTML reports based on SQL. Currently SECURITY
HTML is your only option for report output. I think this is With APEX it’s possible to create public applications, or
disappointing, but PDF reports are on the horizon for release applications that require authentication. APEX contains a
3.0. At the moment we use Apache FOP for our PDF reports. number of built-in authentication schemes. The standard
FOP is fine and free, but complicated to use. I have heard scheme is called Application Express. The users are “thin”
good things about PL/PDF, but it’s not free. There is, of users, stored in a table. Groups of users can be created,
course, always the option of using Reports or XML Publisher but they only can be used with this authentication scheme.
if you already have the skills and licenses. Other authentication schemes are based on database users,
CHARTS an external LDAP server, or an Oracle Single Sign-On (SSO)
server. It is also possible to use custom authentication if you
It’s possible to create HTML and SVG charts. You can
need something different. We have used the SSO integration
create charts where you drill down from one chart to another.
and it works fine even though it is not so straightforward to
Charts can also be refreshed using Partial Page Rendering
set up.
(PPR), avoiding the need to refresh an entire page.
Authorization schemes can be used to extend
MS EXCEL INTEGRATION authentication schemes to allow a more granular access
One of the strong features of APEX is the close MS Excel
control. You can control access to an entire application, a
integration. Via a wizard, you can upload a spreadsheet to a
page, or a component on a page. An authorization scheme is
table. You can use an existing table or generate a new one in
based on custom SQL or PL/SQL code.
the process. It is also possible to base an entire application
on a spreadsheet (see Figure 2). The wizard guides you APEX also has advanced built-in security functions that
through the upload and the application generation. The will help you with session state protection and cross-site
uploaded data can be maintained in the new application. A scripting protection.
simple SVG chart is also generated by default. In minutes DEPLOYMENT
you go from Excel to an APEX application. This cool feature An application consists of the application itself and
can be used for prototyping, or to get a quick start. supporting objects such as images, CSS, JavaScript, and
SQL scripts. You can deploy every type in its own file, or
as a single SQL script file called a packaged application.
You create an export file and import it on the other system.
Brilliantly easy! It shows how well the metadata repository
approach works.