You are on page 1of 2

Understanding

 APEX  5  Application  Development  


Source Code Distribution

This archive contains the following items.

DatabaseModifications.sql  

This file contains a series of SQL commands to modify your APEX database, as
indicated in the book. The easiest way to execute these commands is to upload the
file to APEX as a script, and then run the script. Follow these steps:

1. Go to the SQL Workshop home screen, and click the large SQL Scripts button.
2. Click the Upload button. This will bring up an Upload Script wizard.
3. Click the Choose File button, navigate to where you saved the file, and select
it.
4. Give the script a name. Any name will do. Then click the Upload button.
5. APEX will display a row corresponding to the script. Click its Run button at
the far right side.

This script should be executed once only. If for some reason you encounter an error
executing some of the commands, or you need to re-execute only part of the script,
you should do so by executing the commands individually. Load the script file into a
text editor, copy the command you want to execute, and paste it into the SQL
Command tool. Note that the tool will only let you execute one command at a time.

EmployeeDemo.sql  

This file is an exported version of my Employee  Demo example application. You can
import it to your APEX workspace as follows.

1. From the application builder home screen, click on the large Import button.
2. Click the Choose File button, navigate to where you saved the
EmployeeDemo.sql file, and select it.
3. Click the Next button to import the file.
4. The Import screen should indicate that the import was successful. Click its
Next button to start the installation process.
5. The Install Database Application screen describes some properties of the
application. You can leave them as is. Click the Install Application button.

You should now have your own copy of the Employee Demo application. Note that it
will not work correctly until you use the DatabaseModifications.sql file to modify the
database.
Images  

The Images folder contains JPEG files of the five images used in the book. Your
imported Employee  Demo application automatically uploads them as application
files. However, if you are building the demo application yourself, you will need to
upload them explicitly to that application. Here are the steps you need to take to
upload an image file:
1. Go to the home screen of your application, click the Shared Components
button, and find the Files section.
2. Click the Static Application Files link.
3. Click the Upload File button.
4. Click the Choose File button, navigate to where you saved the image file, and
select it.
5. Click the Upload button. (You can also click the Upload and Upload Another
button to quickly upload a series of images.)

Page  Code  

Importing the entire application is nice, but it doesn’t give you the experience of
actually using APEX to build an application. The Page  Code folder contains the code
snippets needed to build each individual page. Each significant SQL query,
expression, or PL/SQL block is stored in its own text file, and these files are
organized by page. These snippets let you build each page yourself without the
bother of having to type in all of the code. Instead, you can copy the desired code
from that page’s folder and paste it into the appropriate property in the APEX
property editor.

You might also like