Friday 14 September 2012

Introduction to Oracle Application Express

What is Application Express?

It is formerly called HTML-DB, a web-based RAD tool which resides in Oracle database. Using browser based user interface and limited programming experience, you can build a complete data-centric web application in a very fast development cycle.

From the end user’s perspective, the deployed applications require only a browser and
access to an Oracle database running Application Express.

What are the uses of APEX?

1. Builds professional looking web applications that are both fast and secure.
2. Runs on and lives in Oracle database. APEX framework and meta data are stored in Oracle tables.
3. It is FREE. No licensing required.
4. Fast learning curve for developers to build application.
5. Deployment of application is as simple as 'Export and Import' if hard coded references of values that change between environments are avoided.
6. Lot of scope for customization of application look and feel.
7. Scalable for high user volume. AskTom, former Oracle Metalink (before migrated to Flash version) and many applications are built using APEX.
8. Can be configured to use Oracle SSO and EBS fnd user repository.

Who uses APEX?

If you are running on oracle database and you want to build rich web application with reports, forms, charts, drill downs and dashboards with limited Java experienced developers in a short time frame, Oracle APEX is the most likely candidate for consideration.

How APEX Architecture works?

APEX is installed on Oracle database (above 9.2 version), starting from Oracle 11g it comes pre-installed with the database. It is comprised of meta data in tables, pl/sql code and extensive JavaScript APIs.

The URL request from the browser is translated into appropriate APEX PL/SQL call by either Oracle HTTP Server (Apache) with mod_plsql plugin or Embedded PL/SQL Gateway. This varies by the type of APEX installation on oracle database. After the data is processed, results are relayed back to browser as HTML. This cycle happens each time user request or submit a page. The application session state is maintained in database tables.

APEX installation can be done in two ways. DBAs are more concerned about it than developers. But this determines how the URL is translated. I will talk about it in next article.

Oracle HTTP Server
In this three-tier configuration, mod_plsql in Oracle HTTP Server acts a broker between client web browser and server database.


For each URL that is processed, mod_plsql either uses a database session from its connection pool, or creates a new session on the fly and pools it. For mod_plsql to invoke the appropriate database PL/SQL procedure in a URL-processing session, you must first configure a virtual path and associate that path with a Database Access Descriptor (DAD).

A DAD is a named set of configuration values that specify the information necessary to create a session for a specific database and a specific database user/password. This includes the database service name and the Globalization Support setting (for example, language) for the session.

Embedded PL/SQL Gateway
This is a classic client-server architecture where embedded PL/SQL gateway provides the Oracle database with a Web server and also the necessary infrastructure to create dynamic applications. The embedded PL/SQL gateway runs in the XML DB HTTP server in the Oracle database and includes the core features of mod_plsql, but does not require the Oracle HTTP Server powered by Apache. Inclusion of the embedded PL/SQL gateway simplifies the
architecture and eliminates the middle tier entirely.




Oracle HTTP Server is known and proven technology, it has been used for Self Service applications.
Does APEX works with non-Oracle databases?
No.

What is current version available?

APEX 3.2 is released a couple of weeks back.

What are skills required for APEX Developers?

SQL, PL/SQL are essential. HTML, CSS and JavaScript are good to have skills to understand and customize look and feel (themes, templates, .... ).

Where to learn and get hands on APEX?

There are multitude of sites dedicated to APEX. apex.oracle.com allows anyone to request for  free APEX account to build applications or run packaged applications.

Follow the below steps for creating account in apex.oracle.com
  • Go to apex.oracle.com and click 'sign up for account' link below Login button.
  • Fill administrator information. This user will have all rights to create new users and manage their accounts.
  • Enter workspace name (For Ex: XX-APEX). Workspace is dedicated area where you develop applications. A workspace is attached to one or more database schemas. In a typical development environment, you might create a single workspace for all
    your developers to share.
  • Enter name of database schema and its space allocation.
  • Fill justification and complete by confirming the request.
  • You will get email once the request is approved. Oracle administrator do great job to approve your request as soon as they can. (Usually few hours ... latest a day).
  • After clicking on approval link, you get another email with userid/password.
  • Then you are set on login on apex.oracle.com  and run sample application under Application Builder.

I will cover different aspects of APEX in next article.  

Finally APEX or OAF or ADF?

Some healthy debates are going on choice of these existing new technologies. APEX embeds business logic and presentation together in oracle database. It has bunch of bugs to be fixed ... for that matter every technology evolves over time. APEX is fast growing platform for RAD. The number of OTN threads and APEX developers in APEX OTN discussion forum gives a fair idea of amount of work going in APEX. Though a quarter of them use APEX with EBS.

If you want to follow Model-View-Controller (MVC) design pattern and have Java / J2EE resources at hand, OAF or ADF is a better choice. With OAF, you can use EBS security model, DFFs etc.

APEX doesn't replace OAF, it's highly productive, wizard driven development and deployment and easy to use navigation cannot go unnoticed.

No comments:

Post a Comment