Book Image

Oracle Application Express 3.2 - The Essentials and More

Book Image

Oracle Application Express 3.2 - The Essentials and More

Overview of this book

Developing data-centric web applications can be a real challenge as it is a multi-disciplinary process. There are many technologies involved in the client side (HTML, CSS, JavaScript, and so on); the interaction with the database, on the server side; the typeless nature of the web environment; and above all, the need to put it all together. This needs to be done in a manner that will allow the end users to do their job in the simplest and most efficient way, while enriching their user experience. How often have you wished that developing such applications could be uncomplicated and straightforward? This book will show you that it's possible, and teaches you how to do it, using Oracle Application Express (APEX).With this practical guide to APEX, you'll learn how to easily develop data-centric web applications for the Oracle environment. The book covers the development cycle of an APEX application, reviewing the major APEX principles and building blocks chapter by chapter. It starts with the basic skills you need to get going when developing with APEX. Later, you will learn advanced issues, such as how to build tailor-made forms and reports, using APEX APIs, AJAX, and so on. It not only deals with the "How" but also with the "Why", and before long you will be able to understand APEX concepts, and use them to expand and enhance the built-in features, wizards, and tools.The book starts with the design phase, including building the necessary database objects infrastructure; continues with ways to implement the application logic (on the server side) and the User Interface (on the client side), whilst showing you how to enhance your applications' features and functionality according to your specific needs; and it ends with application deployment.The book emphasizes and clearly documents areas such as Globalization, Localization, and developing multi-lingual applications, and includes a special discussion about Right-To-Left (RTL) support for APEX applications, documented here for the first time.Throughout the book, there are many screenshots and snippets of code, taken from working APEX applications. The book is accompanied by demo APEX applications that you can download and install in your APEX environment, thoroughly analyze, and learn from as you read the book.
Table of Contents (30 chapters)
Oracle Application Express 3.2
Credits
About the Authors
About the Reviewers
Preface

EPG Embbeded PL/SQL Gateway


This option is the default installation option on Oracle XE and Oracle 11g database. It replaces the use of the OHS (Oracle HTTP Server).

Unlike the OHS, which we need to install and configure manually, the EPG is installed by default as part of the installation process of Oracle XE and Oracle 11g, and all we need to do to complete the installation process is to run a SQL script that is provided to us with the APEX distribution file. The process is very well documented in the APEX installation guide.

The EPG is also using an alias - /i/ by default that points to the images directory; only this time we are not talking about an OS filesystem directory. All the files in the images directory are uploaded into the database (into the XDB that hosts the EPG) in a manner that mimics the hierarchical structure of the images directory. You can see the files with any Web browser that supports WebDAV (an extension to the HTTP protocol) and most of the modern Web browsers are. Using a similar URL to the following should display the files:

http://127.0.0.1:8080/i

Enabling FTP on EPG

If you want to manipulate the images directory files that were uploaded to the XDB or add files of your own (like CSS or JavaScript external files), you can use an FTP client. However, you should first enable the proper port in the EPG. The default FTP port is 21, and to enable it, you can use the following from SQL*Plus (connected as "SYS as SYSDBA"):

exec dbms_xdb.setftpport(21);

To verify the setting you can use:

select dbms_xdb.getftpport from dual;

Enabling remote access to EPG

By default, the access to the EPG is restricted to the local machine. If you want to enable remote access, you can use the following from SQL*Plus (connected as "SYS as SYSDBA"):

exec dbms_xdb.setlistenerlocalaccess(FALSE);

EPG versus OHS

EPG is only (officially) supported on Oracle XE and Oracle 11g database. There are some hacks that allow the use of EPG on a 10g database, but they are not recommended.

It can be very simple and comfortable to use EPG on the supported platforms, but experience shows us that, performance wise, it is slower than the OHS. As such, we recommend using it only for the development environment.

Note

The APEX license agreement stipulates that you can use the OHS, free of charge, as long as you are installing it on the same server as your APEX instance. In most cases, it should be good enough to serves the APEX needs.