23
Everything I Wish Someone Had Told Me on My First Day as an APEX Developer Matt Manson Junior Oracle Developer Laurence Woodward Junior Oracle Developer

Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

Everything I Wish Someone Had Told Me

on My First Day as an APEX Developer

Matt MansonJunior Oracle Developer

Laurence WoodwardJunior Oracle Developer

Page 2: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

Agenda

► Introduction

► #1. Get Stuck In

► #2. Design It Properly

► #3. Do It In The Database

► #4. Leverage Packaged Apps

► #5. Interactive Grids Are Confusing

► #6. Better Than Ctrl-F

► #7. Who To Blame

► #8. Pinpoint The Problem

► #9. Reset Button

► #10. SQL Workshop Sucks

► #11. SQL Developer Doesn’t Suck

► #12. Needs Improvement

► Helpful Resources

► Questions

Page 3: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

Who Are We?

Matt Manson

Junior Oracle Developer

Inoapps APEX Support Team

Laurence Woodward

Junior Oracle Developer

Inoapps Products Team

Page 4: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

Caveats / Assumptions

► Caveat: We Are Junior Developers

► Assumption: You’ve touched APEX before

• Please be patient if we stumble

• Correct us if we’re wrong

• Shout out if we’ve explained something poorly

If not, don’t worry – we’re not doing code reviews or mega technical stuff

Page 5: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

• Oracle provides free environments for sandbox apps

• APEX development is so rapid and lightweight, you can get an app up

and running in an afternoon

• Baby steps – build and test small components as you go

• Books are useful, but nothing beats getting your hands dirty

#1 Get Stuck In

Page 6: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#2 Design It Properly

• Parent / child table structure

• Joining tables

• Consistent object naming

• Indexing

• An extra hour of planning saves an extra day of developing

Page 7: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#3 Do it in the Database!

► Abstraction is key

• The majority of your processing should be done with packages and stored

procedures

• Just because you can do lots of logic on page load doesn’t mean you should

• If you need to fix your code, you can do it in one location (in the database) and not

on every page where it is called

• Database code can be stored in a repository and versioned

Page 8: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#4 Leverage Packaged Apps

► App Gallery / Packaged Aps

• Handy examples of advanced techniques and features, complete with

code for you to learn from

• Sample Interactive Grids, JET Charts, Sample Rest Services

Page 9: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

JET Charts – Case study

• Audit application for monitoring Health and Safety compliance across a business

• Application collects yes / no / partial responses to HOSHA questionnaires relevant to areas

• Client has requested a Dashboard, but doesn’t know how they want high level data displayed

• Solution: give the client a link to the Sample Charts APEX application and invite them to select

the data visualisations they want

• Import the Sample Charts App to DEV workspace

• Create a page in the Client Application as a copy of a page in the Sample charts app

• Choose the chart we want, copy to our home page

• Edit the chart SQL

Page 10: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can
Page 11: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can
Page 12: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#5 Interactive Grids Are Confusing

► Interactive Grids can be confusing at first.

► Sample Interactive Grids Application.

► Hard Like Software – Blog by John Snyders.

- IG Cookbook

(But someone else has solved it for us)

Page 13: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

► Search function

• Powerful search function

to find e.g. all calls to a

certain function or

application item

• Useful for Code Reviews,

Impact Assessments

#6 Better Than Ctrl-F

Page 14: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#7 Who To Blame

► Change History

It worked yesterday! Here’s how to find out who broke it..

Page 15: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

► Debug Mode

#8 Pinpoint The Problem

• When logged in as a

developer, click the debug

option at the bottom of the

page, refresh and view the

error stack

• The code that’s caused the

error is usually somewhere

near the bottom of the stack

trace

Page 16: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#9 Reset Button!

► Rollback As Of

• Export a version of

the app before you

broke it.

• This uses the

DBMS_FLASHBAC

K package

Page 17: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#10 SQL Workshop Sucks

► SQL Workshop

• Basic Functionality

• This has its uses in

environments where you

can’t install SQL

Developer

• Some of our clients

require us to access their

systems through virtual

machines, where we don’t

have the ability to install

appropriate tools

Page 18: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

► SQL Developer

• Is FREE, Powerful, and

packed with functionality

• You can search through

APEX apps via SQL

developer

• SELECT * FROM

apex_application_page_it

ems WHERE [conditions]

#11 SQL Developer Doesn’t Suck

Page 19: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

#12 Needs Improvement

► Version Control

• Non existent / no set rules for versioning

• Page lock – means no conflicts, but not great for large teams –

locking items or regions might be better

• Would be great to get a notification if your session has expired,

instead of finding out after you click Save

► Timeout warnings

► PDF Printing

• A little less than ideal

• Had to resort to using open-source solutions, such as BIRT, or

alternatively, BI Publisher

Page 20: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

Helpful Resources

►Oracle Docs

https://docs.oracle.com/database/121/AEAPI/toc.htm

APEX_UTIL / APEX_ITEM / APEX_MAIL

Lots of complicated processing has been done for you, and can be

accessed with out-of-the-box functionality

► Early Adopter

https://APEXEA.oracle.com

Try out new versions of APEX before they’re officially released

Page 21: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

• APEX Slack channel

https://apex.world/ords/f?p=APEX_WORLD:HOME

► APEX.world

Helpful Resources continued

• APEX news and updates

• APEX plugins + github links

• Friendly community

► Hard Like Software

https://hardlikesoftware.com

- Useful APEX blog

Page 22: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

Thanks for listening to us!

Everyone who remembers HTMLDB had it much worse.

Page 23: Everything I Wish Someone Had Told Me on My First Day as an APEX … · Design It Properly #3. Do It In The Database ... • APEX development is so rapid and lightweight, you can

Questions / Corrections