Using Apex Dictionary Views… Notes from ODTUG Conference

June 16, 2008

…  Monday

[Please excuse the weird formatting of this post.  I’m having compatibility troubles between EverNote (which I took notes with) and WordPress.]

Great conference for Apex Developers. Tons of sessions, many very good quality.  The following session just finished and unfortunately I wasn’t as impressed with the presentation of this one.  Though I’ll bore you with my notes anyway. (?)

Using the Apex Dictionary Views to increase the quality of your Apex Applications – Karen Van Hellemont, iAdvise

They’re a consulting company with a fair-sized stable of programmers with multiple skill levels.  To support their projects, they’ve developed a customized QA application for Apex applications.
Note: Their iAdvise blog talks about their experiences developing with Apex.  Winners of RAD Race 2007-2008.  Unfortunately, Karen spent way too much time promoting her company, how they work, how many developers, who their original parent company wassss ZZZZZZZZZzzzzzz (snore)

She also described a good deal about their Apex development approach, since that’s what their QA tool is designed around.  But telling us that their goals for are “high quality and on budget” to a room full of experienced Apex programmers (since it’s an intermediate session) is like saying water is wet.

Their Development Approach

Equip team members with tools to do their jobs
Provide productive environment including a project workbench, available literature, tips, blogs, etc.  Again, nothing new to the experienced audience in the room.

Their Addons and toolsets – not sure if these are internal tools or commonly available

pGen40 (pl/sql Generator)
IAF (reusable components for Apex)
xTra4o (Xlif Translater)
BiP4Apex (application document generator via BiP
Qa4o (QA tool check the quality of their application)

Beginning an Apex project with multiple (including junior) programmers.  This involves defining development standards to keep the juniors in line, as well as keeping consistency.

Coding style
Naming conventions, date format standards, etc.

Business Problem: How do you check that standards were followed?

Initially used a checklist, but they needed an more automated approach

Manually Checking a couple of their standards on their Standards Checklist by visually checking the report region’s pagination scheme or date format via running the application is tedious and may require setting up example records to test certain features.

Their Automated Checking is done by checking the Apex Repository.  Original Apex views in Flows schema weren’t originally public.  Since 2.1, they’re more available, all names prefixed by “APEX_”.  They’re also searchable from w/in Apex development environment.

Note to presenters… Check that your powerstrip is working for your demo laptop.  It’s harder to present otherwise.  Karen’s wasn’t and died in the middle, requiring a little assistance from the audience.

Checkpoint query examples:

1. Find regions not based on the template “Reports Region” (non-standard).  So look in APEX_APPLICATION_page_regions.  They select for records when source_type is a report region and the region template is not in their list of accepted templates.
2. Non-Standard Pagination scheme, also available in APEX_APPLICATION_page_regions where the pagination_scheme is non-standard

In the original version they UNIONed multiple standard queries into a single database view, so the application would only have to report on a single view.  Later as their list of quality standards expanded, they broke these out into standards groups, each with their own view.

Checkpoint Groups
Report Columns
Page Processes
Page Validations

One very interesting test to me was for a test of the maximum length of PL/SQL anonymous blocks in a condition statement!  Clearly their internal standard is clearly to keep as much code as possible in stored procedures, rather than the Apex application itself.

Their QA-Viewer application – They developed their automated tool for their developers and QA department, using an Apex front-end.

The Workflow for checking outlyers
User selects which application to check (or %)
Then display the list of failed matches.  User can select which test-group (aka Checkpoint) to review.  Displays name of standard that failed, also shows page number, page name.
Finally the developer creates tickets in their issues tracker application to note bug.

Technically they said that the QA tool could find a non-standard (e.g. bad date format), and actually update the application under development directly by updating the underlying Apex table.  But they warned against that, as being pretty dangerous. They hoped that the Apex developers might allow this programatic change in the future.

Later Enhancements (The QA Metamodel)

Adding new checks requires updating views, as does the need for some projects to have different rules.  They wanted to use DML rather than DDL to update these.

1. They moved the statements to a separate checkpoints table to hold required rules
2. Then added a parameters table to define overrides for parameters used in some checkpoints, which will be used for specific projects, via an applied_parameters table.  e.g. Define standard date format for specific app to be DD/MM/YYYY instead of global standard MM/DD/YYYY.  Then the parameter is plugged into the checkpoints query.
3. Administration portion to their QA application to maintain their checkpoints and assignments to a project.  Administrator can add new checkpoints, or parameter definitions used in some checkpoints.

In the Q&A session, they admitted that Patrick Wolf’s upcoming QA tool is more robust and includes some different tests.  From what I could hear, their tool is proprietary and not available for download.  They gave good credit to Patrick and talked about possibly releasing their tool to the public or merging their application with Patrick’s.

Some interesting ideas here, but Patrick’s tool is the one we really want to use.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: