oracle apex for beginners

71
Dimitri Gielis APEX for Beginners www.apexRnD.be dgielis.blogspot.com @dgielis [email protected]

Upload: dimitri-gielis

Post on 23-Jan-2018

195 views

Category:

Technology


9 download

TRANSCRIPT

Page 1: Oracle APEX for Beginners

Dimitri Gielis

APEX for Beginners

www.apexRnD.bedgielis.blogspot.com@[email protected]

Page 2: Oracle APEX for Beginners

Dimitri Gielis❖ Founder & CEO of APEX R&D❖ 19+ years of Oracle

Experience (OCP & APEX Certified)

❖ Oracle ACE Director❖ “APEX Developer of the year

2009” by Oracle Magazine❖ “Oracle Developer Choice

award (ORDS)” in 2015❖ Author Expert Oracle APEX❖ Presenter at Conferences

Page 3: Oracle APEX for Beginners

www.apexofficeprint.comwww.apexRnD.be

Page 4: Oracle APEX for Beginners

http://dgielis.blogspot.com @dgielis

Page 5: Oracle APEX for Beginners

How to Start

Page 6: Oracle APEX for Beginners

PersonaThis is Mathias Vanhove❖ MSc. Applied Computer Science❖ Skillset:

✓ Specialization: Usability ✓ Great: HTML 5, Css3✓ Ok: Javascript, C#/.NET, MySQL✓ None: APEX, Oracle DB, PL/SQL

❖ Ambitious❖ Eager to learn

Page 7: Oracle APEX for Beginners

The things Mathias Loves

❖ Usability and User Centered Design❖ Structure❖ Consistency❖ Reusability❖ Customizations

Page 8: Oracle APEX for Beginners

Mathias’ Learning Goal

Develop an APEX application

and learn all the necessary elements to do so.

Page 9: Oracle APEX for Beginners

Necessary elements?❖ APEX ❖ SQL❖ PL/SQL❖ Oracle DB❖ HTML 5❖ CSS3❖ Javascript

±

±

x

x

x

Page 10: Oracle APEX for Beginners

How Mathias started

1. Two introduction sessions 2. APEX R&D’s Guide 3. Book by Steven Feuerstein

4. Online Guide 5. Expert Oracle APEX

Page 11: Oracle APEX for Beginners

Structure of APEX

❖ APEX Page — App Builder❖ SQL Workshop❖ Shared Components

Page 12: Oracle APEX for Beginners

Structure of APEX

Page 13: Oracle APEX for Beginners

APEX Page: Elements you should understand

❖ Regions:➡ Possible types➡ Template options

❖ Dynamic Actions❖ Bind variables❖ Process vs. Computation❖ Define vs. Declare

Page 14: Oracle APEX for Beginners

SQL Workshop

❖ Use the Wizard to build tables❖ Get a good understanding of:

➡ Sequences➡ Triggers

Page 15: Oracle APEX for Beginners

Shared Components❖ List Of Values❖ Navigation:

➡ Navigation Menu➡ Breadcrumbs➡ Navigation Bar List

❖ Templates❖ etc.

Page 16: Oracle APEX for Beginners

Mathias’ APP

An easy to manage Information Security Document/ Guideline to be compliant for the European GDPR

legislation.

Page 17: Oracle APEX for Beginners

❖ Subjects❖ Sub-subjects❖ Content items for each sub-subject❖ Auditing/Evaluation system❖ Todo system❖ Maintainable

Information Security

Page 18: Oracle APEX for Beginners

Mathias’ problems

Ways to add help text

Page Items

Define vs. Declare

List Of Values

Customizations using PL/SQL

Select list: Dynamic Actions

Working dynamically with cards

Custom dynamic linking to pages

Table id-sequence + triggers

Changing templates to a custom one

Views vs inline SQL-join

Auto fill dateConcatenate two values in a select list

Building custom templates

Refresh page dynamic actionAdd PL/SQL to template

Clear cacheOracle Advisor Utility

Add HTML fields to Classic ReportEscape HTML characters

Debugging

Charts

Configure SQL Developer

PL/SQL package with a function

Subsitution Strings

Page 19: Oracle APEX for Beginners

Mathias’ problem

Page 20: Oracle APEX for Beginners

Mathias’ problems

Ways to add help text

Page Items

Define vs. Declare

List Of Values

Customizations using PL/SQL

Select list: Dynamic Actions

Working dynamically with cards

Custom dynamic linking to pages

Table id-sequence + triggers

Changing templates to a custom one

Views vs inline SQL-join

Auto fill dateConcatenate two values in a select list

Building custom templates

Refresh page dynamic actionAdd PL/SQL to template

Clear cacheOracle Advisor Utility

Add HTML fields to Classic ReportEscape HTML characters

Debugging

Charts

Configure SQL Developer

PL/SQL package with a function

List Of ValuesSelect list: Dynamic Actions

Concatenate two values in a select list

Subsitution Strings

Page 21: Oracle APEX for Beginners

Mathias’ problems

Page 22: Oracle APEX for Beginners

Mathias’ problems

Ways to add help text

Page Items

Define vs. Declare

List Of Values

Customizations using PL/SQL

Select list: Dynamic Actions Custom dynamic linking to pages

Table id-sequence + triggers

Changing templates to a custom one

Views vs inline SQL-join

Auto fill dateConcatenate two values in a select list

Refresh page dynamic actionAdd PL/SQL to template

Clear cacheOracle Advisor Utility

Add HTML fields to Classic ReportEscape HTML characters

Debugging

Charts

Configure SQL Developer

PL/SQL package with a function

Building Custom Templates

Working dynamically with cards

Subsitution Strings

Page 23: Oracle APEX for Beginners

Problem #1: Select List

❖ List Of Values❖ Concatenate two values❖ Dynamic Action❖ Dynamic content change

Page 24: Oracle APEX for Beginners

First step: build LoV query

Page 25: Oracle APEX for Beginners

First step: build LoV query

Page 26: Oracle APEX for Beginners

First step: build LoV query

Page 27: Oracle APEX for Beginners

First step: build LoV query

Page 28: Oracle APEX for Beginners

First step: build LoV queryFirst step: build LoV query

Page 29: Oracle APEX for Beginners

First step: build LoV query

Page 30: Oracle APEX for Beginners

Second step: Concatenate

❖ Google is your friend!❖ Difficulties to google

➡ Oracle APEX❖ Easy to do

Page 31: Oracle APEX for Beginners

Second step: Concatenate

Page 32: Oracle APEX for Beginners

Third step: Dynamic Action

❖ Not so hard when you followed the APEX R&D Course❖ Add a Dynamic Action❖ Use Change event

Page 33: Oracle APEX for Beginners

Third step: Dynamic Action

Page 34: Oracle APEX for Beginners

Third step: Dynamic Action

Page 35: Oracle APEX for Beginners

Third step: Dynamic Action

Page 36: Oracle APEX for Beginners

Third step: Dynamic Action

Page 37: Oracle APEX for Beginners

Third step: Dynamic Action

Page 38: Oracle APEX for Beginners

Fourth Step: Dynamic content

❖ Change content of Sub-subject based on selection of subject

❖ More advanced step❖ Substitution strings vs Bind variables

Page 39: Oracle APEX for Beginners

Fourth Step: Dynamic content

Page 40: Oracle APEX for Beginners

Fourth Step: Dynamic content

Page 41: Oracle APEX for Beginners

Fourth Step: Dynamic content

Page 42: Oracle APEX for Beginners

Some useful advice Mathias found when exploring the coding conventions of APEX R&D

Page 43: Oracle APEX for Beginners

Some useful advice Mathias found when exploring the Oracle Builder User Guideline

https://docs.oracle.com/database/121/HTMDB/concept_sub.htm#HTMDB03022

Page 44: Oracle APEX for Beginners

Problem #2: Templates

❖ Working dynamically with Cards➡ Where can I find the templates?➡ Template substitution

❖ Making an own template➡ Another problem➡ PL/SQL?

Page 45: Oracle APEX for Beginners

Working with Cards

Page 46: Oracle APEX for Beginners

Working with Cards

Page 47: Oracle APEX for Beginners

Working with Cards

Page 48: Oracle APEX for Beginners

Working with Cards

Page 49: Oracle APEX for Beginners

Working with Cards

Page 50: Oracle APEX for Beginners

Making your own template

❖ Goal: Show each sub-subject as a collapsible and show all content items for each sub-subject in that collapsible region.➡ Tried customization using PL/SQL➡ Failed —> Difficult when no knowledge of PL/SQL➡ Templates instead

Page 51: Oracle APEX for Beginners

The PL/SQL Way

❖ Bind to Page Item —> Error❖ Cursor loop❖ Collapsible region

Page 52: Oracle APEX for Beginners

Bind data to Page Item

❖ Create Page Items❖ Created a Process❖ Put data in the Page Items

Page 53: Oracle APEX for Beginners

❖ Logical error❖ Can’t bind more than one value

to a Page Item❖ Better solution?❖ Cursor Loops?❖ No Page Items, but inline html.

Bind data to Page Item

Page 54: Oracle APEX for Beginners

Cursor loops

❖ No output❖ "dbms_output.put_line();

Page 55: Oracle APEX for Beginners

❖ "sys.htp.p();"❖ Collapsible fail❖ Needed help!

Cursor loops

Page 56: Oracle APEX for Beginners

Mathias’ thoughts at this point

❖ Roeland’s advice❖ Customizations❖ Keep it simple❖ Use templates

Page 57: Oracle APEX for Beginners

Watch Jorge’s video’s on templates

http://rimblas.com/blog/author/admin/

Page 58: Oracle APEX for Beginners

How to create a template?

❖ Create a new "report" template❖ Insert your HTML template with Substitution strings❖ Use the Row Templates for loops❖ Use PL/SQL Conditions to keep track

Page 59: Oracle APEX for Beginners

How create a template?

Page 60: Oracle APEX for Beginners

Call it from your page

Page 61: Oracle APEX for Beginners

Result

Different Sub-Subjects

Different Content Items

Different Content Items for a Sub-Subject

Page 62: Oracle APEX for Beginners

Make it Collapsible

Page 63: Oracle APEX for Beginners

Building your own template

❖ Template Type❖ Right syntax: #BINDVARIABLE# instead of

#bindvariable#❖ PL/SQL conditions?❖ Loops on specific section?

Page 64: Oracle APEX for Beginners

Why these problems?

Page 65: Oracle APEX for Beginners

Why these problems?

❖ Structure/overview was missing❖ Lack of knowledge of all the existing APEX elements❖ Poor understanding of the meaning of specific APEX

terms ❖ Customize to fast❖ No perfect way

Page 66: Oracle APEX for Beginners

How Mathias started

1. Two introduction sessions 2. APEX R&D’s Guide 3. Book by Steven Feuerstein

4. Online Guide 5. Expert Oracle APEX

Page 67: Oracle APEX for Beginners

How you should start?!❖ Introduction training of APEX - Overview❖ Analyze an existing APEX page❖ Understand the Core Structure❖ APEX R&D introduction course / APEX Education Course (free)❖ Learn to master the key elements of the Core Structure❖ Read Oracle PL/SQL Programming (only part 1 and 2) by Steven

Feuerstein❖ QuickSQL and Blueprint❖ Start developing something easy using the key elements of APEX. Avoid

customizations!

Page 68: Oracle APEX for Beginners

Still a long road until reaching the top. But Mathias’ first steps are made.

Now it’s your turn!

Page 69: Oracle APEX for Beginners
Page 70: Oracle APEX for Beginners

Q&A www.apexRnD.bedgielis.blogspot.com@[email protected]

Page 71: Oracle APEX for Beginners

❖ Looking for consulting, training and development in Oracle Application Express (APEX)?

❖ Contact : www.apexRnD.be ❖ Mail : [email protected]

Consulting, Development, Training