Tactics to Tackle APEX Bugs

Similar documents
Tactics to Tackle APEX Bugs

Application Express Dynamic Duo

CSS for Page Layout Robert K. Moniot 1

Oracle APEX 18.1 New Features

& ( ); INSERT INTO ( ) SELECT

Going to the Grid: What the APEX 5.1 Interactive Grid Means or You and Your Users. Karen Cannell

Grid Essentials. APEX 18.1 Interactive Grids. Karen Cannell TH Technology

Application Express 4.0 Architecture & Configuration Marc Sewtz Senior Software Development Manager Oracle America Inc.

Oracle Application Express: Administration 1-2

Simple AngularJS thanks to Best Practices

Oracle 12.2 Analytic Views:

<Insert Picture Here> Oracle SQL Developer: PL/SQL Support and Unit Testing

Database Developers Forum APEX

An Oracle White Paper April Oracle Application Express 5.0 Overview

Oracle SQL Developer & REST Data Services

<Insert Picture Here>

Oracle Application Express 5 New Features

20486: Developing ASP.NET MVC 4 Web Applications

1 Copyright 2013, Oracle and/or its affiliates. All rights reserved.

COURSE 20486B: DEVELOPING ASP.NET MVC 4 WEB APPLICATIONS

Client-side Debugging. Gary Bettencourt

20486: Developing ASP.NET MVC 4 Web Applications (5 Days)

Selenium Web Test Tool Training Using Ruby Language

Oracle Service Cloud Integration for Developers Ed 1

Real Life Web Development. Joseph Paul Cohen

Developing ASP.NET MVC 4 Web Applications

Developing ASP.NET MVC 4 Web Applications

Oracle JET in Oracle APEX Marc Sewtz Senior Software Development Manager Oracle America, Inc. New York, NY

ASP.NET MVC Training

Part 1: jquery & History of DOM Scripting

TipsandTricks. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

Oracle Service Cloud Integration for Develope

Visualforce & Lightning Experience

Developing ASP.Net MVC 4 Web Application

Course 20480: Programming in HTML5 with JavaScript and CSS3

Rapid Application Development with APEX 5.0

SQL Developer. 101: Features Overview. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

COURSE 20480B: PROGRAMMING IN HTML5 WITH JAVASCRIPT AND CSS3

Microsoft Programming in HTML5 with JavaScript and CSS3

FRONT END DEVELOPER CAREER BLUEPRINT

MASTERS COURSE IN FULL STACK WEB APPLICATION DEVELOPMENT W W W. W E B S T A C K A C A D E M Y. C O M

Extend EBS Using Applications Express

Installation Guide. Version Last updated: August tryfoexnow.com 1 of 3

Programming in HTML5 with JavaScript and CSS3

Apex 5.1 Interactive Grid and Other New features

Developers and DBAs. Farmers and City Slickers have different mindsets

Oracle Service Cloud Integration for Developers Ed 1

RESPONSIVE WEB DESIGN IN 24 HOURS, SAMS TEACH YOURSELF BY JENNIFER KYRNIN

A Closer Look at XPages in IBM Lotus Domino Designer 8.5 Ray Chan Advisory I/T Specialist Lotus, IBM Software Group

Course 20486B: Developing ASP.NET MVC 4 Web Applications

Visual Studio Course Developing ASP.NET MVC 5 Web Applications

FROM 4D WRITE TO 4D WRITE PRO INTRODUCTION. Presented by: Achim W. Peschke

OSSW ICOSST 2009, Al-Khawarizmi Institute of Computer Science University of Engineering and Technology, Lahore

This presentation is for informational purposes only and may not be incorporated into a contract or agreement.

Instructor s Notes Web Data Management Web Client/Server Concepts. Web Data Management Web Client/Server Concepts

0.9: Faster, Leaner and Dijit? July 25, 2007 Dylan Schiemann. presented by

Developing ASP.NET MVC 5 Web Applications. Course Outline

What is Standard APEX? TOOLBOX FLAT DESIGN CARTOON PEOPLE

FIREFOX MENU REFERENCE This menu reference is available in a prettier format at

Overview. Principal Product Manager Oracle JDeveloper & Oracle ADF

IBM Forms V8.0 Custom Themes IBM Corporation

Imagination To Realization

Checklist for Testing of Web Application

Installation Guide. Version Last updated: November. tryfoexnow.com 1 of 3

Developing ASP.NET MVC 4 Web Applications

Using SQL Developer. Oracle University and Egabi Solutions use only

Executive Summary. Performance Report for: The web should be fast. How does this affect me?

Drupal Frontend Performance & Scalability

Unveiling Zend Studio 8.0

SQLDev. TipsandTricks. Jeff Smith Senior Principal Product Database Tools, Oracle Corp

Developing ASP.NET MVC 5 Web Applications

PHP & My SQL Duration-4-6 Months

DOT NET Syllabus (6 Months)

How APEXBlogs was built

Ajax Performance Analysis. Ryan Breen

Week 1 - Overview of HTML and Introduction to JavaScript

Executive Summary. Performance Report for: The web should be fast. Top 4 Priority Issues

Oracle Forms and Oracle APEX The Odd Couple

The course also includes an overview of some of the most popular frameworks that you will most likely encounter in your real work environments.

Oracle Education Partner, Oracle Testing Center Oracle Consultants

Oracle 9i Application Development and Tuning

Static Webpage Development

SPARK. Forms Builder for SharePoint & Office 365. Forms builder for every business. SharePoint Advanced Redesign Kit. ITLAQ Technologies

May 22, 2013 Ronald Reagan Building and International Trade Center Washington, DC USA

DatabaseRESTAPI

Languages in WEB. E-Business Technologies. Summer Semester Submitted to. Prof. Dr. Eduard Heindl. Prepared by

Mail: Web: juergen-schuster-it.de

Oracle Reports Developer 10g: Build Reports

Prosphero Intranet Sample Websphere Portal / Lotus Web Content Management 6.1.5

Toad for Oracle Suite 2017 Functional Matrix

20486C: Developing ASP.NET MVC 5 Web Applications

Customizing a Packaged Application for a J2EE Environment: A Case Study. Leslie Tierstein TopTier Consulting, Inc.

20480B - Version: 1. Programming in HTML5 with JavaScript and CSS3

Web development using PHP & MySQL with HTML5, CSS, JavaScript

TIBCO LiveView Web New and Noteworthy

Microsoft Developing ASP.NET MVC 4 Web Applications

Practic Pr al actic Dynamic Actions Intro Jorge Rimblas 1. 1

Challenges, Benefits and Best Practices of Performance Focused DevOps. 1 #Dynatrace

Frontend guide. Everything you need to know about HTML, CSS, JavaScript and DOM. Dejan V Čančarević

Web Applications. Software Engineering 2017 Alessio Gambi - Saarland University

Transcription:

Tactics to Tackle APEX Bugs Karen Cannell kcannell@integratc.com

About Me (Speaker Qualifications) Karen Cannell ~ Principal Analyzed, designed developed, converted, upgraded, enhanced and otherwise worked on database applications for 22+ years, focused on Oracle since 1994. Currently migrating business processes to web-based systems, leveraging the Oracle10g and 10g suite of tools. Lately APEX, Discoverer. VOLUNTEER for IOUG, ODTUG, Oracle Magazine. ODTUG Technical Journal Editor Volunteer to author SELECT and ODTUG Journal Articles!! Using APEX since the HTMLDB beginning http://www.tunahuntress.com Software Page http://www.integratc.com/whitepapers.asp

About You (Audience Background) New to APEX? APEX Experience? Previous Tools? Debug Fun? Debug Nightmares?

Session Objectives Review APEX Debug Options APEX-supplied IDE s 3rd Party Web Development Strategy & Tactics Mindset Application Tools Demonstrate Remote PL/SQL Debug Overview Web Development Tools Tackle some APEX Problems Reinforce APEX best practices

APEX Debug?.. Where to Start? APEX is a blend of technologies How to Debug? PL/SQL Debugger? DMBS_OUTPUT? View Source? Java-what Console? The Old Tools Just Don t Fit!

APEX Debugging Where to Start? What Happens Where? What Language? What Level? Which Process? Which Template? Page? Region? Item? Function? Web Service? We need new Tactics for debugging!

APEX Tactics for Debugging Tactics tac-tics [tāk'tĭks ] (singular tak-tic) noun Definition: 1. a. (used with a sing. verb) The military science that that deals with with securing objectives set by set strategy by strategy b. (used b. (used with a with pl. verb) a pl. verb) Maneuvers Maneuvers used against used against an enemy an enemy

Debug Strategy Know Yourself Know your Enemy Your Application Know your Weapons AvailableTools Follow the Battle Plan Follow a Sound Plan Don t Stay Lose Sane It!

Know Yourself Guidelines for Sanity: You Know What You Know If the Code Did Not Change, It s Not the Code The Computer Does Exactly What You Tell It To Exactly. Remember - You Know Stuff

Common Sense When Do We Make Mistakes? Overtired Under Pressure Developer Diet Lone Wolf When Do We Debug? Overtired Under Pressure Developer Diet Lone Wolf

Common Sense Take a Break 30 minute Rule Set Reasonable Expectations, Timeframes Eat Food (Red Bull is Not Food) Ask for Help It s OK to Ask for Help Coding Therapy for Developers, Steven Feuerstein, 2009

Change of Thought, Toolset SQL and PL/SQL Essential APEX Flow and Page Rendering Essential HTML Essential for Templates, Themes CSS Essential for Templates, Themes JavaScript, AJAX, Web Services Essential as you Enhance your Apps Expand Your Skills as your APEX Development Expands

Know your Application Know Your Application Build with Best Practices Coding Standards Modularize Separate Business Logic from Presentation Use Packages Comment All Code APEX included Backup Regularly Export Regularly APEX Essentials or similar

Know Your Tools APEX-Supplied PL/SQL IDE - SQL Developer 3 rd Party Web Development Tools CSS Editors

APEX-Supplied Debug Tools Syntax Session State Debug Mode Builder View Events, References Activity Reports Developer Activity By Change, Weighted Page Performance Export As Of Others #TIMING#, Instrumentation, &p_trace see APEX Debug Options, Cannell, 2008

Know Your Tools APEX Syntax f?p Syntax Application : Page : Session : Request : Debug: Clear Cache : Item Names: Item Values : Printer Friendly All Programmers Smartly Request Double Cash In Virtual Programs

Know Your Tools APEX-Supplied APEX Debug Tools Dev Toolbar View Session State Activity Reports Toggle Debug Mode

Know Your Tools APEX-Supplied Session State

Know Your Tools APEX-Supplied Debug Mode On

Know Your Tools APEX-Supplied wwv_flow.debug Set you own debug messages wwv_flow.debug( Your message here ); apex_application.debug( Your message here ); wwv_flow.debug( <span style= color:red; > <br>your message here <br></span> );

Know Your Tools APEX-Supplied Page - View Select List

Know Your Tools APEX-Supplied Page View Select List - Events

Know Your Tools APEX-Supplied Page View Select List - Referenced Referenced Components

Know Your Tools APEX-Supplied Activity Reports Most are Informational Page Views, Caching, Session Developer Activity Clues as to What Changed Recent Changes - - > Hint to Recent Errors

Know Your Tools APEX-Supplied Activity Reports

Know Your Tools APEX-Supplied Developer Activity by Application Change

Know Your Tools APEX-Supplied Activity Weighted Page Performance Where is time spent Clue to performance issues

Know Your Tools APEX-Supplied Validate PL/SQL in APEX Database Object Dependencies

Know Your Tools APEX-Supplied Application Reports Shared Components Database Object Dependencies PL/SQL Process Validation App Reports Shared Components Database Object Dependencies Compute Dependencies

Know Your Tools APEX-Supplied Parsing Errors == PL/SQL to fix

Parsing Errors

Know Your Tools APEX-Supplied DBMS_APPLICATION_INFO APEX Sets Values: Module APEX:APPLICATION <App Id> Client Info User Identifier User: Session Id Action PAGE <Page>

Know Your Tools APEX-Supplied DBMS_APPLICATION_INFO Retrieve Info: V$SQL SELECT sql_text, action, module, program_id, program_line# FROM v$sql WHERE module LIKE '%APEX%'

Know Your Tools APEX-Supplied DBMS_APPLICATION_INFO Retrieve Info: V$SESSION ( 10.2.0.2 and higher) SELECT plsql_entry_object_id, FROM plsql_entry_subprogram_id, plsql_object_id, plsql_subprogram_id, module, action v$session WHERE module = 'APEX:APPLICATION 1103'

Know Your Tools APEX-Supplied Utilities Database Monitor Top SQL

Know Your Tools APEX-Supplied #TIMING# in Region Footer Add #TIMING# to Region Footer (doesn t work in Header) Displays CPU Time in Region Footer Gives clues as to where performance issue may be

Know Your Tools APEX-Supplied #TIMING# Output Timing output

Know Your Tools - IDE SQL Developer (or other PL/SQL IDE) SQL and PL/SQL Validation, Tuning Reports Remote Debug

Know Your Tools IDE ex: SQL Developer PL/SQL Debug and Performance Build & Tune Outside First Tune SQL, PL/SQL Outside of APEX Same Principles Apply Validate PL/SQL Processes in APEX Compute Dependencies Modularize Use Bind Variables

Know Your Tools IDE ex: SQL Developer SQL Developer Reports APEX Reports Supplied - Informational User-Defined Reports Build Your Own Custom Most Power Here

Know Your Tools SQL Developer SQL Developer Remote Debug Code Must be a Stored Procedure DB Privileges DEBUG CONNECT SESSION DEBUG ANY PROCEDURE Start Debug Listener in SQL Developer Connect APEX app to SQL Dev via DBMS_DEBUG_JDWP.CONNECT_TCP Run App Debug in SQL Developer

Know Your Tools SQL Developer Not Remote-Debug-able DECLARE v_status PLS_INTEGER := 0; v_fmp trip_charge.fmp%type; v_date_land DATE; BEGIN SELECT fmp, date_land INTO v_fmp, v_date_land FROM trip_and_charge WHERE das_id = :P6_DAS_ID; wwv_flow.debug( '<span class="t16error"> ' v_fmp ' ' TO_CHAR( v_date_land,'dd-mon-yyyy') ' After COMMIT </span>'); AMS_EDIT.CHARGE_SUITE_ONE( :P6_DAS_ID, :P6_PERMIT_NBR, v_fmp, v_date_land, v_status); wwv_flow.debug( '<span class="t16error"> After CHARGE_SUITE_ONE </span>'); EXCEPTION WHEN OTHERS THEN htp.p( DBMS_UTILITY.FORMAT_ERROR_BACKTRACE); END;

Know Your Tools SQL Developer Can Remote Debug IF :DEBUG = 'YES' THEN DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', 4000); END IF; AMS_EDIT.RUN_CHARGE_SUITE_ONE( :P6_DAS_ID, :P6_PERMIT_NBR); IF :DEBUG = 'YES' THEN DBMS_DEBUG_JDWP.DISCONNECT; END IF; Can Debug This in SQL Dev

Know Your Tools SQL Developer Steps for Remote Debug In SQL Dev, set Remote Debug ON for a session, entering DB host IP In app, add IF :DEBUG = 'YES' THEN DBMS_DEBUG_JDWP.CONNECT_TCP( '127.0.0.1', 4000); END IF; In app, after module add disconnect IF :DEBUG = 'YES' THEN DBMS_DEBUG_JDWP.DISCONNECT; END IF;

Know Your Tools 3 rd Party Web Development Tools Web Developer Firebug Live HTTP Header Yslow Others abound! Safari 4 - WebKit IE 8

Know Your Tools Web Development Tools Web Developer Firefox Add-In Free Download https://addons.mozilla.org/en-us/firefox/addon/60

Know Your Tools Web Development Tools Web Developer Tool Bar

Web Developer Display Element Information

Know Your Tools Web Development Tools Firebug Another Firefox Add-In Download from https://addons.mozilla.org/en-us/firefox/addon/1843

Know Your Tools Web Development Tools Firebug Console HTML CSS Script (JavaScript) DOM Firebug Lite JavaScript include for non- Firefox browsers http://www.getfirebug.com/ for more information

Know Your Tools Web Development Tools Firebug JavaScript Debugger JavaScript Debug Interface

Safari 4 Web Inspector / WebKit Safari 4 Developer Tools http://www.apple.com/safari/whatsnew.html#developer WebKit http://webkit.org/

Have a Plan Triage Apply Correct Tool & Tactics Analyze Repeat

Follow a Plan - Triage Triage Think. Session State Debug Mode Activity Reports View Events All from Dev Toolbar Classify ~ Choose Tactics

Follow a Plan Classify the Issue Classify Issue SQL or PL/SQL APEX Flow HTML or CSS JavaScript, AJAX Others: Timing No Clue

Follow a Plan Apply Tactics Tactics for SQL and PL/SQL Issues Validate (again) Outside of APEX Tune (again) Outside of APEX because you have modularized, use bind variables, and have already tuned this is easy! Validate Session State & Timing Remote Debug

Follow a Plan Apply Tactics Tactics for APEX Flow Issues Debug Mode What Fires in What Order With What Values View Events Confirm Order of Events is What it Should Be Validate All Conditions Turn Conditions On/Off to Find the Offender

Follow a Plan Apply Tactics Tactics for HTML, CSS Issues Web Developer (Firebug, or similar) Show Element Information View Tables Edit CSS Use the Utilities! CSS Editor Build and Validate Stylesheets Test in All Browsers! Adjust tool to browser

Follow a Plan Apply Tactics Tactics for JavaScript, AJAX Firebug JavaScript Tools JavaScript Console Test and Validate in Console First Validate in Console Again Venkman JavaScript Debugger Safari 4 IE 8 Others?

Demonstrations Simple Error Misleading Message Case for Remote Debug MRU Error One Flavor View of Web Developer, Firebug

Simple Error Message 601 p28

Debug Mode On This Column No Longer Exists!

Lessons Learned Table Changed Column No Longer Exists All Pages Were Not Updated All Pages Were Not Tested! APEX Essentials was not run! Know Your Application Know Your Tools Follow Standards ~ No Shortcuts!

Don t Believe the Message 601 Add Trip p50 err on way

Turn Debug Mode On

Lesson Learned: The Actual Error was on a Different Item than it appeared in the displayed error message The error was a dumb mistake the developer may not have made if Don t Take Everything at Face Value Know Your Application, inside and out! Stay Sane Be Thorough

Report Error - string buffer too small

Report Error String buffer too small Underlying Data Changed Caused Error in app

Lessons Learned Report Error When it Rains it Pours Expect the Unexpected When you can least afford it. Know Your Application... and what you do to it. Know Your Data and when it changes. Know Your Tool and it s Limitations.

Case for Remote Debug App 602, p50 Write Remote Debug-able Code: Packages, Procedures, Functions vs. Code in the Builder

Lesson Learned Remote Debug After all is validated Outside of APEX When there is no other way For Focused Cases Only Not Always Clean Exit 605 p50 add trip or del trip

MRU Error One Incarnation Current version of data in database has changed since user initiated update process...

MRU Error Error in mru internal routine: ORA-20001: no data found in tabular form Know Your App Know Your Tools Save Often Go To The Forum! Lease exch status

MRU Error - Suggestions Table Name and PK Must Be Correct PK Must be Posted Back with Form: Hidden Display Only, Saves Session State Don t Change Query After Building Beware those Last Minute Improvements

HTML and CSS Errors Know Your Tool Web Developer, Firebug, etc. Features CSS Edit Table Levels Many Many Utilities! Test In All Browsers! Firebug Lite for IE < 8

JavaScript Debug Firebug Safari Web Inspector Other JavaScript Console Test and Refine in JS Console first Use Tool to Find, Address Errors

Firebug JavaScript Debugger JavaScript Debug Interface

Forum Etiquette Know Your Application Know Your Problem Search and Read FIRST Then and only then Post Clearly State Problem. Ask a Question Be Polite.

Tactics for Debug - Recap Know Yourself Know your Your Application Know Your Available Tools Follow a Sound Plan Don t Stay Lose Sane It!

Tactics to Tackle - Recap THINK Remember You Know Stuff Triage Tackle Bug with the Right Tactic

Resources APEX Debug Options, Cannell, 2008 APEX Cheat Sheet, Cannell, 2008 http://www.tunahuntress.com Software Page http://www.integratc.com/whitepapers.asp Coding Therapy, Feuerstein, 2009 The APEX OTN Forum - http://forums.oracle.com/forums/forum.jspa?forumid=137. SQL Developer - Home Page on OTN http://www.oracle.com/technology/products/database/sql_developer/index.html Web Developer http://chrispederick.com/work/web-developer/. Firebug Safari http://www.getfirebug.com/. http://www.apple.com/safari/

Share Your Knowledge! Call for Articles/Reviewers ODTUG Journal IOUG SELECT Journal Editor, ODTUG Technical Journal kcannell@odtug.com

ODTUG Kaleidoscope 2010 June 27 July 1 Washington, DC

Questions? Tactics to Tackle APEX Bugs Please fill out the evaluations! Karen Cannell kcannell@integratc.com http://www.integratc.com

Thank You ~ Tactics to Tackle APEX Bugs Please fill out the evaluations! Karen Cannell kcannell@integratc.com http://www.tunahuntress.com (Software page)

Karen Cannell APEX Papers http://www.tunahuntress.com Software Page or http://www.integratc.com/whitepapers.asp