APEX is a 100% browser-based rapid application development (RAD) tool that helps you to create rich, interactive, Oracle-based web applications very quickly and with relatively little programming effort.
There are many RAD development tools and platforms on the market. If you’re dealing with data that resides in an Oracle database, a number of things make APEX distinctive and thus more attractive as a development platform. First and foremost, APEX is built on and uses as its core languages SQL and PL/SQL. This is a huge advantage for those of you who have already been working with the Oracle database, because it means you can immediately draw on what you know. Even if you don’t have an Oracle background, but are going to be working with an Oracle database, you need to learn about its particular flavor of SQL and will at some point likely find a need for the PL/SQL procedural language.
PL/SQL program units become even more beneficial when migrating from an Oracle-based system that already has a significant amount of business logic coded into stored PL/SQL program units. In this instance, you can almost immediately take advantage of that logic with very little effort or changes to the existing code.
Another great advantage is that APEX is a declarative tool that provides a feature-rich core of functionality designed to make your job easier. Because APEX takes care of many of the underlying functions common to all web-based applications, you can focus on the logic specific to your application.
A large share of what you need to accomplish can be done using one of the many built-in wizards provided as part of the APEX Application Builder. The wizards walk you through the process of defining what you want your application to do and then store that information as metadata. Once a wizard is complete, you can edit and enhance the functionality or even replace it with your own custom SQL and PL/SQL routines. After you become proficient with APEX, you might even find yourself bypassing the wizards altogether and generating more-complex definitions directly.
During the course of this book, you’ll likely discover that you want a few other tools at your disposal, but, in truth, you could easily develop a very rich application using nothing but your web browser and what APEX provides for you.
A Brief History of APEX
APEX has been around for quite some time—perhaps even longer than most people know. The first public release of APEX, or HTML DB, as it was called then, came in 2004, but its history reaches back a long way.
APEX has its roots in technology that has been around for quite a while. In fact, parts of the PL/SQL Web Toolkit, which is used under the covers by APEX to generate the HTML that is sent to the browser, date back to as early as 1994.
At that point in time, you could actually write web applications in PL/SQL by hand, and unfortunately many of us did. This required not only a thorough knowledge of PL/SQL and HTML, but also the patience of a saint and the determination of a headstrong mule. The end result wasn’t very pretty, and it was definitely not secure by today’s terms, but it was functional, if somewhat limited.
Not long after, Oracle introduced PL/SQL Server Pages (PSPs). This involved first coding the static HTML and including special Oracle markup to indicate where dynamic data would go. Once you had the output looking as you wanted, you then ran it through a program called LOADPSP. This would translate the raw HTML and the special Oracle markup into a PL/SQL procedure that, again, used the PL/SQL Web Toolkit to emit the HTML, including the dynamic data you requested. At the time, this was a huge leap forward. I worked at a company where I built an entire framework using PSP technology and deployed it at several clients.
Finally, in 1997, WebDB came on the scene. The true grandfather of what is now called APEX, WebDB was revolutionary in that it was a 100% web-based tool that allowed developers to design web applications. It was written entirely in PL/SQL, even though Java seemed to be taking over the world. Developers could point WebDB at their database and generate code that would produce forms, reports, charts, and calendars. There was no session-state management, and there were no templates; once the code was generated, you couldn’t go back through the tool.
WebDB allowed a large number of companies that wanted to jump on the web-based bandwagon to do so without spending vast amounts of time and effort retraining their staff. As a tribute to its success, I know of a number of companies that still have WebDB systems running in production environments.
Unfortunately, WebDB’s days were numbered. Because it generated code (and if you didn’t like the code it generated, then too bad for you), it had already begun to fade from favor by the time it was absorbed into Oracle’s Portal product. However, creator Mike Hichwa didn’t forget the glimpse of greatness that WebDB had seen.
More Recent History
Around 1999, Oracle CEO Larry Ellison presented Mike Hichwa (VP of Software Development) with the task of creating an internal calendaring and scheduling system for Oracle Corp. The original remit was to use WebDB to generate the initial code and then hand-code all the changes from that point forward. Mike, however, saw this as an opportunity to completely rewrite WebDB into something that could be far more useful. Thus, with the help of Joel Kallman and Tom Kyte, Oracle Flows was born.
Based on the success of the internal calendaring and scheduling system, the team was allowed to move forward toward making Oracle Flows a product. In 2001, using what was then known as Flow Builder, Mike and his team began implementing systems for various customers, including one situation where they managed to replace a Java development project that was going horribly wrong.
By 2003, the team had proven the tool’s power, and they were given permission to release it as a product. HTML DB 1.5 was released to the public as a no-cost option of Oracle 10gR1.
Since then, various releases have been introduced, each providing improved features and functionality. The following is a very brief list of the releases and some of the more notable features:
- HTML DB 1.6 (2004) introduced themes, master-detail forms, page groups, page locking, and some multilingual capabilities.
- HTML DB 2.0 (2005) introduced SQL Workshop, a graphical query builder, a database object browser, and session-state protection.
- APEX 2.2 (2006) introduced packaged applications, the APEX dictionary views, and the access control wizard.
- APEX 3.0 (2007) introduced PDF printing with BI Publisher, migration from Microsoft Access, and page and region caching.
- APEX 3.1 (2008) introduced interactive reports, the runtime-only installation capability, and improved security.
- APEX 3.2 (2009) introduced a migration helper for Oracle Forms–based systems and various security enhancements.
- APEX 4.0 (2010) was a huge leap forward, introducing dynamic actions and plug-ins—declarative ways to introduce server-side logic and extend the core APEX environment, respectively. Also introduced was the new Team Development module.
- APEX 4.1 (2011) included a new user-facing data-uploading feature, enhanced error-handling capabilities, and much-improved support for tabular forms.
- APEX 4.2 (2012) originally introduced some new themes as well as enhancements to the debugging API, but over its more than two-year life span, patch releases introduced such changes as HTML 5 charting and deeper security enhancements.
APEX 5.0 and the Future
And so we arrive at the release of APEX 5.0. While the changes introduced with versions 4.0 through 4.2 undoubtedly changed the landscape of APEX development, the changes introduced in version 5.0 have brought APEX to a point where it can rightly be compared with many of the popular desktop-based development environments.
The original focus of APEX 5.0 was to make development of rich, interactive web applications easier by providing the developer with a vastly enhanced development environment. However, the development team has introduced so many new features—indeed, new ways to attack problems—that it will be hard not to choose APEX as the preferred development platform for Oracle-based applications.
APEX’s new Page Designer Integrated Development Environment (IDE) completely changes the way developers will interact with page design. Modeled after many of the popular desktop IDEs, developers now interact with items, placement, attributes, and actions all on one page. A new drag-and-drop page-layout interface has been introduced that allows developers to easily position regions and items. Group editing allows developers to edit the attributes of several items at once. The only downside to the new Page Designer is that you may find yourself wanting a bit more screen real estate due to the nature of its layout. However, with widescreen monitors becoming ubiquitous, this shouldn’t be an issue for most.
Apart from the new Page Designer IDE, one of the most exciting new features of APEX 5.0 is the Universal Theme. This new application user interface does away with the need for the complex templates from days gone by and enables developers to build more modern, responsive, and consistent applications without needing to know the intricate details of HTML, CSS, or APEX template design.
The new Universal Themes (Desktop theme 42 and Mobile theme 51) allow you to adjust a number of attributes with what is called a Theme Style—a Cascading Style Sheet (CSS) that is added to the base CSS. This can be done via the new Theme Roller tool, allowing you to visually alter a theme. The Universal Themes also allow you to easily customize how items on the page are displayed by using Template Options.
After having been in the cards for quite some time, the Flexible Workspace Authentication has finally been implemented by the APEX team; this allows APEX administrators to define how APEX itself will authenticate developers. Much like APEX applications, workspaces may now be authenticated against Single Sign-On servers, LDAP, and so forth.
Interactive Reports are no longer limited to being one-per-page, freeing you from the restriction that had plagued them since their inception. Interactive Reports also get a few new features. A Pivot View has been added that allows end users to select the column(s) and provide the function(s) by which to pivot the report. This was functionality previously available only by either a lot of hand coding or by creating or using plug-ins. When using the new Universal Theme, Report column headers can now be defined so that they remain fixed in position while the user scrolls down the page.
Native support for Dialog page types has been introduced, thus allowing any page to be displayed either normally or as a pop-up dialog. Pages can be defined as either “Modal” or “Non-Modal.” Modal pages do not allow the end user to interact with the underlying page, whereas Non-Modal pages allow such interaction.
New jQuery Mobile and Tablet themes have been introduced and make use of the newer features of the latest jQuery Mobile libraries. Panels, pop-ups, and dialogs (among other things) are now all available in the mobile interface.
An improved charting engine provides enhanced performance for large datasets. Improvements to accessibility for the visually impaired have been added. A new
APEX_AUTHORIZATION package has been added to aid in the management of authorization within an application. And the list goes on.
As you can see, the APEX core functionality continues to grow with each release. But what you may not know is that you can help drive the future direction of APEX. By going to the following URL, you can not only request new features, but also view and vote on features that others have requested. You need an Oracle Technical Network account, but it’s free and easy to sign up.
To get a view of what the APEX team is committed to providing, you can read the most recent Statement of Direction (SoD). It may take a short time after a release for this to be updated, but it normally contains an overview of the main functional areas for the next planned release. You can find the SoD at the following URL.