Oracle APEX Best Practices
()
About this ebook
Related to Oracle APEX Best Practices
Related ebooks
Getting Started with Oracle Data Integrator 11g: A Hands-On Tutorial Rating: 5 out of 5 stars5/5Oracle APEX Reporting Tips & Tricks Rating: 2 out of 5 stars2/5Learning ELK Stack Rating: 0 out of 5 stars0 ratingsOracle APEX Tips and Tricks Rating: 0 out of 5 stars0 ratingsOracle APEX Cookbook - Second Edition Rating: 0 out of 5 stars0 ratingsAdvanced Oracle PL/SQL Developer's Guide - Second Edition Rating: 4 out of 5 stars4/5Oracle APEX Tips and Tricks: II Rating: 0 out of 5 stars0 ratingsBeginning Oracle Application Express Rating: 0 out of 5 stars0 ratingsOracle Database A Complete Guide - 2021 Edition Rating: 0 out of 5 stars0 ratingsMastering PL/SQL Through Illustrations: From Learning Fundamentals to Developing Efficient PL/SQL Blocks (English Edition) Rating: 0 out of 5 stars0 ratingsOracle Advanced PL/SQL Developer Professional Guide Rating: 4 out of 5 stars4/5Oracle Database 12c Release 2 Testing Tools and Techniques for Performance and Scalability Rating: 5 out of 5 stars5/5Oracle SQL and PL/SQL Rating: 5 out of 5 stars5/5Hands-On Oracle Application Express Security: Building Secure Apex Applications Rating: 0 out of 5 stars0 ratingsOracle E-Business Suite R12 Core Development and Extension Cookbook Rating: 0 out of 5 stars0 ratingsOracle E-Business Suite Manufacturing & Supply Chain Management Rating: 0 out of 5 stars0 ratingsORACLE PL/SQL Interview Questions You'll Most Likely Be Asked Rating: 5 out of 5 stars5/5Oracle Database 12c Install, Configure & Maintain Like a Professional: Install, Configure & Maintain Like a Professional Rating: 0 out of 5 stars0 ratingsSQL Server 2016 Reporting Services Cookbook Rating: 5 out of 5 stars5/5Implementing Oracle Integration Cloud Service Rating: 0 out of 5 stars0 ratingsOracle SQL In 10 Minutes Rating: 5 out of 5 stars5/5Pro Oracle SQL Development: Best Practices for Writing Advanced Queries Rating: 0 out of 5 stars0 ratingsOracle HCM Cloud A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsOracle Business Intelligence Enterprise Edition 12c - Second Edition Rating: 0 out of 5 stars0 ratingsOracle SOA Suite 12c Administrator's Guide Rating: 0 out of 5 stars0 ratingsOracle Cloud A Complete Guide - 2019 Edition Rating: 0 out of 5 stars0 ratingsOracle HCM Cloud The Ultimate Step-By-Step Guide Rating: 0 out of 5 stars0 ratingsOracle CPQ Cloud Complete Self-Assessment Guide Rating: 0 out of 5 stars0 ratingsOracle HCM Cloud A Complete Guide Rating: 0 out of 5 stars0 ratingsOracle Data Guard 11gR2 Administration Beginner's Guide Rating: 0 out of 5 stars0 ratings
Software Development & Engineering For You
Hand Lettering on the iPad with Procreate: Ideas and Lessons for Modern and Vintage Lettering Rating: 4 out of 5 stars4/5Learn to Code. Get a Job. The Ultimate Guide to Learning and Getting Hired as a Developer. Rating: 5 out of 5 stars5/5Python For Dummies Rating: 4 out of 5 stars4/5Coding with AI For Dummies Rating: 0 out of 5 stars0 ratingsGrokking Algorithms: An illustrated guide for programmers and other curious people Rating: 4 out of 5 stars4/5PYTHON: Practical Python Programming For Beginners & Experts With Hands-on Project Rating: 5 out of 5 stars5/527 PROGRAM MANAGEMENT INTERVIEW TECHNIQUES - To Ace That Dream Job Offer ! Rating: 5 out of 5 stars5/5SQL For Dummies Rating: 0 out of 5 stars0 ratingsManaging Humans: Biting and Humorous Tales of a Software Engineering Manager Rating: 4 out of 5 stars4/5How Do I Do That In InDesign? Rating: 5 out of 5 stars5/5Adobe Illustrator CC For Dummies Rating: 5 out of 5 stars5/5Beginning Programming For Dummies Rating: 4 out of 5 stars4/5Lua Game Development Cookbook Rating: 0 out of 5 stars0 ratingsBlender 3D Printing Essentials Rating: 0 out of 5 stars0 ratingsLevel Up! The Guide to Great Video Game Design Rating: 4 out of 5 stars4/5Agile Practice Guide Rating: 4 out of 5 stars4/5Coding All-in-One For Dummies Rating: 0 out of 5 stars0 ratingsLearning Python Rating: 5 out of 5 stars5/5How to Write Effective Emails at Work Rating: 4 out of 5 stars4/5OneNote: The Ultimate Guide on How to Use Microsoft OneNote for Getting Things Done Rating: 1 out of 5 stars1/5Debugging: The 9 Indispensable Rules for Finding Even the Most Elusive Software and Hardware Problems Rating: 4 out of 5 stars4/5Photoshop For Beginners: Learn Adobe Photoshop cs5 Basics With Tutorials Rating: 0 out of 5 stars0 ratingsGitLab Cookbook Rating: 0 out of 5 stars0 ratingsAfter Steve: How Apple Became a Trillion-Dollar Company and Lost Its Soul Rating: 4 out of 5 stars4/5Ry's Git Tutorial Rating: 0 out of 5 stars0 ratingsKodi Made Easy: Complete Beginners Step by Step Guide on How to Install Kodi on Amazon Firestick Rating: 0 out of 5 stars0 ratings
Reviews for Oracle APEX Best Practices
0 ratings0 reviews
Book preview
Oracle APEX Best Practices - Alex Nuijten
Table of Contents
Oracle APEX Best Practices
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Support files, eBooks, discount offers and more
Why Subscribe?
Free Access for Packt account holders
Instant Updates on New Packt Books
Preface
What this book covers
What you need for this book
Who this book is for
Conventions
Reader feedback
Customer support
Downloading the example code
Errata
Piracy
Questions
1. Prepare and Build
History and background
Installing APEX
Runtime or full development environment
Build status
Tablespaces
Converting runtime environment into a full development environment and vice versa
Choosing a web server
OHS
EPG
APEX Listener
Creating a second administrator
APEX web interface
Command line
Other accounts
Database
Data model
Creating the database objects
Other tools
PL/SQL usage
Creating a workspace
Creating administrators, developers, and users
User Interface Defaults
Attribute Dictionary
Table Dictionary
Creating User Interface Defaults
Page Zero
Structure of multiple applications
Subscribe and publish
Creating a framework
Master and template application
Login application—optional
System application—optional
Deploying
Template workspace
Creating applications
List of values
Mapping the model to pages
Base tables
Master detail
Intersection
Simple report
Other pages
Summary
2. Leveraging the Database
Instrumentation
Efficient lookup tables
Single-table hash clusters
Index-organized tables
Analytic functions
Syntax overview
Examples
Running totals
Visualizing the window
Accessing values from other records
Another way of accessing other rows in the result set
Ranking—top N
Stringing it all together
Caveats
Aggregate functions
Grouping sets
Rollup
Cube
Identifying the totals and subtotals with grouping
Offloading your frontend and scheduling a job
One-off job
Pipelined table functions
Pipelined table functions in APEX
Using images
Searching the contents of documents
Summary
3. Printing
Printing architecture
What is planned for the future version of APEX Listener?
Installation and configuration of the Apache FOP report server
How to configure Apache FOP
Business Intelligence Publisher
Installation of Business Intelligence Publisher Version 11
Simple print test using BI Publisher
How to debug or troubleshoot printing issues
How to check if network services are enabled
Creating a report with BI Publisher
Creating the report query
Designing the report layout
Downloading XML data
Designing with the RTF template (MS Word)
Uploading the report layout
Linking the report to your application
How to create a report that can deliver output in different formats
How to add a chart to a report
Creating a chart in a report
How to add dynamic images to a report
Print API
How to bypass the 32K limit
Alternatives to use for PDF printing
Integration with Oracle Reports
Integration with Cocoon
Integration with JasperReports
Architecture
Plugins
Reports 2 PDF
Embedded PDF
Summary
4. Security
Securing Oracle Application Express for administrators
Protecting the database environment
Virtual Private Database
VPD policy
VPD and Application Context
Implementing VPD in APEX
What to do when you get a runtime exception
Securing the web listener
HTTP server
Rewrite
Security considerations in the HTTP server
Embedded PL/SQL gateway
Oracle Application Express Listener
Enabling SSL for the web server
Security considerations when installing Oracle Application Express
Runtime installation
Access Control Lists (ACLs)
Enabling builders in Oracle Application Express
Session timeout
Instance level
Application level
Password complexity rules
Patching strategy
Security considerations for the developer
Browser attacks
Cross-site scripting (XSS)
Protecting HTML regions and other static areas
Protecting dynamic output
Protecting reports regions
Protecting form items
SQL injection
Insecure use of variables
Correct use of Bind variables
SYS.DBMS_ASSERT
Security attributes
Authentication
Available 'out of the box' authentication schemes
Oracle Application Express accounts
Custom
Database accounts
HTTP header variable
LDAP directory
No authentication
Open door credentials
Single sign on
Oracle Cloud identity management
Authorization
Creating an authentication schema from scratch
Creating an access control administration page
Applying authorization schemas
Database schema
URL tampering
Session state protection against URL tampering
Browser security attributes
Cache
Embed in Frames
Database session
Authorization and authentication plugin
Secure items in an application
Item encryption
Hidden items protection
Items of type password
File upload items
Managing instance security
Application data
Fake input
Saving state before branching
Utilities
Application dashboard
How to check the security of your application
Oracle Application Express Advisor
Third-party tools to check on security
Summary
5. Debugging and Troubleshooting
Debugging an APEX page
Instrumentation of the APEX code
APEX_APPLICATION.G_DEBUG
The debug Advanced Programming Interface (API)
The APEX debug message
APEX_DEBUG_MESSAGE.LOG_MESSAGE
WWV_FLOW_API.SET_ENABLE_APP_DEBUGGING
APEX and Oracle SQL Developer
Remote debugging
Steps to be performed in APEX
JavaScript console wrapper
Installation of the console wrapper
Web development tools
Firebug
APEX and Firebug
Debugging dynamic actions
Yslow
Error handling
Logging and tracing
Enabling/disabling logging
Reports in Application Express that facilitate troubleshooting
Application Express Advisor
Summary
6. Deploy and Maintain
Package your application, or not?
Version control
Subversion
Deploying the database packages
Deploying the APEX application
Using the APEX environment
Using the command-line interface
Housekeeping the APEX repository
Being active and proactive
Feedback
Activate feedback
Processing entered feedback
Weighted page performance
Summary
A. Database Cloud Service and APEX 4.2
Oracle Public Cloud
Packaged applications
Plan for the future
RESTful web services
The RESTful Web Services wizard
Data load feature (SQL Workshop/utilities/data load)
Summary
Index
Oracle APEX Best Practices
Oracle APEX Best Practices
Copyright © 2012 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the authors, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
First published: October 2012
Production Reference: 1181012
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham B3 2PB, UK.
ISBN 978-1-84968-400-2
www.packtpub.com
Cover Image by Sandeep Babu (<[email protected]>)
Credits
Authors
Learco Brizzi
Iloon Ellen-Wolff
Alex Nuijten
Reviewers
Dimitri Gielis
Surachart Opun
Michel van Zoest
Acquisition Editors
Dilip Venkatesh
Dhwani Devatar
Lead Technical Editor
Susmita Panda
Technical Editors
Prasad Dalvi
Lubna Shaikh
Project Coordinators
Yashodhan Dere
Jovita Pinto
Proofreader
Aaron Nash
Indexers
Tejal Soni
Hemangini Bari
Graphics
Valentina Dsilva
Aditi Gajjar
Production Coordinator
Nilesh R. Mohite
Cover Work
Nilesh R. Mohite
About the Authors
Learco Brizzi received his MSc in Informatics in 1993 and then he started working with the early versions of Oracle Forms (3.0), Reports (1.1), and Designer (1.2.1). When WebDB was launched, he created his first steps towards building Internet applications. When APEX (HTMLDB) hit the market, he saw the potential of this tool and built a complete music download store with it in 2004, including integration with e-mail, reports, and payment service providers. This was one of the very first serious applications ever built with APEX. Nowadays, Learco is dedicated to the APEX and PL/SQL development. He is a very enthusiastic technician, trainer of advanced APEX courses, presenter at conferences, organizer of seminars, committee member of the OGh (Oracle user group in Holland) and member of the editorial-committee for the Oracle magazine OGh Visie. Together with a companion Learco started his own company, Itium, in 1999, which specializes in Oracle technology. In May 2010, Learco was awarded the Oracle ACE membership. You can contact Learco at <[email protected]>.
I would like to thank my wife Judith, and my children Emma (my nine-year-old daughter) and Dante (my six-year-old son) for their patience and support they gave me while writing this book. Most of the work had to be done in the evenings and weekends (our family time together).
For me this was the first time I wrote a book and didn't know what to expect. I didn't expect that it would take so much time, but it was fun to do and I learned a lot of new things about Oracle and APEX as well.
I would also like to thank my fellow writers Alex and Iloon. Together we were a great team and kept each other sharp.
Last but not least I would like to thank the editors of the book who had good comments and suggestions on our material.
Iloon Ellen-Wolff started working with Oracle 21 years ago, employed by several software houses in the Netherlands. Her experience goes back to Oracle Forms version 2 and Report Writer.
Almost 14 years ago, she started working for Oracle Support Services for the developer competency (Oracle Forms, Oracle Reports, SQL Developer, and Application Express), assisting customers by solving their software-related problems.
During those years, she applied the knowledge she had gained in many ways such as coaching new engineers, team leading, teaching the Application Express courses, and seminars for Oracle University.
Aside from being a very senior team member with excellent troubleshooting and customer skills, in Oracle Support, she acts as Advanced Resolution Engineer.
One of her responsibilities in Oracle Support is Global Technical Lead Application Express. She works closely with Sustaining Engineering, Product Development, and Product Management of the Application Express team.
Starting last year, she is now involved in the Oracle Cloud project. She is member of the platform as a service readiness team. Involved in testing Application Express in the Cloud and being a trainer in this area, she enjoys the challenge to prepare her engineers for the Cloud and ultimately to support Oracle customers in the very near future!
Besides that, she is a frequent speaker for different Oracle User Groups about Application Express, SQL Developer, and Oracle Public Cloud.
I would like to take the opportunity to thank the Application Express development team and particularly Joel Kallman as Development Director for the continuing effort to make Application Express an excellent product.
I'd also like to thank my husband, Albert Ellen, for assisting me in getting the layout right and supporting me in writing this book. Of course, it took a big amount of time to achieve this goal.
I would also like to thank co-authors on this book, Alex and Learco.
Alex Nuijten works as a database developer and Expertise Lead (database development) for AMIS Services BV in Nieuwegein, The Netherlands. Besides his consultancy work, he conducts training classes, mainly in SQL and PL/SQL. Alex has been a speaker at numerous international conferences, such as ODTUG, Oracle Open World, UKOUG, IOUG, OGh, and OBUG. He is also a frequent contributor at the Oracle Technology Network forum for SQL and PL/SQL. He has written many articles in Oracle-related magazines, and at regular intervals he writes about Oracle database development on the AMIS Technology Blog (technology.amis.nl), as well as on his own blog, Notes on Oracle (nuijten.blogspot.com). In August 2010, Alex was awarded the Oracle ACE Director membership.
I think this may be the hardest section to write. There are so many people that inspired me and from whom I have learned so much along the way. And each one of them helped me in writing my chapters. It would be impossible to try to name you all and therefore do injustice to the ones I let slip. My colleagues, fellow members of the OTN forums and in the ACE program, the bloggers, the Oracle user groups all over the globe, basically everyone I ever dealt with—a big thank you to you all.
There are still some people I have to name in this section explicitly.
Let me start by thanking my co-authors, Iloon and Learco. Writing this book was quite a journey. Thank you for allowing me to join you with this adventure, it was a great experience.
Without the technical reviewers, this book would have looked totally different. Thank you, Dimitri Gielis, Surachart Opun, and Michel van Zoest, for your feedback and suggestions on improving the quality of the book. Any outstanding errors in my chapters are, of course, my own.
Without the continuing support of my wife Rian, son Tim, and daughter Lara, I could never have worked on this. Preparing presentations, writing articles and chapters take an enormous amount of time and my family understands this, and they are alright with it. I could never do all that without you, I love you so much.
Finally I would like to thank the Packt editorial and production teams who have worked on this book, especially Yashodhan Dere, Susmita Panda, Dilip Venkatesh, Dhwani Devatar, and Jovita Pinto.
About the Reviewers
Dimitri Gielis was born in 1978. Together with his family he lives in Leuven, Belgium.
At an early age, Dimitri started experimenting with computers (Apple II and IBM XT), and he quickly got to know that he would like to work with computers and especially with databases all his life.
In 2000, Dimitri began his career working as a consultant for Oracle Belgium where he came across almost every Oracle product. His main expertise was in the database area, but at that time he was also exposed to HTMLDB, which was renamed as Oracle Application Express later on. From the very start he liked the Oracle database and APEX so much that he never stopped working with it. Dimitri then switched to another company to create an Oracle team and do pre-sales, to later create and manage an Oracle Business Unit.
In 2007, Dimitri co-founded APEX Evangelists (http://www.apex-evangelists.com), together with John Scott. APEX Evangelists is a company that specializes in providing training, development, and consulting specifically for the Oracle Application Express product.
On his blog (http://dgielis.blogspot.com), he shares his thoughts and experience about Oracle, and especially, Oracle Application Express.
Dimitri is a frequent presenter at OBUG Connect, IOUG Collaborate, ODTUG Kaleidoscope, UKOUG conference, and Oracle Open World. He likes to share his experience and meet other people. He's also President of the OBUG (Oracle Benelux User Group) APEX SIG.
In 2008, Dimitri became an Oracle ACE Director. Oracle ACE Directors are known for their strong credentials as Oracle community enthusiasts and advocates.
In 2009, Dimitri received the APEX Developer of the year award by Oracle Magazine.
In 2012, Dimitri was part of the LA OTN Tour where he presented different APEX topics.
You can contact Dimitri at <[email protected]>.
Surachart Opun has been working on Oracle products for over seven years. He has worked with Internet Service Provider Business for over eight years. He is Oracle ACE, OCE RAC 10g, and OCP 10g and 11g. He has experience in implementation, migration, and management of Oracle Database in telecommunication business and so on. He has spent time in helping people who are interested in the Oracle products as contributor. He is working on APEX since version 3 and has worked on APEX implementation and migration.
His blog is at http://surachartopun.com.
Michel van Zoest was born in 1976. He currently lives in Bergambacht, The Netherlands with his wife, two daughters, and son.
In 2000, he started working as an Oracle Consultant. He now has more than 12 years of experience in building (web) applications by using the Oracle technologies such as Oracle (web) Forms, Oracle Designer, MOD_PLSQL, ADF, SOA Suite, and of course, APEX.
Michel was one of the first Oracle Application Express Developer Certified Experts in the world.
He currently works at Whitehorses in The Netherlands and runs his own blog at http://www.aboutapex.com. As well as that, he blogs at the company website at http://blog.whitehorses.nl and he regularly writes Whitebook articles (in Dutch) for Whitehorses.
Michel is also one of the authors of the Oracle APEX 4.0 Cookbook published by Packt in December 2010.
You can contact Michel via his website or by emailing him at <[email protected]>.
www.PacktPub.com
Support files, eBooks, discount offers and more
You might want to visit www.PacktPub.com for support files and downloads related to your book.
Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at
At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks.
http://PacktLib.PacktPub.com
Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books.
Why Subscribe?
Fully searchable across every book published by Packt
Copy and paste, print and bookmark content
On demand and accessible via web browser
Free Access for Packt account holders
If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access.
Instant Updates on New Packt Books
Get notified! Find out when new books are published by following @PacktEnterprise on Twitter, or the Packt Enterprise Facebook page.
Preface
Have you ever wanted to create real-world database applications? In this book, you will not only get APEX best practices, but will also take into account the total environment of an APEX application and benefit from it. Many examples are given based on a simple but appealing case.
This book will guide you through the development of real-world applications. It will give you a broader view of APEX. The various aspects include setting up an APEX environment, testing and debugging, security, and getting the best out of SQL and PL/SQL.
In six distinct chapters, you will learn about different features of Oracle APEX as well as SQL and PL/SQL.
Do you maximize the capabilities of Oracle APEX? Do you use all the power that SQL and PL/SQL have to offer? Do you want to learn how to build a secure, fully functional application? Then this is the book you'll need.
Oracle APEX Best Practices is where practical development begins!
What this book covers
Chapter 1, Prepare and Build, discusses different aspects of setting up an Application Express (APEX) environment. Among others, we'll take a look at installing APEX, performing preparational tasks before actually building applications, and transforming the data model into initial screens. We will also discuss some guidelines and best practices for these phases.
Chapter 2, Leveraging the Database, explains various subjects related to an APEX environment. These subjects include instrumentation, efficient lookup tables, analytic and aggregate functions, offloading long running programs, and so on.
Chapter 3, Printing, deals with different aspects of printing in Oracle Application Express. In this chapter, we will discuss the two most used architectures in Application Express printing, using Apache FOP and Business Intelligence Publisher. Then, we will see how to install and configure both Apache FOP and Business Intelligence Publisher.
Chapter 4, Security, describes how to provide security for Oracle Application Express. In this chapter, we will discuss the responsibilities of an administrator.