Date post: | 05-Dec-2014 |
Category: |
Technology |
Upload: | jan-huyzentruyt |
View: | 3,618 times |
Download: | 3 times |
Karen Van Hellemont Jan Huyzentruyt Your Oracle Solutions Partner
Use the Power of APEX Dictionary Views to Increase the Quality of Your APEX Applications
2
Agenda
• Our Company iAdvise • Apex Development Approach • Increasing the Quality of Apex Applications
– Apex Development Standards – The Basic Idea – From Basic Idea to Custom Apex QA System
• Conclusion
Age
nda
3
Agenda
• Our Company iAdvise • Apex Development Approach • Increasing the Quality of Apex Applications
– Apex Development Standards – The Basic Idea – From Basic Idea to Custom Apex QA System
• Conclusion
Age
nda
4
Who is iAdvise? O
ur C
ompa
ny iA
dvis
e Located in Belgium
5
Who is iAdvise?
• Started in 2004 • Member of The Cronos Group • Oracle-based solutions • 50 Oracle specialists today • Turnover of € 4.500.000 (± $ 7.000.000) • End 2007 – O2U in The Netherlands
Now 15 consultants
Our
Com
pany
iAdv
ise
Cronos is
6
How do we work? • Stress on people
– Mix of young potentials and experienced “coaches” – Maximum training, close follow-up – Knowledge sharing!
• Finding the equilibrium between solutions and technology
• Initiatives to stay ahead – Certified consultants – Competence centers with “core” teams – Fusion Regional Director – Seminars and sessions at Oracle events – Oracle Blog
Our
Com
pany
iAdv
ise
7
Our
Com
pany
iAdv
ise
How do we work?
RAD Race 2007-2008
8
Competence Centers
Oracle Platform
Classic Development • SQL, PL/SQL • Designer • Forms • Reports
New Technology • APEX development • Java - J2EE, OC4J, frameworks
• SOA, BPEL, BAM • WebCenter
Infrastructure • Oracle AS Admin • Monitoring, Tuning • Hosting
Datawarehouse & BI • Architecture and design • ETL – OWB, ODI • BI Suite (Dashboard, Answers)
Additional Services • Oracle Portal Development
• High Level Consultancy • Oracle Licenties
Our
Com
pany
iAdv
ise
9
Agenda
• Our Company iAdvise • Apex Development Approach • Increasing the Quality of Apex Applications
– Apex Development Standards – The Basic Idea – From Basic Idea to Custom Apex QA System
• Conclusion
Age
nda
10
• Reason 1: – Every company is looking for a custom project and
development approach – Main Objective is:
“Reach the desired result in the fastest and best possible way without exceeding the budget and with an acceptable quality level” A
pex
Dev
elop
men
t App
roac
h Apex Development Approach
Why?
11
• Reason 2: – The entrance level for learning Apex is very low – A lot of our junior developers get their first project
experience in an Apex context
“There is a need for supervision and guidance”
Apex Development Approach
Why?
Ape
x D
evel
opm
ent A
ppro
ach
12
Apex Core Team
• With Apex as development tool you can realize projects – At a good price – Within an aggressive time frame
• Apex Core team: young people – Talented – Motivated – Enthusiast – Full of energy
Ape
x D
evel
opm
ent A
ppro
ach
13
Apex Core Team
• But they need guidance + supervision
• One tries to equip project team members with tools & techniques
• Create a development workplace to efficiently pilot and control the development process
Ape
x D
evel
opm
ent A
ppro
ach
14
Looking for a standard way of working based on:
Project Methodology
Project Workplace
Project Workplace A
pex
Dev
elop
men
t App
roac
h
15
A typical project workplace looks like a workbench where all necessary materials are available
Project Workplace A
pex
Dev
elop
men
t App
roac
h
16
Pan-Ora-Mix
• Started an internal project • Code-name “Pan-Ora-Mix”
“Brings together all kinds of Oracle knowledge spanning several years of Apex project experiences and blend it together to a magic potion…”
Ape
x D
evel
opm
ent A
ppro
ach
17
Pan-Ora-Mix
• Sample apex applications – Packaged applications that can be downloaded from http://
apex.oracle.com – Applications already built by iAdvise
• Add-ons and toolsets – pGen4O (PL/SQL Generator) – IAF (reusable components for Apex) – xTra4o (Xliff Translator): http://www.iadvise.be/xtra4o – BiP4Apex (Application document generator via BiP) – Qa4o (QA Check)
• Tips, guidelines, standards, best practices
Ingredients of that magic potion are:
Ape
x D
evel
opm
ent A
ppro
ach
18
Agenda
• Our Company iAdvise • Apex Development Approach • Increasing the Quality of Apex Applications
– Apex Development Standards – The Basic Idea – From Basic Idea to Custom Apex QA System
• Conclusion
Age
nda
19
• At the beginning of a new Apex-project some development standards are needed, like – Coding style conventions – Naming conventions
• Originally we used a standard form, but – How can you check that these standards are
followed? • A more automated approach is needed
Ape
x D
evel
opm
ent S
tand
ards
Apex Conventions
20
Ape
x D
evel
opm
ent S
tand
ards
Convention Checklist
Example of a Convention Checklist
21
DEMONSTRATION
Manually checking development standards using the convention checklist
Convention Checklist A
pex
Dev
elop
men
t Sta
ndar
ds
22
Agenda
• Our Company iAdvise • Apex Development Approach • Increasing the Quality of Apex Applications
– Apex Development Standards – The Basic Idea – From Basic Idea to Custom Apex QA System
• Conclusion
Age
nda
23
Apex stores all the metadata of the application in a repository within the database, owned by the FLOWS_xyz schema. Tables in the FLOWS-schema are not public and are not quite “readable”.
Since Apex 2.2 Oracle implemented a more accessible layer: the so-called Apex repository views. They are recognizable by the prefix ‘APEX_’ and are all made public.
With the release of Apex 3.0, the views are also documented within the tool (see Home> Utilities> Apex Views). Th
e B
asic
Idea
The Apex Repository
24
The
Bas
ic Id
ea
The Apex Repository
Apex Dictionary Tree View
25
• Apex dictionary views can be grouped in different areas • Everything a developer “programs” can be queried
via those APEX_APPLICATION_xxx views
= Basic foundation to set-up a Quality Assurance System for controlling whether the development standards are
respected The
Bas
ic Id
ea
The Apex Repository
26
• Step 1: We write queries on the Apex dictionary views which contain development standards
• Example 1: – We want to find regions that are not based on the
template “Reports Region” – Therefore we query the view
APEX_APPLICATION_PAGE_REGIONS and look at the template column
The
Bas
ic Id
ea
Step 1: Writing Queries
27
The
Bas
ic Id
ea
Step 1: Writing Queries SELECT xapg.page_id, xapr.page_name,
xapr.region_name,
xapr.source_type,
xapr.template as wrong_value,
xapp.application_id as apex_app_id
FROM apex_application_page_regions xapr
JOIN apex_application_pages xapg ON
(xapg.page_id = xapr.page_id AND
xapg.application_id = xapr.application_id)
JOIN apex_applications xapp ON xapp.application_id =
xapg.application_id
WHERE xapg.page_id <> 0 -- exclude page zero
AND xapr.source_type IN ('Report', 'Tabular Form', 'PL/SQL')
AND xapr.template NOT LIKE 'Reports Region'
28
• Example 2: – We want to find regions where the pagination
scheme is different from “Row Ranges 1-15 16-30 in select list (with pagination)”
– Therefore we query the same view APEX_APPLICATION_PAGE_REGIONS and look at the pagination_scheme column
The
Bas
ic Id
ea
Step 1: Writing Queries
29
The
Bas
ic Id
ea
Step 1: Writing Queries SELECT xapg.page_id, xapr.page_name,
xapr.region_name,
xapr.source_type,
xapr.pagination_scheme as wrong_value,
xapp.application_id as apex_app_id
FROM apex_application_page_regions xapr
JOIN apex_application_pages xapg ON
(xapg.page_id = xapr.page_id AND
xapg.application_id = xapr.application_id)
JOIN apex_applications xapp ON xapp.application_id =
xapg.application_id
WHERE xapg.page_id <> 0 -- exclude page zero
AND xapr.source_type IN ('Report', 'Tabular Form', 'PL/SQL')
AND xapr.pagination_scheme <> 'Row Ranges 1-15 16-30 in select list (with pagination)'
30
• Step 2: – We assemble all quality check queries – We “UNION” them in our own QA-views
• Example: – We want one view that checks the correct template
and pagination scheme
The
Bas
ic Id
ea Step 2: Creating own QA-Views
31
The
Bas
ic Id
ea
CREATE OR REPLACE VIEW QA_APEX_APP_PAGE_REGIONS AS SELECT …
FROM apex_application_page_regions xapr
JOIN …
WHERE …
AND xapr.template NOT LIKE 'Reports Region'
UNION
SELECT …
FROM apex_application_page_regions xapr
JOIN …
WHERE …
AND xapr.pagination_scheme <> 'Row Ranges 1-15 16-30 in select list (with pagination)'
Step 2: Creating own QA-Views
32
• Step 3: – We place different checks in different groups – For each group we build a view, consisting of
different UNION’ed select statements – Within each group we define checks, corresponding
with a specific select against the apex repository
The
Bas
ic Id
ea
Step 3: Grouping Checks
33
The
Bas
ic Id
ea
Step 3: Grouping Checks
Shortname Group QA View Name APR Application Page Regions QA_APEX_APP_PAGE_REGIONS APRC Application Page Rep
Columns QA_APEX_APP_PAGE_RPT_COLS
API Application Page Items QA_APEX_APP_PAGE_ITEMS APP Application Page
Processes QA_APEX_APP_PAGE_PROC
APV Application Page Validations
QA_APEX_APP_PAGE_VAL
Check Groups with Corresponding QA-Views
34
The
Bas
ic Id
ea
Step 3: Grouping Checks
Check Points within each Check Group Group Identif. Code Quality Check APR APR-001 Wrong Reports Region Template APR APR-002 Wrong no_data_found_message APR APR-003 Wrong maximum_rows_to_query APR APR-004 Wrong pagination_scheme APR APR-005 Wrong enable_csv_output APR APR-006 Wrong report_null_value_as APR APR-007 No ORDER BY - No Default sort sequence APRC APRC-001 Wrong date format APRC APRC-002 Wrong Heading Alignment API API-001 Wrong date format in Date Picker API API-002 Date column NOT based on Date Picker APP APP-001 Verify (Length) PL SQL Source APP APP-002 No Process Error Message APV APV-001 Wrong error_display_location ... ... ...
35
• Step 4: – We can now run our custom defined QA-views – The output shows the standards that aren’t
respected – Example: SELECT * FROM qa_apex_app_page_items
The
Bas
ic Id
ea
Step 4: Running Queries
36
Step 4: Running Queries
Example: SELECT * FROM qa_apex_app_page_items
SQL Developer Output
37
Agenda
• Our Company iAdvise • Apex Development Approach • Increasing the Quality of Apex Applications
– Apex Development Standards – The Basic Idea – From Basic Idea to Custom Apex QA System
• Conclusion
Age
nda
38
• Time to give the queries to developers and code reviewers
• Choose an integrated user interface: Apex
Cus
tom
Ape
x Q
A S
yste
m
Visualize Checks via QA Appl.
39
DEMONSTRATION
Checking development standards using our own QA-viewer
Convention Checklist C
usto
m A
pex
QA
Sys
tem
40
• Two problems needed to be solved – If someone invents a new check we don’t want to
replace one of the views (DDL) – Different projects means different conventions, but
for new projects we don’t want to replace the views (DDL)
• Solution: we create our own small metabase
Cus
tom
Ape
x Q
A S
yste
m
The QA Metamodel
41
• This metabase stores the driving data for the QA-application
• No DDL, but DML now Cus
tom
Ape
x Q
A S
yste
m
The QA Metamodel
42
• We added to our QA-Viewer an ADMIN tab where the driving metadata tables can be maintained – Check Groups – Check Points – Parameters
The metamodel in our QA-Viewer C
usto
m A
pex
QA
Sys
tem
43
Maintain Check Groups C
usto
m A
pex
QA
Sys
tem
Maintain Check Groups
44
Maintain Check Points C
usto
m A
pex
QA
Sys
tem
Maintain Check Points
45
Maintain Parameters C
usto
m A
pex
QA
Sys
tem
Maintain Default Parameters
46
• Different standards can exist for different apex-applications for the same customer
• Possible to store a different standard-value for a specific application (via APPLIED_PARAMETERS)
Cus
tom
Ape
x Q
A S
yste
m Maintain Parameters
47
Cus
tom
Ape
x Q
A S
yste
m Maintain Parameters
Maintain Application Specific Parameters
48
DEMONSTRATION
Working with Check Groups, Check Points, Default Parameters and Application
Parameters
Convention Checklist C
usto
m A
pex
QA
Sys
tem
49
Agenda
• Our Company iAdvise • Apex Development Approach • Increasing the Quality of Apex Applications
– Apex Development Standards – The Basic Idea – From Basic Idea to Custom Apex QA System
• Conclusion
Age
nda
50
Conclusion
• Apex is the ideal tool to realize projects – with junior developers – at a good price – within an aggressive time frame – with an acceptable quality level
• You can increase the quality of your applications by the power of the dictionary views
• iAdvise has built his own QA-Viewer
Con
clus
ion
51
Questions and Answers Q
uest
ions
and
Ans
wer
s
52
Thank you
• Hand in evaluation form • More information:
– Whitepaper: vanhelle.doc – Website: http://www.iadvise.be – Blog: http://iadvise.blogspot.com – Xliff Translator (free): http://www.iadvise.be/xtra4o – Email: [email protected]
[email protected] • General Apex information
– http://apex.oracle.com Than
k yo
u