pretius oracle apex primer

50
HOW TO GET STARTED WITH ORACLE APEX? ORACLE APEX PRIMER Przemysław Staniszewski [email protected] https://twitter.com/pstaniszewski

Upload: pretius

Post on 20-Jul-2015

403 views

Category:

Technology


3 download

TRANSCRIPT

Page 1: Pretius Oracle Apex Primer

HOW TO GET STARTED WITH ORACLE APEX?

ORACLE APEX PRIMER

Przemysław [email protected]://twitter.com/pstaniszewski

Page 2: Pretius Oracle Apex Primer

AGENDA

2

What is Oracle Apex?

Working with APEX

Sample use-cases

Architecture

Integration

Oracle Forms migration

Page 3: Pretius Oracle Apex Primer

WHAT IS ORACLE APEX?

3

Page 4: Pretius Oracle Apex Primer

What is Oracle APEX?

4

APplication EXpressRapid Application Development toolUses Oracle DB and PL/SQLFocused on the web - from development to usageIncluded in the Oracle DB license (even the free XE version so you can

try it out or even use for internal projects without extra cost)Available on premise and in the cloudCheck it out at http://apex.oracle.com

And now, a short story …

Page 5: Pretius Oracle Apex Primer

Design your database…

5

Page 6: Pretius Oracle Apex Primer

Implement your business logic…

6

Page 7: Pretius Oracle Apex Primer

Implement GUI (Graphical User Interface) …

7

Page 8: Pretius Oracle Apex Primer

Implement GUI (Graphical User Interface) …

8

Page 9: Pretius Oracle Apex Primer

APEX application architecture

9

Application layer

Web interface

Business logic

Data

Solution

APEX

PL/SQL (API)

Tables / Views

Page 10: Pretius Oracle Apex Primer

APEX application architecture

10

Solution

APEX

PL/SQL (API)

Tabele / Widoki

Calls

Fetches

SQL, PL/SQLHTML, Javascript

Page 11: Pretius Oracle Apex Primer

Why APEX?

11

Fast and simple web app development

Ease of administration and configuration

Flagship Oracle product

Everything is in the database

Integrates well with other technologies (web services, db links, …)

Page 12: Pretius Oracle Apex Primer

WORKING WITH APEX

12

Page 13: Pretius Oracle Apex Primer

How to become an APEX developer?

13

Working environment:

Workstation with a web browser (just it!)

Basic skills required:

SQL

PL/SQL

Extra skills that will help along the way:

HTML, JavaScript, CSS

APEX API

Auxiliary knowledge like Web Services, SOAP, SPA

Page 14: Pretius Oracle Apex Primer

What do we get „out of the box”?

14

Reports

Forms

Charts

Calendar

Templates

Validations

Dynamic Actions / AJAX

Computations

Responsive Web Design

Web Services

Email Services

Translation Services

Plug-Ins

Authentication

Authorization

Session State Management

Logging & Monitoring

Page 15: Pretius Oracle Apex Primer

Structure

15

Applications

Global elements

Page elements

Pages

External elements

Page 16: Pretius Oracle Apex Primer

Types of applications

16

Database apps

Built from scratch

Imported (scripts, Oracle Store, Cloud)

Migrated from MS Excel/MS Access/Oracle Forms

Websheet

Allows creating an app even by people who don’t know „how to sql”

WIKI-type app

Page 17: Pretius Oracle Apex Primer

Region types

17

Report

Classic

Interactive

Web Service-backed

Forms

Charts

Others (e.g. basic HTML – like in any Content Mgmt. System)

Page 18: Pretius Oracle Apex Primer

Interactive reports

18

Simple modification by end-users (calculated columns, aggregations, highlighting, charts)

Simple sharing of new / modified reports by end-users

Page 19: Pretius Oracle Apex Primer

Chart types

19

HTML 5, JS* i Flash;

Various built-in chart types available:

Bar, pie, line, point, candlestick

Counters

Gantt’s chart

Maps

Page 20: Pretius Oracle Apex Primer

20

Page 21: Pretius Oracle Apex Primer

SAMPLE USE-CASES

21

Page 22: Pretius Oracle Apex Primer

Typical use-cases

22

Data-driven appsAdvanced apps which present and

modify data

Reporting appsPresent data in a user-friendly

manner

Access replacementMigration of MS Access based apps

Excel sharingMigration of Excel-driven management to a web

application

Oracle Forms

EvolutionForms apps migration

Page 23: Pretius Oracle Apex Primer

ARCHITECTURE

23

Page 24: Pretius Oracle Apex Primer

Architecture

24

APEX is installed in the database

APEX internals are tables and PL/SQL

All application data and metadata are stored in the database

Page 25: Pretius Oracle Apex Primer

Architecture - communication

25

http://sc:8080/apex/f?p=4550:1:277450158227801

Page 26: Pretius Oracle Apex Primer

Architecture - engine

26

Generates and processes web pages

Each web query opens and closes a database connection

Database sessions are NOT dedicated per each web user

Manages the session

Provides

Authentication

Authorization

Forms and pages navigation and communication

Validation

Page 27: Pretius Oracle Apex Primer

Architecture – app structure

27

Single database instance

Single APEX instance

Multiple users

Multiple, independent apps

Page 28: Pretius Oracle Apex Primer

Architecture - users

28

APEX administrator

Workspace administrator

Developer

End users

Internal (APEX)

External (e.g. LDAP)

Page 29: Pretius Oracle Apex Primer

Security

29

APEX is just as secure as the rest of the environment: database and operating system

APEX addresses common web attacks

SQL injection

XSS (cross-site scripting)

APEX has built-in session protection

APEX is able to use Oracle Fine Grained Access Control (VPD)

Page 30: Pretius Oracle Apex Primer

Security

30

Authentication

LDAP (e.g. MS Active Directory)

Oracle SSO

SSO

APEX (internal)

Custom Database structure

Authorization

Schemes using custom PL/SQL

LDAP

Can be bound to single web element (button, region, navigation, form, etc.)

Page 31: Pretius Oracle Apex Primer

Performance and scalability

31

UK’s Ministry of Education – teacher management app

2.000.000 page views / month

180.000 users

30.000 new registrations / month

2.000 moderators and administrators

24 months of uptime

0 APEX-related errors

Page 32: Pretius Oracle Apex Primer

APEX application maintenance

32

Test Production

DEV

UAT PROD

SVN, GIT

UsersObjects

Files

Application

Page 33: Pretius Oracle Apex Primer

INTEGRATION

33

Page 34: Pretius Oracle Apex Primer

Datasource integration

34

Databases

Web service

Files

Page 35: Pretius Oracle Apex Primer

Other technologies integration

35

JavaScript (jQuery, modernizer, AngularJS, etc.)

PL/SQL (PL_FPDF, PL_EXCEL)

Web Service

Java (e.g. Jasper, Coocon)

HTML 5

CSS (e.g. Bootstrap)

Flash

BI Publisher

Page 36: Pretius Oracle Apex Primer

JavaScript integration

36

Frameworks: jQuery, jQuery UI, jQuery Mobile Modernizer, AngularJS

Plug-ins

Excel like reports

Charting: HighCharts

JS + CSS (Bootstrap) = Responsive Web Design

Page 37: Pretius Oracle Apex Primer

Web Service integration

37

Accessing remote WS:

Reports, variables values, forms

SOAP

RESTful

Publishing

Reports created in APEX available through REST

Ease of creating using wizards and PL/SQL API

Page 38: Pretius Oracle Apex Primer

ORACLE FORMS MIGRATION

38

Page 39: Pretius Oracle Apex Primer

Why migrate Forms to Apex?

39

Web-enabling of database driven applications

Easy distribution (web based app, no need to install anything besides web browser)

Easy integration with other company web applications

Adding new channel of access for end-users – mobile

Finer access control

Modern web UI

Lowering your TCO (you don’t need Oracle Application Server anymore)

Easy Team Development

Built in tools for issue tracking, auditing and lots of other utilities that are available out of the box

Page 40: Pretius Oracle Apex Primer

Migration advantages

40

Native HTML support

JavaScript and other standard web technologies

Easy UI customization

Better decomposition of common elements which can be used across multiple applications

Easily extensible environment through plugins

Page 41: Pretius Oracle Apex Primer

Migration – what NOT to expect?

41

It is more of a conversion than migration!

We don’t emulate Oracle Forms, we convert them to a web app:

UI of forms and reports will look & feel different (better )

Specific functions will work differently

Navigation

App structure

Communication with the end-user, keyboard shortcuts, etc.

Migration / conversion will not be magical and automatic

It’s not simple (but none of the things worthwhile are)

Page 42: Pretius Oracle Apex Primer

Migration – what to expect?

42

Regular company project – takes time & resources

Building web application which uses as much as possible of the „old” business logic

Page 43: Pretius Oracle Apex Primer

APEX vs Forms/Reports (v. 10, v. 11)

43

Area Forms APEX

Architecture Metadata stored in „.fmx” files

Metadata stored in dbtables

Programming language PL/SQL on both client and server

PL/SQL on serverside

Database connection Fixed Dynamic

UI programming Java (client, browser) HTML, JS, CSS (browser)

Application modules Windows/Canvas/Block Pages/Regions

Client control Triggers JavaScript

Charts BI Beans HTML, JavaScript, Flash

Page 44: Pretius Oracle Apex Primer

How to carry out a conversion project?

44

Page 45: Pretius Oracle Apex Primer

Oracle APEX Forms Converter

45

Tool to manage the conversion process

Time & task management

Forms component overview

Automatic conversion of basic components

Pages, forms, reports (single, master-detail, editable)

Automatic conversion will not happen for

The whole application

Forms UI

Forms-specific components (Trigger, Program Unit, libraries itp.)

Page 46: Pretius Oracle Apex Primer

APEX – conversion project creation

46

Creation of „Forms Migration” project in Migrations section

Upload of previously created XML and PLD files (those files will be created by Forms Converter tool)

Page 47: Pretius Oracle Apex Primer

Sample schedule of conversion project

47

Process / Progress [%] 10 50 100

Application deployment

Validation, processes, etc.

Adding JS/AJAX

Additional forms

UI design

APEX app creation

Component selection

Forms sources conversion

Page 48: Pretius Oracle Apex Primer

Oracle Apex - summary

48

Rapid development of web-

enabled database driven apps

Advanced web charting

and reporting

Mobile ready UI designEasy team-work & cooperation

Full control of data and

visualisation

Page 49: Pretius Oracle Apex Primer

Oracle Apex - summary

49

Cons– Oracle standard

– Debugging (should be better in Apex 5.0)

Pros+ Web 2.0 out of the box

+ Scalability

+ Security

+ Rapid development and deployment

+ Low TCO

+ Technical & community support

+ Oracle standard

Page 50: Pretius Oracle Apex Primer

THANK YOU!

Przemysław Staniszewski

[email protected]

https://twitter.com/pstaniszewski

50

Want to get more information on Oracle Apex?

Follow us on:

Twitter - https://twitter.com/PretiusSoftware

FB - https://www.facebook.com/pretius

LinkedIn - https://www.linkedin.com/company/pretius