2. Contents
Module1: Introduction Oracle APEX
Introduction of Oracle APEX
Advantages
History
Module2: Architecture
Oracle Application Express Architecture
Module 3: Browser Based application development
APEX hierarchical menu structure
Application Builder
SQL Workshop
Team Development
Administrator
Module 4: Benefits of Oracle APEX
Use Cases
Out of Box Advantages
Mobile Support
Module 5: Demo Application
Database Design
ER Diagram
3. Contents
Module6: SQL Workshop
Navigate to the Object Browser
Defining the table and column
Defining the primary key
Constraint definition step
Review the create table
Module 7:Loading Data with the Data Workshop Utility
Preparing to copy and paste the spreadsheet data and load it into
the existing TICKETS table Application Builder
Creating a Lookup Table
Module 8: Application And Navigation
Choosing the type of application
Naming the application
Selecting theme
Module 9: Forms and Reports: Basics
Entering the schema and table name
Specifying page region
Specifying buttons.
Complete first application
4. Introduction
Oracle Apex: Oracle Application Express is a rapid
Web application development tool that lets you share
data and create applications. Using only a Web
browser and limited programming experience, you can
develop and deploy applications that are fast and
secure.
APEX is a 100% browser-based rapid application
development (RAD) tool that helps you to create rich
interactive interactive Oracle-based web applications
very quickly and with relatively little programming
effort.
5. Advantages of Oracle APEX
Fast growing technology
Web-based
Developers familiar with PL/SQL can use the same skill set when developing
Apex applications
Easy to create mock-ups
Easy to deploy (end user opens a URL to access an APEX application)
Scalable (can be deployed to laptops, stand-alone servers, or Oracle RAC
installations)
Server-side processing and validations
Strong and supportive user community (especially Oracle APEX forum)
Basic support for group development
Free hosting of demo applications provided by Oracle
Apex applications can run on the free Oracle Express Edition (XE) database
Individual components of an application can be retrieved or identified using
SQL
6. HTML DB 1.5
First Release
HTML DB 1.6
Themes
2004 2007 2012
Application Express 2.1
Oracle XE
Application Express 2.2
Packaged Applications
Application Express 3.1
Interactive Reports
HTML DB 2.0
SQL Workshop
Application Express 3.0
Flash Charts
PDF Printing
Access Migration
Application Express 3.2
Oracle Forms to APEX
Conversion
Application Express 4.1
Data Upload
Error Handling
ROWID
2006 2009 201120082005
Application Express 4.2
Mobile
HTML5
Packaged Apps
Application Express 4.0
Websheets
Dynamic Actions
Plug-Ins
Team Development
2010
History
8. Architecture
Oracle Application Express consists of
--A metadata repository that stores the definitions of applications and
--An engine (called the Application Express engine) that renders and
processes pages.
It lives completely within your Oracle database.
It is comprised of nothing more than data in tables and large amounts
of PL/SQL code.
The essence of Oracle Application Express is approximately 425 tables
and 230 PL/SQL packages containing 425,000+ lines of code.
11. Application Builder
The Application Builder is where you create and modify
applications and pages, and it’s where you’ll probably
spend most of your time.
Centerpiece of APEX
Loaded with wizards
Reports, forms and charts
Connect pages using branches
75 pre-defined widgets
Basic HTML, pop-up lists, calendars, etc.
Full data entry validation
12. SQL Workshop
The SQL Workshop is where you deal directly with the
underlying database objects and their related data. Think of
it as a web-based version of SQL*PLUS with some GUI
goodness thrown in to make things easier.
- Object Browser to review and maintain DB Objects
- SQL Commands to run SQL
- SQL Scripts to upload and execute script files
- Utilities include Query Builder, Data Workshop, Generate
DDL, Schema Comparison and more
- RESTful Services to define Web Services using SQL and
PL/SQL against the database
13. Team Development
Team Development is the section that lets you enter and
track information related to the development of APEX
applications.
Team Development allows development teams to better
manage their APEX projects by defining milestones,
features, to-dos and bugs
Features, to-dos and bugs can be associated with specific
applications and pages as necessary
Developers can readily configure feedback to allow their
end-users to provide comments on applications.
The feedback also captures relevant session state details
and can be readily converted to a feature, to-do or bug.
14. Administrator
Workspace Administrators can administer their
workspace and use the various reports to monitor
activity
Manage Service allows them to request more space or
access to another schema
Manage Users and Groups allows them to define
developers and end-users
15. Benefits of Oracle APEX
Runs within Database Self Service Provisioning
Leverage SQL SkillsRapid Browser Based Development
Point your browser and start developing Build reports and charts using SQL
Out-of-the-box elastic private cloud service
Simple to manage, highly scalable
16. Use Cases
Data-driven Applications
Develop opportunistic and
departmental productivity
applications
Online Reporting
Build SQL-based reporting applications
on existing database schemas
Access Replacement
Consolidate outgrown Access applications to
the Oracle database with an APEX Web
front end
Spreadsheet Web-ification
Convert spreadsheets to Web applications
where they can be concurrently viewed and edited
Oracle Forms Modernization
Leverage SQL & PL/SQL declarative
programming skills to move Forms
applications to HTML / Web 2.0
17. Out of Box Development Features
Reports
Forms
Charts
Calendar
Templates
Navigation
Validations
Processes
Computations
Branches
Web Services
Email Services
Translation Services
Conditional Processing
Authentication
Authorization
Session State Management
Logging & Monitoring
18. Mobile Support
Declarative support for building mobile web applications
APEX Applications support multiple user interfaces:
e.g. Desktop and Smartphone
Mobile pages use jQuery Mobile through
jQuery Mobile based themes and templates
HTML5 charts and new HTML5 item types
By using APEX we can develop Web as well as
Hybrid Applications in Android , iOS and Windows .
23. Navigate to the Object Browser
1. Log into your APEX workspace. You’re presented with the
workspace’s Home page.
2. Using the tabbed navigation bar across the top of the
Home page, pull down the
SQL Workshop submenu by clicking the arrow on the right
side of the tab.
24. Defining the tables and column
3. Click the Object Browser option.
4. In the Object Browser, click the Create button in the upper-
right corner and select Table from the drop-down menu.
5.Enter the details for the TICKETS table. Then click Next.
25. Defining the table’s primary key
6. Select the Populated from a new sequence radio button. After the screen
changes, select TICKET_ID (NUMBER) for the primary key. Click Next.
7. You’re not going to create any foreign keys in this table just yet, so leave the
defaults and click Next.
26. The Constraints definition step
8. We’re not going to create any Unique or Check
constraints here, so stick with the defaults and click
Next.
27. Review the Create Table Wizard’s SQL
Review the text in the SQL region presented by the Create
Table Wizard. Click Create Table to complete the
wizard.
29. Loading Data with the Data Workshop Utility
1. Go to SQL Workshop->Utilities->Data Workshop
30. Preparing to copy and paste the spreadsheet data and
load it into the existing TICKETS table
1.Locate the helpdesk_spreadsheet.xls file where you downloaded the supporting files for
this book, and open it with Microsoft Excel. Navigate to the TICKETS tab. Notice that you
have a row for each ticket and a header row that contains the column headings for each of
the columns.
2. Select all the data, including the column headings, and copy it to the clipboard. Be
cautious not to accidentally select any rows that don’t have data in them, because that may
cause phantom rows or errors in the Data Load Wizard.
3. Switch back to your web browser, and, using the pull-down menu on the SQL Workshop
tab, select Data Workshop.
4. In the Data Load region, click Spreadsheet Data. You should see the Load Data
dialog
shown in Figure
31. Cont..
5. In the wizard, select Existing table for Load To and Copy
and paste for Load From, and click Next.
6. Select your “parse as” Schema from the Schema select
list. This is the same schema in which you created your
tables in the Object Browser.
7. Select TICKETS for the Table Name, as shown in
Figure, and click Next. This is the table into which you’ll
load the TICKETS data.
32. Pasting the spreadsheet data into the
Data text box
8. Paste the data that you copied to the clipboard in step 2 into the
Data text area, and ensure that First row contains column
names box is checked, as shown in Figure. Click Next.
9. When you’re sure all the mappings are correct, click the Load
Data button to load the data into the TICKETS table.
33. Preparing to copy and paste the spreadsheet data and
load it into the existing TICKETS table
Follow the previous steps and load data into
TICKETS_DETAILS table..
34. Creating a Lookup Table
1. Navigate to the Object Browser, and select the TICKETS
table in the Object List on the left side of the screen.
You should see results similar to those shown in Figure
35. Clicking the Create Lookup Table button
starts the Create Lookup Table Wizard
2. Make sure the Table tab is selected.
3. Below the tab bar is a set of button-like links. Click the
Create Lookup Table button, as shown by the mouse
arrow in Figure; it starts the Create Lookup Table Wizard.
36. Selecting the STATUS column as the source of your
lookup table
4. Select STATUS as the column from which you want to create the lookup table, and
click Next.
5. On this screen you can name your lookup table and the sequence that is related to it.
APEX
has chosen a reasonable name for the new table and sequence, so take the defaults and
click Next.
6. The final screen of the wizard provides you with information about the
choices made and the action that is about to be performed. It’s easy to miss the SQL syntax
link just below the wizard region. Click the SQL link to show the SQL.
37. Clicking the SQL syntax link shows the SQL
about to be executed
6. The final screen of the wizard (Figure 4-18) provides you
with information about the choices made and the action
that is about to be performed. It’s easy to miss the SQL
syntax link just below the wizard region. Click the SQL
link to show the SQL.
39. Choosing the type of application
Here we will deal with Database type of Application
40. Database Applications from Scratch
1. Navigate to the Application Builder, and click the
Create button to initiate the Create
Application Wizard.
2. Select Database as the application type, and click
Next.
41. Naming the Application
3. Enter Help Desk for the Name, make sure your Schema is set
correctly, select Include Home Page for Create Options, set
User Interface to Desktop, and then click Next
42. Multiple pages defined in the Create Application
Wizard
4. An application home page has already been created.
Accept the defaults on this page, and click Next.
43. The Attributes page of the Create Application
Wizard
6. Set Authentication Scheme to Application Express, Tabs to One Level of
Tabs, Language to English (en), and User Language Preference Derived
From to Application Primary Language.
7. Choose DD-MON-YYYY for Date Format and DD-MON-YYYY HH:MI:SS
for Date Time. Format, and leave the last two options blank.
8. Click Next.
44. Selecting a Theme
9. Select Standard Themes from the Show select list,
and then choose Scarlet (Theme 21) as the theme
for your application.
10. Click Next.
45. Completing the Create Application Wizard
11. Review the wizard’s summary page, and confirm the
choices you’ve made by clicking
Create Application.
46. Completion of a Page
First Page completed….!!!
Run the Application
48. Entering the schema and table name
1. Run your Help Desk application.
2. Click Create in the Developer toolbar at the bottom of
the screen.
3. Select New Page, and click Next.
4. Select Form, and click Next.
5. Select Form on a Table or View, and click Next.
6. Set Table/View Owner to your schema, and select
TICKETS (table) for Table/View Name, as shown in
Figure . Click Next.
49. Specifying page, region, and breadcrumb
information
7. Enter 2 for Page Number, as shown in Figure. Enter
Create a Ticket for both Page Name and Region Title.
Set Breadcrumb to Breadcrumb. When the page
refreshes, click Home (under Select Parent Entry) to
set it as the Parent Entry, and click Next.
50. Specifying tab options
8. For Tab Options , select Use an existing tab set and
reuse an existing tab within that tab set. When the
page refreshes, set Tab Set to TS1 (Home), set Use Tab
to T_HOME, and then click Next.
52. Specifying the buttons to display
12. Enter Cancel for Cancel Button Label and Create a
Ticket for Create Button Label. Set Show Save Button
and Show Delete Button to No, as shown in Figure,
and click Next.
53. Specifying processing for submit and
cancel
13. Set both After Page Submit and Processing
Branch to Page and When Cancel Button Pressed
Branch to This Page to 1, and click Next. See
Figure
54. 14. Click Create to complete the wizard.
15. Run your application.
We’ve just created a fully operational form on the
TICKETS table
Generally release a new version of APEX annually
* Next release will be APEX 5.0 – See Statement of Direction for more details
[http://www.oracle.com/technetwork/developer-tools/apex/application-express/apex-sod-087560.html]
- Rapid “declarative” environment with numerous wizards to define pages and regions - Extend report source, validations, processes, etc using SQL and PL/SQL or call packages, functions in the Oracle Database
APEX lives within the Oracle Database making it easy for DBAs to manage and at the data source making it very scalable
Can readily configure provisioning to allow access across your organization from a single Oracle instance
With Application Express you can build very simple applications, say by converting a spreadsheet, to extremely complex applications that integrate with several other systems
Rapidly develop applications on top of Oracle Tables
Provide “Interactive” reporting capabilities
Convert a spreadsheet to run on the Oracle database and provide a single source of truth
Rearchitect your Forms applications and re-use all of the existing database objects using a tool that Forms developers can easily learn and relate to as SQL and PL/SQL based
Improve security and performance of Access applications by converting them to Oracle using SQL Developer to define the data structures and migrate data and APEX to build the applications on top of
Just about every RAD tool can quickly build the components listed on the left-hand side using wizards just like APEX
However, for those components in the center many require significant hand-coding, whereas APEX handles such features declaratively
Then when you look at the components on the right-hand side this is where APEX separates itself from the rest
- The translation services within APEX allow developers to use one code base and deliver mulitple languages
- Conditional processing is available on almost every component - From pages to items, including processing can have simple “is null” to complex conditions such as calls to Oracle database functions
- Build-in Authentication themes, authorization schemes, and session state management make it easy to secure and manage user sessions allowing developers to concentrate on solving the business solutions rather than coding all of the plumbing required
The Application Builder is enhanced to support the declarative building of mobile applications. Among the numerous changes made are: Updated Create Application wizard to support generation of applications for Desktop or Mobile; Updated Create Page and Region wizards, to expose Components applicable to Mobile applications
By incorporating jQuery Mobile application wills render correctly on all mobile devices, old and new. Applications will run on iOS, Android, Blackberry, Windows Mobile etc.
For older devices that don’t fully support HTML5 equivalent components will be rendered so that users can still maintain data.
Updating charting engine allows defining HTML5 charts for mobile applications
Text fields can now have sub-types of Email, Phone and URL which will bring up appropriate keyboards on HTML5 compliant devices
For instance, in the TICKETS table, notice that the STATUS column has only three values—OPEN, CLOSED, and
PENDING—which repeat over and over. The data values in this column indicate that it's a perfect candidate for creating
a lookup table