SlideShare a Scribd company logo
Introduction to Application Express (formerly HTML DB) By Larry Linnemeyer, TUSC
Abstract You may have heard about Oracle Application Express or HTML DB.  This tool is Oracle's scaled down version of Oracle Portal.  It's a powerful and easy way to quickly develop a database-centric HTML Web application.  You can install APEX on your own machines or run in a hosted environment on Oracle's site.  All development (construction of pages) is done through the browser interface.  You can use the SQL Workshop and the Data Workshop to run SQL and add data to your environment.  This easy-to-use tool will impress you in no time at all!
Agenda APEX Defined Uses – who, what, when, where, why Building applications with APEX APEX Administration and Monitoring Tips and Techniques
APEX  Defined
What is APEX? Oracle’s answer to “Wizards” Meta Data (lots of it!) Dynamic HTML (fast!) PL/SQL - No Java Does anything you can do in SQL or PL/SQL Nice Web-based team development environment
It’s Origin Originated from Tom Kyte’s “ASK TOM” site Used mod_plsql to develop Became “Project Marvel” then HTML DB Now it’s APEX Also referred to as Einstein
You’re a good candidate for APEX if you fit the following profile You are, or have developers who are, skilled in SQL and PL/SQL Your application is database-centric Your application can be developed using a hosted service You are comfortable with a declarative/4GL programming model   You want to migrate an Access / Excel application to Oracle
Scalable? APEX.oracle 5,500 active workspaces Dell 6550 4x2.0 Ghz Xeon Processors 6 GB RAM Red Hat AS 2.1 5,500+ schemas DB Size ~75 GB SGA Size ~1.5GB Average Unique Page Views: 25,000+ per weekday Average Page View Time: <.5 seconds 1 DBA – manages 15 other DBs
Major Components Administration SQL Workshop Application Builder
Components SQL Workshop Interact with your database as with SQL*Plus, but visual Data dictionary and object browsing, query by example Administration Manage users Manage services Monitor activity Application Builder 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
More Features Session and State Management Each user has a session Valid username/password is required User Interface Control Look-and-feel is separate from application logic Extensive templates Flexible Authentication and Authorization Schemes Can use pre-built / built-in methods or custom
“ Installing” APEX Apply for a free account at apex.oracle.com  Set up other developers / users for testing Can optionally download and install locally Run the script on your 9iR2 or better database (also need Apache listener) Down / Upload your applications to your home system Continue development on your home system Oracle 10g Companion CD Oracle Express Edition Develop your application (read the Help messages – they really do help!) Excellent support via OTN discussion forum
Architecture Browser Oracle Database APEX Oracle HTTP Server
Architecture B Browser Oracle Database APEX Oracle HTTP  Server Firewall Instead of the Oracle HTTP Server, you can use the  HTTP Server supplied with Oracle Application Server 9i or 10g
APEX   Uses Who, What, When,  Where, Why…
What can you do with APEX? Select Journal Article review system (developed in 2 weeks) Web Collaboration application (developed in 2 days) General purpose Customer Survey (developed in 1 day) Survey Administration screens (developed in 2 hours)
Select Journal Article review
Web Collaboration application
Customer Survey
Survey Administration
Testing Application
Creating an APEX Application Generally speaking
Log into Workspace Use the Workspace you chose, the username and password emailed to you
Home Menu You’re ready to begin Build Applications Work in SQL Work with Data Manage users
Migrate Data Import data from Spreadsheets, XML or Delimited Files
Load Northwinds? I loaded the Northwinds Database from SQL Server Used Periscope to load/copy data Once loaded, view data using SQL Workshop
Drill and Create Can  Drill into data Count rows Insert/Edit rows Query by Example View components Much more…
Use the Wizards APEX’s many  wizards will simplify your life – use them! Reports, Charts, Forms, Calendars, Trees, etc.
Create a Hardware Inventory Application
Building an application “from scratch” – in 5 simple steps Login with developer privileges Use the SQL tools to make your tables, constraints, triggers, procedures etc. Start a new application (use the wizard) Customize the application (check each change as you make it) Deploy to the users!
Example Hardware Inventory App Record and view hardware inventory Searchable report  Present analysis graphically as well as numerically Design for novice users Remote users with access to Internet
Main Menu
Import Data  (SQL Workshop)
Converting Data Previously, data was stored in an Excel spreadsheet Conveniently, this can be made into an Oracle table by simply copying and pasting into the APEX create table wizard Select Region Copy from Excel
Import Data Wizard
Paste Your Data In…
Set Column Preferences
Create a Primary Key and sequence
Object Detail for Table Created  (in Object Browser)
Create Lookup Table Select column for look up Specify lookup table specifics
Create an Application
Create the application form scratch (this time)
Add Report and Form based on Hardware table Notice inclusion of Analysis pages
Specify Details for Analysis
Could add as many pages as you want
Select Levels of Tabs
Can Share Components for  other applications
Specify Security and Language
Choose a Theme
Verify and Finish
Run your new Application! (you will need to log in)
Instant Application! Searchable report  Links to edit individual rows
Instant Application! Edit form with Calendar widget Picklist based off lookup table
Instant Application! Analysis Chart and Report
Good start but improvements can be made Makes “codes” more meaningful Format output Edit page through edit link
Three basic areas for each page
Elements of a Page Shared Components Tabs Navigation bar Templates Regions Items Labels Buttons Widgets
Most things are created through WIZARDS Step by step  Collect essential info
EVERYTHING has attributes and almost everything has an edit page All of the basic attributes collected through the wizards, and many more detailed attributes are editable through an elements attribute/edit page.  All of this information is called Meta Data.
Attribute/Edit Pages Attributes in regions by logical groups Quick navigation to each region Many items are select lists Almost all have context sensitive help
Reuse of Shared Components LOV used for both report and edit
Easy Data Validation Some validation created automatically based on database. Others easily created with wizard.
Validation Wizard Choose the item Specify the validation type
Validation Wizard Choose subtype Specify sequence and where error message is to be displayed
Validation Wizard Depending on method, provide validation details Specify error message Always look for help provided Examples Item lookups
MOST things can be CONDITIONAL! Many, many different types of conditions available. Item is displayed or processed depending on the outcome of the condition.
Validation Message displayed by item, central location or both  Navigation not allowed until validations pass
Security Two levels Authentication, controls initial access to the application Authorization, can control access to tabs, pages, regions, items, buttons, read/write vs read only, ….. Use APEX built in functionality, totally custom or somewhere in between.
Make a backup!
Save the export
Deployment Process Development Production Data HTML DB App PL/SQL Code (Periodic Refresh)
APEX Administration Administrator controls Workspaces  Workspaces control developer access and provide resources.
APEX Administration Workspaces can be requested. Workspaces are “provisioned” Initial users are created, more can be created by the “workspace” administrator Workspaces/Applications can be monitored.
Workspace  Administration Workspace administrator manages services Creates and alters workspace / application users Monitors Activity
Workspace  Administration Many reports and charts are available to monitor workspace activity. Many application reports are also available (to developers also)
APEX   Tips and Techniques
Sample Applications The Sample Applications have great examples Take some time to understand the applications Standard Sample – Common Concepts
More Examples Collections Showcase – Shopping cart concepts Web Services Presidential Inaugural Addresses  – Oracle Text Examples
Spend Time on Analysis/Design Time Well Spent Follows standard design principals Storyboard approach makes it a visual process Pay me now or pay me more later… Poor design, results in a poor application Important to understand Web development to design
Storyboard Design Take the time to map our your tabs, menus, layout and design Home Page Products Consulting Training A… B… C... Products Consulting Training
Debugging To view the current value of any object (if you’re a developer), you can click on the session button at any time
Help! The online help that is available is very well written as a reference The OTN Discussion Forum is very helpful!  http://forums.oracle.com/forums/forum.jspa?forumID=137
Web Services Web Services provide you the power of running a process on someone else’s machine as if it’s on your own machine
Creating a Popup You can specify a TARGET=NEW for an href if you want the URL / Link to pop up a new page when clicked This is useful when referencing other sites
“ Report” on Page If you wish to execute a query and return the results to page region that you create, rather than using a PL/SQL block, use a “Report.”
Adding Images To add images, static HTML / Docs and CSS files to the application, click on Shared Components Images CSS Static Files
Beware! Bugs do exist in APEX Be careful about changing things once they are created Changing “Types” Changing Item Names
Advanced Topics Debugging Using Collections Authentication & Authorization Administration Deployment Process Available Functions & APIs Monitoring Activity
Debugging Run any page in your application Turn on debug mode by clicking on  Debug  in the developer toolbar Timing is processor time, not rendering time Append  &p_trace=YES  to your URL to generate SQL Trace File http://hostname.com/pls/htmldb/f?p=100:1&p_trace=YES
Using Collections Enable you to temporarily capture rows and columns of data Data is persistent throughout a users unique session Examples of when to use a collection: A wizard with more than one page A shopping cart application
Controlling Collections HTMLDB_COLLECTION API Create Delete Truncate Add/Update/Delete Members Check Status Merging Managing
Authentication & Authorization Establish User Identity Through Authentication Provide Security Through Authorization
Authentication HTML DB will assign the authenticated username to the built-in substitution string :APP_USER Several Schemes No Authentication/DAD LDAP OracleAS SSO (App as a Partner App) OracleAS SSO (HTLM DB as Partner App) HTML DB Internal Open Door Custom
Authorization Once a user is Authenticated, Authorization Schemes control what that user can/cannot see & do Several Scheme Types Exists or NOT Exists SQL Query Item is NULL or NOT NULL PL/SQL Function Value of Item = or != Specified Value
Administration An HTML DB Administrator’s main task is to manage the instance of HTML DB Monitor Activity to ensure good performance Some common tasks include Approving Service & Change Requests Managing Schema to Workspace Mappings Managing Schemas & Tablespaces All Other Associated DBA functions http://hostname.com/pls/htmldb/htmldb_admin
Available Functions & APIs Four major APIs HTMLDB_UTIL HTMLDB_ITEM HTMLDB_APPLICATION HTMLDB_CUSTOM_AUTH
APEX Summary For additional information, check out: http://apex.oracle.com Externally Hosted Instance OTN Discussion Forums HTML DB “How To” Documents
Reference Materials
Referencing Items Substitution String #variableName# Short Substitution String &variableName PL/SQL v(‘variableName’) nv(‘numericValue’) Bind Variable :variableName Items can be used to: Include a substitution string within a template Create an item at the application or page level Use built-in substitution strings to achieve a specific type of functionality
&variableName. &variableName is used when you need to substitute a variable as when you are building a link to another page You often need to place a period at the end of the name For example: f?p=&app_id.:2:&session
#variableName# #variableName# is similar to &variableName. but is used in templates and as a parameter in SQL statements
:variableName :variableName represents a bind variable and can be used in SQL Query and PL/SQL regions For example: SELECT project_title, total_cost FROM projects WHERE project_id = :P1_project_id
v(‘variableName’) v('variableName') or nv(‘numericVariableName') are functions from the HTML DB APIs that can be used in PL/SQL or SQL statement where a function is called For example: htp.anchor('f?p=' || :app_id || ':2:' || v('SESSION'), 'An HTML DB Link') ;
Implicit Variables APP_SESSION  APP_USER  IMAGE_PREFIX  WORKSPACE_IMAGES  APP_IMAGES  BROWSER_LANGUAGE  PRINTER_FRIENDLY  HOME_LINK  PROXY SERVER  REQUEST  SYSDATE_YYYYMMDD DEBUG  APP_ID  APP_PAGE_ID  APP SCHEMA OWNER  SQLERRM  AUTHENTICATED_URL_PREFIX  LOGOUT_URL  PUBLIC_URL_PREFIX  CURRENT_PARENT_TAB_TEXT  APP_ALIAS  APP_UNIQUE_PAGE_ID
f?p Syntax f=function, that handles it all p=parameters, separated by a colon f?p=16654:104 1) Application Number (16654, &APP_ID.) 2) Page Number (104) 3) Session (&SESSION.) 4) Request 5) Debug 6) Clear Cache (RP resets pagination) 7) Item Names, comma separated 8) Item Values, comma separated 9) Printer Friendly For blank parameters, just include the colon with nothing between
Summary Powerful Relatively Easy Fast Secure Really works Hosted TUSC’s Vision Passionate about the Technology Best in  the World Economic engine Oracle
Questions and Answers
htmldb.oracle.com metalink.oracle.com technet.oracle.com otn.oracle.com www.tusc.com Oracle Press, “Oracle HTML DB Handbook” by Lawrence C Linnemeyer and Bradley D. Brown Where to Get More Information
Thank you to Brad Brown, the other team members of TUSC for their contributions to this presentation. Please report errors to TUSC.  Neither TUSC, or the author warrant that this document is error-free. TUSC © 2006.  This document may not be copied or reproduced without the express written consent of TUSC. Special Thanks To…

More Related Content

PPTX
Oracle application express
PPTX
Oracle application express ppt
PDF
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)
PPT
Oracle Apex Overview
PDF
Application express
PPTX
Oracle Apex Technical Introduction
PPTX
Creating Single Page Applications with Oracle Apex
PPT
Electronic patients records system based on oracle apex
Oracle application express
Oracle application express ppt
Installing Oracle 11g and Oracle Apex 5.1 ( Easy Way To install)
Oracle Apex Overview
Application express
Oracle Apex Technical Introduction
Creating Single Page Applications with Oracle Apex
Electronic patients records system based on oracle apex

What's hot (20)

PDF
Oracle Application Express 20.2 New Features
PPTX
Oracle Forms to APEX conversion tool
PPTX
Integration of APEX and Oracle Forms
PPTX
Quick & Easy SharePoint Forms with StratusForms
PDF
Next Level PowerApps SPS St Louis
PDF
Oracle apex-hands-on-guide lab#1
PPTX
Apex basics-for Beginners
PPTX
Next Level PowerApps
PPTX
Introduction to apex code
PDF
Power Apps Advanced Training Brochure
PDF
Oracle database 12c application express release notes
PPTX
Salesforce Basic Development
PDF
Get the Look and Feel You Want in Oracle APEX
PPTX
Introduction Asp.Net Core, MVC, Docker (Linux), Postman and Swagger
PPTX
Powering Up SharePoint Forms with PowerApps
PPTX
COB - PowerApps - the good, the bad and the ugly - early 2018
PPT
7 Tips For Better JDeveloper Experience
PPTX
RPA with UIPath and Flaui
PPT
PDF
Oracle Text in APEX
Oracle Application Express 20.2 New Features
Oracle Forms to APEX conversion tool
Integration of APEX and Oracle Forms
Quick & Easy SharePoint Forms with StratusForms
Next Level PowerApps SPS St Louis
Oracle apex-hands-on-guide lab#1
Apex basics-for Beginners
Next Level PowerApps
Introduction to apex code
Power Apps Advanced Training Brochure
Oracle database 12c application express release notes
Salesforce Basic Development
Get the Look and Feel You Want in Oracle APEX
Introduction Asp.Net Core, MVC, Docker (Linux), Postman and Swagger
Powering Up SharePoint Forms with PowerApps
COB - PowerApps - the good, the bad and the ugly - early 2018
7 Tips For Better JDeveloper Experience
RPA with UIPath and Flaui
Oracle Text in APEX
Ad

Viewers also liked (20)

PPT
Intro oracle10gexpress
PPTX
Step By Step How To Install Oracle XE
PDF
Tutorial Instalisasi Oracle 10g dan Setting User
PPT
IBM Informix Database SQL Set operators and ANSI Hash Join
PDF
Oracle intro to designer abridged
PPTX
Sql server ___________ (advance sql)
PPT
Time-Based Blind SQL Injection using Heavy Queries
PPTX
Oracle database introduction
PPTX
T sql語法之 cte 20140214
PPT
Managing Oracle Streams Using Enterprise Manager Grid Control
PPT
Transaction
PDF
Oracle dba trainining in hyderabad
PPTX
Oracle: Joins
PDF
Oracle 10g Installation
PPT
Advanced sql
PPT
Advanced Sql Training
PPTX
SQL Data Manipulation
PDF
Oracle Essentials Oracle Database 11g
PPTX
Sql joins
Intro oracle10gexpress
Step By Step How To Install Oracle XE
Tutorial Instalisasi Oracle 10g dan Setting User
IBM Informix Database SQL Set operators and ANSI Hash Join
Oracle intro to designer abridged
Sql server ___________ (advance sql)
Time-Based Blind SQL Injection using Heavy Queries
Oracle database introduction
T sql語法之 cte 20140214
Managing Oracle Streams Using Enterprise Manager Grid Control
Transaction
Oracle dba trainining in hyderabad
Oracle: Joins
Oracle 10g Installation
Advanced sql
Advanced Sql Training
SQL Data Manipulation
Oracle Essentials Oracle Database 11g
Sql joins
Ad

Similar to Intro to Application Express (20)

PPT
Web Development In Oracle APEX
PDF
Getting Started with Oracle APEX
PDF
Oracle APEX 18.1 New Features
PDF
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
PDF
20100604 unyoug apex40_bauser
PPT
apex101-326750.ppt
PDF
Apex 4.0 @ ODTUG 2009
PPTX
Zero to Sixty with Oracle ApEx
PDF
Pretius Oracle Apex Primer
PDF
APEX – jak vytvořit jednoduše aplikaci
PPTX
Oracle apex training
PPT
apex--introduction-157585.ppt
PDF
Advanced Reporting And Charting With Oracle Application Express 4.0
PPTX
Oracle APEX Introduction (release 18.1)
PPT
Oracle Application Express
PDF
UNYOUG - APEX 19.2 New Features
PDF
Sewtz apex ui
PDF
APEX 4.2 New Features
PDF
Apexandfreeadboow19tues 190924225740
PDF
Oracle APEX, Oracle Autonomous Database, Always Free Oracle Cloud Services
Web Development In Oracle APEX
Getting Started with Oracle APEX
Oracle APEX 18.1 New Features
APEX Alpe Adria Mike Hichwa Keynote April 11th 2019- Zagreb
20100604 unyoug apex40_bauser
apex101-326750.ppt
Apex 4.0 @ ODTUG 2009
Zero to Sixty with Oracle ApEx
Pretius Oracle Apex Primer
APEX – jak vytvořit jednoduše aplikaci
Oracle apex training
apex--introduction-157585.ppt
Advanced Reporting And Charting With Oracle Application Express 4.0
Oracle APEX Introduction (release 18.1)
Oracle Application Express
UNYOUG - APEX 19.2 New Features
Sewtz apex ui
APEX 4.2 New Features
Apexandfreeadboow19tues 190924225740
Oracle APEX, Oracle Autonomous Database, Always Free Oracle Cloud Services

Recently uploaded (20)

PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PPTX
Understanding_Digital_Forensics_Presentation.pptx
PDF
Empathic Computing: Creating Shared Understanding
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Encapsulation_ Review paper, used for researhc scholars
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Approach and Philosophy of On baking technology
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
The Rise and Fall of 3GPP – Time for a Sabbatical?
PDF
Encapsulation theory and applications.pdf
PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PDF
Electronic commerce courselecture one. Pdf
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Building Integrated photovoltaic BIPV_UPV.pdf
Understanding_Digital_Forensics_Presentation.pptx
Empathic Computing: Creating Shared Understanding
Dropbox Q2 2025 Financial Results & Investor Presentation
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Encapsulation_ Review paper, used for researhc scholars
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Approach and Philosophy of On baking technology
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
The Rise and Fall of 3GPP – Time for a Sabbatical?
Encapsulation theory and applications.pdf
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
“AI and Expert System Decision Support & Business Intelligence Systems”
Electronic commerce courselecture one. Pdf
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

Intro to Application Express

  • 1. Introduction to Application Express (formerly HTML DB) By Larry Linnemeyer, TUSC
  • 2. Abstract You may have heard about Oracle Application Express or HTML DB. This tool is Oracle's scaled down version of Oracle Portal. It's a powerful and easy way to quickly develop a database-centric HTML Web application. You can install APEX on your own machines or run in a hosted environment on Oracle's site. All development (construction of pages) is done through the browser interface. You can use the SQL Workshop and the Data Workshop to run SQL and add data to your environment. This easy-to-use tool will impress you in no time at all!
  • 3. Agenda APEX Defined Uses – who, what, when, where, why Building applications with APEX APEX Administration and Monitoring Tips and Techniques
  • 5. What is APEX? Oracle’s answer to “Wizards” Meta Data (lots of it!) Dynamic HTML (fast!) PL/SQL - No Java Does anything you can do in SQL or PL/SQL Nice Web-based team development environment
  • 6. It’s Origin Originated from Tom Kyte’s “ASK TOM” site Used mod_plsql to develop Became “Project Marvel” then HTML DB Now it’s APEX Also referred to as Einstein
  • 7. You’re a good candidate for APEX if you fit the following profile You are, or have developers who are, skilled in SQL and PL/SQL Your application is database-centric Your application can be developed using a hosted service You are comfortable with a declarative/4GL programming model You want to migrate an Access / Excel application to Oracle
  • 8. Scalable? APEX.oracle 5,500 active workspaces Dell 6550 4x2.0 Ghz Xeon Processors 6 GB RAM Red Hat AS 2.1 5,500+ schemas DB Size ~75 GB SGA Size ~1.5GB Average Unique Page Views: 25,000+ per weekday Average Page View Time: <.5 seconds 1 DBA – manages 15 other DBs
  • 9. Major Components Administration SQL Workshop Application Builder
  • 10. Components SQL Workshop Interact with your database as with SQL*Plus, but visual Data dictionary and object browsing, query by example Administration Manage users Manage services Monitor activity Application Builder 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
  • 11. More Features Session and State Management Each user has a session Valid username/password is required User Interface Control Look-and-feel is separate from application logic Extensive templates Flexible Authentication and Authorization Schemes Can use pre-built / built-in methods or custom
  • 12. “ Installing” APEX Apply for a free account at apex.oracle.com Set up other developers / users for testing Can optionally download and install locally Run the script on your 9iR2 or better database (also need Apache listener) Down / Upload your applications to your home system Continue development on your home system Oracle 10g Companion CD Oracle Express Edition Develop your application (read the Help messages – they really do help!) Excellent support via OTN discussion forum
  • 13. Architecture Browser Oracle Database APEX Oracle HTTP Server
  • 14. Architecture B Browser Oracle Database APEX Oracle HTTP Server Firewall Instead of the Oracle HTTP Server, you can use the HTTP Server supplied with Oracle Application Server 9i or 10g
  • 15. APEX Uses Who, What, When, Where, Why…
  • 16. What can you do with APEX? Select Journal Article review system (developed in 2 weeks) Web Collaboration application (developed in 2 days) General purpose Customer Survey (developed in 1 day) Survey Administration screens (developed in 2 hours)
  • 22. Creating an APEX Application Generally speaking
  • 23. Log into Workspace Use the Workspace you chose, the username and password emailed to you
  • 24. Home Menu You’re ready to begin Build Applications Work in SQL Work with Data Manage users
  • 25. Migrate Data Import data from Spreadsheets, XML or Delimited Files
  • 26. Load Northwinds? I loaded the Northwinds Database from SQL Server Used Periscope to load/copy data Once loaded, view data using SQL Workshop
  • 27. Drill and Create Can Drill into data Count rows Insert/Edit rows Query by Example View components Much more…
  • 28. Use the Wizards APEX’s many wizards will simplify your life – use them! Reports, Charts, Forms, Calendars, Trees, etc.
  • 29. Create a Hardware Inventory Application
  • 30. Building an application “from scratch” – in 5 simple steps Login with developer privileges Use the SQL tools to make your tables, constraints, triggers, procedures etc. Start a new application (use the wizard) Customize the application (check each change as you make it) Deploy to the users!
  • 31. Example Hardware Inventory App Record and view hardware inventory Searchable report Present analysis graphically as well as numerically Design for novice users Remote users with access to Internet
  • 33. Import Data (SQL Workshop)
  • 34. Converting Data Previously, data was stored in an Excel spreadsheet Conveniently, this can be made into an Oracle table by simply copying and pasting into the APEX create table wizard Select Region Copy from Excel
  • 38. Create a Primary Key and sequence
  • 39. Object Detail for Table Created (in Object Browser)
  • 40. Create Lookup Table Select column for look up Specify lookup table specifics
  • 42. Create the application form scratch (this time)
  • 43. Add Report and Form based on Hardware table Notice inclusion of Analysis pages
  • 45. Could add as many pages as you want
  • 47. Can Share Components for other applications
  • 51. Run your new Application! (you will need to log in)
  • 52. Instant Application! Searchable report Links to edit individual rows
  • 53. Instant Application! Edit form with Calendar widget Picklist based off lookup table
  • 54. Instant Application! Analysis Chart and Report
  • 55. Good start but improvements can be made Makes “codes” more meaningful Format output Edit page through edit link
  • 56. Three basic areas for each page
  • 57. Elements of a Page Shared Components Tabs Navigation bar Templates Regions Items Labels Buttons Widgets
  • 58. Most things are created through WIZARDS Step by step Collect essential info
  • 59. EVERYTHING has attributes and almost everything has an edit page All of the basic attributes collected through the wizards, and many more detailed attributes are editable through an elements attribute/edit page. All of this information is called Meta Data.
  • 60. Attribute/Edit Pages Attributes in regions by logical groups Quick navigation to each region Many items are select lists Almost all have context sensitive help
  • 61. Reuse of Shared Components LOV used for both report and edit
  • 62. Easy Data Validation Some validation created automatically based on database. Others easily created with wizard.
  • 63. Validation Wizard Choose the item Specify the validation type
  • 64. Validation Wizard Choose subtype Specify sequence and where error message is to be displayed
  • 65. Validation Wizard Depending on method, provide validation details Specify error message Always look for help provided Examples Item lookups
  • 66. MOST things can be CONDITIONAL! Many, many different types of conditions available. Item is displayed or processed depending on the outcome of the condition.
  • 67. Validation Message displayed by item, central location or both Navigation not allowed until validations pass
  • 68. Security Two levels Authentication, controls initial access to the application Authorization, can control access to tabs, pages, regions, items, buttons, read/write vs read only, ….. Use APEX built in functionality, totally custom or somewhere in between.
  • 71. Deployment Process Development Production Data HTML DB App PL/SQL Code (Periodic Refresh)
  • 72. APEX Administration Administrator controls Workspaces Workspaces control developer access and provide resources.
  • 73. APEX Administration Workspaces can be requested. Workspaces are “provisioned” Initial users are created, more can be created by the “workspace” administrator Workspaces/Applications can be monitored.
  • 74. Workspace Administration Workspace administrator manages services Creates and alters workspace / application users Monitors Activity
  • 75. Workspace Administration Many reports and charts are available to monitor workspace activity. Many application reports are also available (to developers also)
  • 76. APEX Tips and Techniques
  • 77. Sample Applications The Sample Applications have great examples Take some time to understand the applications Standard Sample – Common Concepts
  • 78. More Examples Collections Showcase – Shopping cart concepts Web Services Presidential Inaugural Addresses – Oracle Text Examples
  • 79. Spend Time on Analysis/Design Time Well Spent Follows standard design principals Storyboard approach makes it a visual process Pay me now or pay me more later… Poor design, results in a poor application Important to understand Web development to design
  • 80. Storyboard Design Take the time to map our your tabs, menus, layout and design Home Page Products Consulting Training A… B… C... Products Consulting Training
  • 81. Debugging To view the current value of any object (if you’re a developer), you can click on the session button at any time
  • 82. Help! The online help that is available is very well written as a reference The OTN Discussion Forum is very helpful! http://forums.oracle.com/forums/forum.jspa?forumID=137
  • 83. Web Services Web Services provide you the power of running a process on someone else’s machine as if it’s on your own machine
  • 84. Creating a Popup You can specify a TARGET=NEW for an href if you want the URL / Link to pop up a new page when clicked This is useful when referencing other sites
  • 85. “ Report” on Page If you wish to execute a query and return the results to page region that you create, rather than using a PL/SQL block, use a “Report.”
  • 86. Adding Images To add images, static HTML / Docs and CSS files to the application, click on Shared Components Images CSS Static Files
  • 87. Beware! Bugs do exist in APEX Be careful about changing things once they are created Changing “Types” Changing Item Names
  • 88. Advanced Topics Debugging Using Collections Authentication & Authorization Administration Deployment Process Available Functions & APIs Monitoring Activity
  • 89. Debugging Run any page in your application Turn on debug mode by clicking on Debug in the developer toolbar Timing is processor time, not rendering time Append &p_trace=YES to your URL to generate SQL Trace File http://hostname.com/pls/htmldb/f?p=100:1&p_trace=YES
  • 90. Using Collections Enable you to temporarily capture rows and columns of data Data is persistent throughout a users unique session Examples of when to use a collection: A wizard with more than one page A shopping cart application
  • 91. Controlling Collections HTMLDB_COLLECTION API Create Delete Truncate Add/Update/Delete Members Check Status Merging Managing
  • 92. Authentication & Authorization Establish User Identity Through Authentication Provide Security Through Authorization
  • 93. Authentication HTML DB will assign the authenticated username to the built-in substitution string :APP_USER Several Schemes No Authentication/DAD LDAP OracleAS SSO (App as a Partner App) OracleAS SSO (HTLM DB as Partner App) HTML DB Internal Open Door Custom
  • 94. Authorization Once a user is Authenticated, Authorization Schemes control what that user can/cannot see & do Several Scheme Types Exists or NOT Exists SQL Query Item is NULL or NOT NULL PL/SQL Function Value of Item = or != Specified Value
  • 95. Administration An HTML DB Administrator’s main task is to manage the instance of HTML DB Monitor Activity to ensure good performance Some common tasks include Approving Service & Change Requests Managing Schema to Workspace Mappings Managing Schemas & Tablespaces All Other Associated DBA functions http://hostname.com/pls/htmldb/htmldb_admin
  • 96. Available Functions & APIs Four major APIs HTMLDB_UTIL HTMLDB_ITEM HTMLDB_APPLICATION HTMLDB_CUSTOM_AUTH
  • 97. APEX Summary For additional information, check out: http://apex.oracle.com Externally Hosted Instance OTN Discussion Forums HTML DB “How To” Documents
  • 99. Referencing Items Substitution String #variableName# Short Substitution String &variableName PL/SQL v(‘variableName’) nv(‘numericValue’) Bind Variable :variableName Items can be used to: Include a substitution string within a template Create an item at the application or page level Use built-in substitution strings to achieve a specific type of functionality
  • 100. &variableName. &variableName is used when you need to substitute a variable as when you are building a link to another page You often need to place a period at the end of the name For example: f?p=&app_id.:2:&session
  • 101. #variableName# #variableName# is similar to &variableName. but is used in templates and as a parameter in SQL statements
  • 102. :variableName :variableName represents a bind variable and can be used in SQL Query and PL/SQL regions For example: SELECT project_title, total_cost FROM projects WHERE project_id = :P1_project_id
  • 103. v(‘variableName’) v('variableName') or nv(‘numericVariableName') are functions from the HTML DB APIs that can be used in PL/SQL or SQL statement where a function is called For example: htp.anchor('f?p=' || :app_id || ':2:' || v('SESSION'), 'An HTML DB Link') ;
  • 104. Implicit Variables APP_SESSION APP_USER IMAGE_PREFIX WORKSPACE_IMAGES APP_IMAGES BROWSER_LANGUAGE PRINTER_FRIENDLY HOME_LINK PROXY SERVER REQUEST SYSDATE_YYYYMMDD DEBUG APP_ID APP_PAGE_ID APP SCHEMA OWNER SQLERRM AUTHENTICATED_URL_PREFIX LOGOUT_URL PUBLIC_URL_PREFIX CURRENT_PARENT_TAB_TEXT APP_ALIAS APP_UNIQUE_PAGE_ID
  • 105. f?p Syntax f=function, that handles it all p=parameters, separated by a colon f?p=16654:104 1) Application Number (16654, &APP_ID.) 2) Page Number (104) 3) Session (&SESSION.) 4) Request 5) Debug 6) Clear Cache (RP resets pagination) 7) Item Names, comma separated 8) Item Values, comma separated 9) Printer Friendly For blank parameters, just include the colon with nothing between
  • 106. Summary Powerful Relatively Easy Fast Secure Really works Hosted TUSC’s Vision Passionate about the Technology Best in the World Economic engine Oracle
  • 108. htmldb.oracle.com metalink.oracle.com technet.oracle.com otn.oracle.com www.tusc.com Oracle Press, “Oracle HTML DB Handbook” by Lawrence C Linnemeyer and Bradley D. Brown Where to Get More Information
  • 109. Thank you to Brad Brown, the other team members of TUSC for their contributions to this presentation. Please report errors to TUSC. Neither TUSC, or the author warrant that this document is error-free. TUSC © 2006. This document may not be copied or reproduced without the express written consent of TUSC. Special Thanks To…