Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Evidence Based APEX

Building Better Practices - Kscope15
by

Scott Wesley

on 22 August 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Evidence Based APEX

plural of
anecdote

is not
data
Research
Evidence
Trust self reporting?
https://balsamiq.com/products/mockups/
Evidence
Based
APEX
id =
to_number
(:P1_ID)
explicit data types
is the best idea humans have ever had.

The more people who embrace that idea, the better.
select
message
,
avg
(execution_time)
from

apex_debug_messages
where
message
like

'%sparkline%'
group by
message;

0.0085 - interpreted inline
0.0017 - pl/sql package
Scott Wesley
Evidence Based APEX
Building better practices
2000
@swesley_perth
APEX 4.2
Video
Book
Right now
tinyurl.com/Twitter-Tool-Oracle
#orclapex
2012
2015
Techniques
jQuery
APEX
APEX
S. Wesley
S. Wesley
First (Known)
Epidemiological map
London cholera epidemic
John Snow, 1854
Evidence Based Practice
Research
Evidence
EBP
Patient
Preference
Clinical
Expertise
Performance
Awareness
Instrumentation
Communication
Expectations &

Developer
Expertise
2008
1) Problem -> Question
2) Find Evidence
3) Appraise Evidence
4) Apply Evidence
5) Evaluate Performance
6) Share Outcomes
fast access
Documentation
Books
Blogs
APEX
jQuery
HTML5
CSS
UX
orana.info
docs.oracle.com
youtube
PL/SQL
Videos
mdn > w3schools
Snapshots
menus
complex aggregation
guaranteed win
stale data
logistics
(materialized views)
remote data
Conditions
References
bookmark
check global page
declarative
straw. camel. back.
Workflow
type of modal?
jQuery
Template
Page Type
#APEX5
Tuning
SQL
user experience #UX
jQuery
PL/SQL
id =
(
select v('P1_ID')
from
dual
)
Do NOT
'id = &P1_ID'
select '123:45:&SESSION.' url
sql injection
flood sql pool
bind variables
scalar subqueries
escaping
apex.server.process()
Namespaces
2) reused
5) version control
4) one change
3) less defect risk
1) compiled
Selectors
Chaining
Refresh Region (PPR)
Minify
sage#MIN#.js
Version upgrades
work is in theme migration
Community
give, take
Project Variety
consultants vs academics
Awareness
the key
Forums
Twitter
LinkedIn
OTN
StackOverflow
#orclapex
#apex5
#db12c
#sqldeveloper
Official APEX Group
jQuery
class based
modern
advantage in productivity
Tight design
Bleeding edge
exploratory
Tuning
Version control
User proximity
Methods
Techniques
Standards
CSS Media Queries
Printing
A
B
Placebo Controlled
Double Blind
Randomised
Hard in IT
oracle
jQuery
odtug.com/apex
user group seminars
published screencasts
People
Tech
Scale
Freedom
Full stack
Latest versions
Full spectrum
Magazines
Oracle Magazine
OTECH Magazine
How-to Bookmarks
APEX APIs
SQL Reference
jQuery Selectors
<keyword>
Concise detail
peer review - formal
accessible
Embedded plugins
3.x - Traditional Blue 20
4.2 - Blue Responsive 25
5.x - Universal Theme 42
Community - Twitter Bootstrap
table based
Template Options
4.0 - Builder Blue 2
div based
component placement
Tabs
Navigation Menu
Lists Templates
grassroots
knowledge growth
identify
bottlenecks
Tools
Most abused
38%
84%
35%
59%
35%
21%
9%
15 people said don't worry about performance
Plural of anecdote
is not
data
Dr Karl Kruszelnicki
Survey Says: Worldwide
Russia


Egypt
Tunisia
Nigeria
Senegal
Ghana

Mexico
Costa Rica
Colombia
Brasil
Argentina


Finland
Switzerland
Poland
Austria
Luxemburg
Czech Republic
Slovenia
Croatia
Serbia
Italy
Spain
I surveyed ~172 people
"Let's blow some stuff up"
Adam Savage
Arthur C. Clarke
"Any sufficiently advanced technology is indistinguishable from magic"
a rigged demo
Feedback
Awareness
Tunnel Vision
Tools
Capabilities
Expertise
What would a user do?
(WWUD)
Watch them work
Ann Reid
Eugenie Scott

National
Center for
Science
Education
(NCSE)
(Former Director)
Evolution
Climate Science
Carl Sagan
"Books break the shackles of time"
SGU Rogues
(Novella et al)
Continued lessons on
confirmation bias
Indre Viskontas
"Reality is more awesome than you realise"
Universal Theme
Migration Guide
James Randi Educational Foundation (JREF)
Honest Liar
Bill Nye
"Machines take me by surprise with great frequency"
Alan Turing
http://apod.nasa.gov/apod/ap120720.html
Luna
Mars
Saturn
Voyager 1
USA
UK
Germany
Netherlands
India
Canada
Australia
Belgium
Iran


http://asset1.lumosity.com/smartest-cities-2013
Publications
Top 10
Best Things
Agenda?
Styles
Upgradeable
Just by being watched
Developers too
Meta-data
https://tctechcrunch2011.files.wordpress.com/2014/05/google-self-driving-car.jpeg?w=738
Empirical Big Data
Lumosity Brain Games
Apps are new tools for researchers
Self Driving Cars
6 companies have US coast-to-coast capability
Intelligent
Systems
that learn
http://www.theskepticsguide.org/podcast/sgu/312
How do we get
good
data?
Art vs Science
Mockups
3) Screen design
2) Workflow
1) Data design
Visits
behaviours
APEX EA
Feature Requests
@media

print

{
#nav-
menu
, #blog_posts, .uButton
,
.noPrint

{display:none;}
}
Orientation
a b c
a b c
@media orientation:portrait {



}
Fast = True
visit frequency
Instrumentation
weighted data
Menu
Region SQL
Item LOV
Interpreted PL/SQL
Bloat
Plug-in
Complex, expected
Review
Anomaly
... infrequent
large outliers
The Science Guy
The Aussie Bill Nye
Pakistan
Ukraine
something went
wrong here
Fabricator
Build
Test
Cases
Confirm / Deny
Forums
Rubber Duck
Debug Mode

apex_workspace_activity_log
www.talkapex.com/2009/05/apex-logs-storing-log-data.html
Developer Expertise
User Expectation
Research Evidence
Project Variety
Community Involvement
APEX Versions

Communication
Reference
Performance
Infrastructure
Performance
Community
Functional
Familiar
Fast

Data Model
P1
P3
P2a
P2
Page Workflow
Plug-in
= 1.5s
Network Traffic
Lag Time
:P1_ID
&P1_ID.
Care with v()
parameterise
id =

p_id
with

params
as
-- conjure a table
(select v('P1_ID') as
p_id
,v('F_ADMIN') as
f_admin
from dual)
view reuse
it's a pl/sql function
querying a table
0.03
* 50
select nvl2(
p_id
, 'Y', 'N')
from my_table,
params
-- one row join
where
f_admin
= 'Y'
union all ...
SQL (84%)
Snapshots (38%)
PL/SQL (60%)
v() Care (35%)
Region Cache (16%)
Global Page (33%)
jQuery (21%)
JS/CSS File Management (25%)
APEX
Global Page
Region Caching
Processing Time
Network Time
Developer Time
var sage {};
sage.p3 = (function() {
// package

var init = function() {
// private function
apex.debug('P3 - init');
// instrumentation

} // init

return {
// made public
init: init
};
})();
~ half file size
(not live)
maintainability
Modularise
Encapsulate
No anonymous blocks
Triggers
Table Functions
FUNCTION string_to_sql_table
(
p_string IN VARCHAR2
,p_delimiter IN VARCHAR2 DEFAULT ':')
RETURN nt_vc_arr
PIPELINED
IS
-- Convert a given delimited string to a table of values
-- pipelined so it can be utilised efficiently within SQL
l_array
apex_application_global.vc_arr2
;
BEGIN
l_array :=
apex_util.string_to_table
(p_string,p_delimiter);

FOR i IN l_array.first..l_array.LAST LOOP

PIPE ROW (TRIM(l_array(i)));
END LOOP;

RETURN;
END string_to_sql_table;​
select column_value
from table(string_to_sql_table('Hello:Kscope15'))
CREATE OR REPLACE TRIGGER sage_biur BEFORE INSERT OR UPDATE ON sage FOR EACH ROW DECLARE
BEGIN
IF INSERTING THEN

-- In 12c, use IDENTITY column functionality
:NEW.id := COALESCE(:NEW.id ,
sage_seq.NEXTVAL
);
-- 11g
-- better than NVL
:NEW.created_date := COALESCE(:NEW.created_date , SYSDATE);
-- UI supplied , APEX User , Data loading

:NEW.created_by := COALESCE(:NEW.created_by , apex_application.g_user, USER);
END IF;

IF UPDATING THEN
:NEW.modified_date :=
COALESCE
(:NEW.modified_date, SYSDATE);
:NEW.modified_by :=
COALESCE
(:NEW.modified_by, apex_application.g_user, USER);
END IF;
END sage_biur;​
CREATE TABLE sage (

id NUMBER

GENERATED ALWAYS AS IDENTITY
-- 12c

,description VARCHAR2(50)
);
grassroots-oracle.com/search/label/COALESCE
Convenience of PL/SQL in SQL
Data Loading (Pipelined)
oracle-developer.net/display.php?id=429
interpreted
compiled
Computations
Processes
Dynamic Actions
Validations
Processes
PL/SQL Regions
Plugins
Callbacks
Conditions
Shortcuts
Views
16%
APEX5
Global Page Caching
More APIs
"no execution always faster than any execution"
Conditions
Caching
DAs + Plugins
Dynamic Action A
Do Stuff
Gritter Notification
Dynamic Action B
Do Stuff
Gritter Notification
= 3 * plugin render
Dynamic Action C
Do Stuff
Gritter Notification
= n * plugin render
Dynamic Action A
Do Stuff
Set P0_SIGNAL
Dynamic Action B
Do Stuff
Set P0_SIGNAL
Dynamic Action C
Do Stuff
Set P0_SIGNAL
onChange Signal
Gritter Notification
Clear P0_SIGNAL
= 1 * plugin render
AJAX
8% JS version of a package
File
Management
Versioning
Modularisation
similar rules to Oracle
Avoid context switch
jQuery <-> DOM
SQL <-> PL/SQL
$('#id').doThis().doThat()
update ...
returning into
$('#id tag.class');
where id = 123
and name like 'S%'
Indexes
Inline
Page
Template
User Interface
Don't execute
#id { color : red; }
create view
dumitruglavan.com/jquery-performance-tips-cheat-sheet/
l_sql :=
'SELECT COUNT(*) INTO :l_count FROM '

||
SYS.DBMS_ASSERT.
SQL_OBJECT_NAME
(
p_table_name
)

l_sql :=
'SELECT something FROM my_table WHERE code = '
||
SYS.DBMS_ASSERT.
ENQUOTE_LITERAL
(
p_code
);
assertions
keep pages safe from XSS
// apex5
alert("You entered &P1_TEXT
!HTML.
");
roelhartman.blogspot.com.au/2014/09/apex-5-new-substitution-syntax-features.html
TweetDeck
No more SQL Injection
Help prevent Denial of Service (DOS)
www.grassroots-oracle.com/2013/05/performance-of-apex-conditions.html
www.oratechinfo.co.uk/scalar_subqueries.html
oracle-base.com/articles/10g/dbms_assert_10gR2.php
www.oracle.com/technetwork/issue-archive/2011/11-sep/o51asktom-453438.html
PayPal
eBay
Amazon
vs expression
never trust entered data
66%
38%
22%
en.wikipedia.org/wiki/Mars_Climate_Orbiter
Oracle Forms
Started APEX
www.grassroots-oracle.com/2015/02/twitter-as-work-tool.html
Science
-> click
-> ctrl+f
Pre-2007
APEX 5 IDE
APIs
Neuroscientist
Podcaster
Opera Singer
#p1_emps
th
#SALARY
,#p1_emps
td
[headers=SALARY]
{display:none;}
Futurist
http://www.grassroots-oracle.com/2014/07/apex-printer-friendly-pages-with-css-media-queries.html
Science Podcasters
www.theskepticsguide.org
soundcloud.com/inquiringminds
COLUMN_VALUE
------------
Hello
Kscope15

2 rows returned.
#APEXPosed15
#Kscope15
constructive interaction
mostly one way
index to data
actual data
https://www.linkedin.com/grp/home?gid=8263065
(almost there)
apex.oracle.com/ut
sagecomputing.tumblr.com
session state
stored as a
string
jeffkemponoracle.com/2013/02/28/apex-and-application-contexts/
context
id = SYS_CONTEXT('MY_CTX',
'TASK_NO'
)
my_pkg.set_ctx(
'TASK_NO'
, :P1_ID)
rarely use NVL
sage.p3.init()
(nominal cost)
order debug by message
No region based purge
select replace( notes

, chr(10),
'<br>'
) as name_std
apex_html.escape
(notes)
@swesley_perth
Evidence
Based
APEX

Scott Wesley
grassroots-oracle.com
#Kscope15
HTML Expressions
use the provided attributes
tylermuth.wordpress.com/2007/12/01/conditional-column-formatting-in-apex/
conditional
formatting
images
<img src="#IMAGE_NAME#" title="#ENAME#">
better than HTML/CSS within SQL
Avoid Report Redundancy
www.oracle.com/technetwork/issue-archive/2014/14-may/o34plsql-2193425.html

references
tuning sql
@deploy.sql
Statistics
what?
how?
where?
who?
when?
idea
to basic pages
short time scale
Developer Expertise
User Expectations
Research Evidence
APEX 5.0
Phil Plait
The Bad Astronomer
www.
badastronomy.com
/bad/tv/foxapollo.html
Expert ->
Evidence ->
Expectations
User Requirements
Community
why?
less page visits
more gain per click
less work
more stable
no big picture
t
cssmediaqueries.com
max-width:768px
Size
your house?
APEX App controlling
Internet of Things
Prediction?
via gestures?
http://kscope15.com/component/seminar/presenterlist?last_id=25
Anton Nielson
iPad
Desktop
TV
apex_debug.message
(
SQL%ROWCOUNT
||
' inserted'
);
&p_trace=YES
Inspect Element
Custom APEX Monitoring Reports
User_Agent
1) Build Sample page
apex.oracle.com
2) Construct tables/data
3) State Intent & Reason
xyproblem.info
x) attempted solution
y) actual problem
not like
create table the_months as
select add_months(trunc(sysdate,'yy')
,
rownum
-1) as mth
-- with variation
from dual
connect by level <= 12;
-- generate data

"it doesn't work"
community.oracle.com/thread/2608717
"how to get answers from forum"
fac586 - Paul MacMillan
github.com/OraOpenSource/Logger
22% q'[don't add instrumentation]'
19% Logger (OraOpenSource)
40% Supplied API
51% Custom
not randomised
delayed debrief
highly subjective
interesting
results
debug(
'p1_item:'
||:P1_ITEM);
5% PL/SQL Logger (veenstra)
sourceforge.net/p/plsqllogger/wiki/Home/
= blindfolded
apex_debug_messages
:
LEVEL9
/f?p=SAGE:HOME:0::
YES:
JavaScript Logging
CSS Testing
Device Emulation
Isolate Selectors
DOM Manipulation
Size Assessments
track defects
(Orientation)
rokitta.blogspot.com.au/2012/04/are-you-client-device-categorizr-for.html
owa_util.get_cgi_env (
'HTTP_USER_AGENT'
)
Categorizr
meta-data for
GPS
Device Type
OS
Browser
12c Document Store
RESTful Service Management
APEX Application Management
ORDS 3
NoSQL
SQL Developer 4.1
ora-00001.blogspot.com.au/2009/07/creating-rest-web-service-with-plsql.html
Supply data to jQuery plugins
Send/Receive external feeds
http://www.thatjeffsmith.com/archive/2015/04/deploying-oracle-rest-data-services-from-oracle-sql-developer/
Deploy
Pretty URLs
krisrice.blogspot.com.au/2013/07/using-restful-to-deliver-images-for-apex.html
Deliver Images
Google Visualizations
D3
vis.js
SQLcl
APEX Advisor
Build Options
http://blog.iadvise.eu/2015/05/04/5-things-i-wish-i-knew-about-apex-when-i-just-started-part-3/
http://www.inside-oracle-apex.com/comment-out-an-oracle-apex-process-validation-branch/
http://www.grassroots-oracle.com/2010/06/oracle-apex-build-options.html
http://www.talkapex.com/2012/08/integrating-build-options-in-your-plsql.html
http://jeffkemponoracle.com/2014/01/23/parallel-development-in-apex/
http://dancingwithapex.blogspot.com.au/2008/08/build-options-and-deployment-or-call-me.html
http://oraclequirks.blogspot.com.au/2009/05/view-for-tracking-build-options-usage.html
Underrated?
"Under construction"
Deprecated components
Licensed features
Please don't use
"Condition = Never"
What
would
sell
more?
Needmore
data.
Living White Paper
(Shakeeb)
80x25
12c
debug_log
dev_null
runtime include/exclude
never trust entered data
grassroots-oracle.com
kscope15.com
ODTUG
example.com
Project Variety
References
Community
Communication
Mockups
CSS
Debugging
Performance
t
1752km
10989km
9025km
- wizards - collections - build options - named row templates - shortcuts - user interfaces -
http://www.scribd.com/doc/54144064/APEX-General-Development-Guidelines
http://www.oracle.com/technetwork/testcontent/apex-best-practices-134310.pdf
http://www.toadworld.com/platforms/oracle/w/wiki/8245.plsql-standards.aspx
Dynamic Actions
Row Templates
Authorization
PL/SQL
apex.oracle.com/vote
www.grassroots-oracle.com/2014/12/boosting-apex-menu-sql-performance.html
www.grassroots-oracle.com/2012/02/apex-variables-in-sql.html
www.grassroots-oracle.com/2012/01/apex-performance-issues-with-v.html
Infrastructure + Security + UX
http://docs.oracle.com/cd/E59726_01/doc.50/e39149/toc.htm
https://docs.oracle.com/cd/E11882_01/server.112/e41084/toc.htm
http://www.w3schools.com/jquery/jquery_ref_selectors.asp
http://www.nyoug.org/Presentations/2008/Sep/Cannell_APEXDebug.pdf
menu slow
#orclconf
Deep Dive
- jQuery for PL/SQL Developers -
9am Thursday
Full transcript