HOW TO GET STARTED WITH ORACLE APEX? ORACLE APEX PRIMER Przemysław Staniszewski [email protected] https://twitter.com/pstaniszewski
HOW TO GET STARTED WITH ORACLE APEX?
ORACLE APEX PRIMER
Przemysław [email protected]://twitter.com/pstaniszewski
AGENDA
2
What is Oracle Apex?
Working with APEX
Sample use-cases
Architecture
Integration
Oracle Forms migration
WHAT IS ORACLE APEX?
3
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 …
Design your database…
5
Implement your business logic…
6
Implement GUI (Graphical User Interface) …
7
Implement GUI (Graphical User Interface) …
8
APEX application architecture
9
Application layer
Web interface
Business logic
Data
Solution
APEX
PL/SQL (API)
Tables / Views
APEX application architecture
10
Solution
APEX
PL/SQL (API)
Tabele / Widoki
Calls
Fetches
SQL, PL/SQLHTML, Javascript
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, …)
WORKING WITH APEX
12
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
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
Structure
15
Applications
Global elements
Page elements
Pages
External elements
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
Region types
17
Report
Classic
Interactive
Web Service-backed
Forms
Charts
Others (e.g. basic HTML – like in any Content Mgmt. System)
Interactive reports
18
Simple modification by end-users (calculated columns, aggregations, highlighting, charts)
Simple sharing of new / modified reports by end-users
Chart types
19
HTML 5, JS* i Flash;
Various built-in chart types available:
Bar, pie, line, point, candlestick
Counters
Gantt’s chart
Maps
20
SAMPLE USE-CASES
21
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
ARCHITECTURE
23
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
Architecture - communication
25
http://sc:8080/apex/f?p=4550:1:277450158227801
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
Architecture – app structure
27
Single database instance
Single APEX instance
Multiple users
Multiple, independent apps
Architecture - users
28
APEX administrator
Workspace administrator
Developer
End users
Internal (APEX)
External (e.g. LDAP)
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)
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.)
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
APEX application maintenance
32
Test Production
DEV
UAT PROD
SVN, GIT
UsersObjects
Files
Application
INTEGRATION
33
Datasource integration
34
Databases
Web service
Files
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
JavaScript integration
36
Frameworks: jQuery, jQuery UI, jQuery Mobile Modernizer, AngularJS
Plug-ins
Excel like reports
Charting: HighCharts
JS + CSS (Bootstrap) = Responsive Web Design
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
ORACLE FORMS MIGRATION
38
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
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
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)
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
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
How to carry out a conversion project?
44
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.)
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)
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
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
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
THANK YOU!
Przemysław Staniszewski
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