For my employer Whitehorses I have written a new Whitebook on Application Translations in APEX. This Whitebook was written together with colleague Ome-B, the owner of www.Ome-B.nl and author of the book Oracle Application Express Forms Converter.
Following up on this Whitebook I have posted a blog at blog.whitehorses.nl, to explain how these translations work in the early adopters release of APEX 4.0.
Application Express comes packaged with the OracleXE and Oracle11g database versions. In XE you can get started with APEX right away. In 11g the embedded PL/SQL gateway has to be configured first. These steps take you through the process of running the configuration script apxconf.sql.
Running this script enables you to configure the port for the Oracle XML DB HTTP server and to specify a password for the Oracle Application Express ADMIN account. Then you unlock the ANONYMOUS account.
Perform the following steps:
1. Open a terminal window and enter the following commands:
sqlplus sys/ as sysdba
2. Enter an administrator password for the Application Express Administrator account and press Enter.
3. Enter 8080 for the port for the XDB HTTP server and press Enter. This is also the default port. Change this number when another application (eg. Tomcat) is running on the same port. Keep in mind that ports below 1024 are not advisable when running Linux/Unix.
(The embedded PL/SQL gateway has now been configured.)
4. Unlock the anonymous user. From your terminal window, enter the following command:
ALTER USER ANONYMOUS ACCOUNT UNLOCK;
And now you’re all set to start developing APEX applications in 11g.
When you later want to change the port on which APEX is configured, you can run the following command:
If you want to check what the current port is, use the following query:
select dbms_xdb.gethttpport from dual;
For more information, visit the Oracle site at www.oracle.com
Sometimes an APEX application performs worse than expected. This can have many causes, ranging from wrong parameters in the database (for example the SGA allocation) to less-than-optimal queries.
Besides the tools that a DBA has to check the performance and take action according to his findings, a developer also has some options to use in Application Express.
1. In the Apex Admin application there are some reports under the tab Monitor Activity. In the Page Views by View report that is found in the Page Views section, you can see how long it takes a page to load in the browser. Using this it is possible to see which pages take too long to load.
2. By using the Debug option in the developer toolbar, APEX generates a lot of debug information. Using this information a developer can see how a page is built-up in the browser. In front of each line of debug information is a time-stamp. This information allows a developer to analyze what part of a page is causing the delays.
3. It’s possible to let Application Express generate a trace file from the URL. To do this, simply add &p_trace=YES to the URL and call the page again. This generates a trc file in the user_dump_dest directory (find this using show parameter user_dump_dest). This file can also be analyzed to find where the problems may occur.
Offcourse this list is not a complete overview of all tools that are available to analyze performance problems, but I think you can get a good start.