Anda di halaman 1dari 14

Pelatihan Membuat

Aplikasi Menggunakan
Oracle Apex
Konsep dan Pengenalan Arsitektur
Oracle Apex
 Oracle Application Express (Oracle APEX) :
 Sebuah framework yang berbasis pada sebuah database dedicated ( Oracle DB )
 Lisensi include dalam lisensi database
 Engine aplikasi dibangun sepenuhnya didalam sebuah database
 Application Express?
 IDE Browser Based.
Didalam framework : application developer, SQL workshop, Team development dan Administration dalam
satu paket yang bisa diakses melalui web browser.
 Rapid Application Development (RAD).
APEX menganut RAD dimana memudahkan untuk membuat prototyping. Disisi client tidak ada instalasi
apapun serta tidak memerlukan kemampuan knowledge yang handal dalam HTML,CSS,XML dan Javascript
(catatan : anda hanya memakai komponen basic) anda dengan mudah bisa membangun form, report, chart
dan komponen-komponen yang lain yang diperlukan dengan menggunakan wizard, theme dan komponen
yang ada dengan kecepatan yang mengagumkan.
 Arsitektur :

 Oracle Application Express Listener


Oracle Application Express Listener : sebuah Java based sebagai alternative dari Apache
mod_plsql. Anda bisa memakai web listener seperti OC4J, Oracle WebLogic Server dan Oracle
GlassFish Server.
 Apache MOD_PLSQL

Oracle HTTP Server (Apache) sebagai middle tier yang berisi


mod_plsql plug-in . Plugin berfungsi sebagai penghubung komunikasi
antara Web server dan Oracle Application Express objects yang ada
didalam Oracle database. Arsitektur ini memerlukan konfigurasi file
dads.conf. serta file image yang disimpan didalam Oracle HTTP
Server (Apache).

 Embedded PL/SQL Gateway


Embedded PL/SQL Gateway (EPG) yang bekerja didalam oracle
Database itu sendiri yaitu XML DB HTTP server. Arsitektur ini
menyimpan file metadata seperti images, CSS, dan JavaScript
didalam database. Konfigurasi ini cocok untuk development karena
memerlukan konfigurasi yang mudah namun untuk production tidak
disarankan untuk memakai ini.
 Instalasi Database & Oracle Apex

 1. Download Oracle Apex, link berikut :


https://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
 Setelah mengunduh, file zip biasanya bernama “apex_19.1_en.zip“. Salin file
dari folder download dan extract ke folder tempat ingin menginstal Oracle
Apex 19.1, misal, F:\software\apex19, setelah mengekstrak file, akan ada
direktori "apex ” disini. Path lengkap dari instalasi Oracle Apex adalah F:\
software\apex19\apex
 Buka command prompt (CMD) di Windows dan rubah ke direktori F:\software\
apex19\apex
cd F:\software\apex19\apex
 Jalankan script instalasi Oracle Apex 19.1 di lokasi ini (F:\software\apex19\
apex). Buka SQL*PLUS masuk dengan user SYS untuk konek ke Database Oracle,
seperti berikut :
sqlplus sys/syspsw@orcl as sysdba
Kemudian jalankan script berikut :
@apexins.sql SYSAUX SYSAUX TEMP /i/
 Setalah instalasi diatas selesai, jalankan script untuk merubah password user ADMIN.
Sebelum itu, konek kembali ke database karena setelah instalasi tadi koneksi ke database
sudah terputus.
sqlplus sys/syspsw@orcl as sysdba
@apxchpwd.sql
 Jalankan script untuk me-copy file-file image Oracle Apex 19.1 ke folder
apex/images
@apex_epg_config.sql F:\software\apex19\
 Unlock user APEX_PUBLIC_USER dan buat password. Jangan lupa untuk konek
kembali ke database bila sudah terputus
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY orion;
 Seting Apex RESTful Services menggunakan script
@apex_rest_config.sql
 Set HTTP port :
EXEC DBMS_XDB.SETHTTPPORT(8181);
 Config ACL untuk Oracle Apex 19.1 :
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to '*' and give APEX_190100
-- the "connect" privilege if APEX_190100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = '*' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_190100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_190100', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to '*'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('power_users.xml',
'ACL that lets power users to connect to everywhere',
'APEX_190100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('power_users.xml','*');
END;
/
COMMIT;
DECLARE
ACL_PATH VARCHAR2(4000);
BEGIN
-- Look for the ACL currently assigned to 'localhost' and give APEX_190100
-- the "connect" privilege if APEX_190100 does not have the privilege yet.
SELECT ACL INTO ACL_PATH FROM DBA_NETWORK_ACLS
WHERE HOST = 'localhost' AND LOWER_PORT IS NULL AND UPPER_PORT IS NULL;
IF DBMS_NETWORK_ACL_ADMIN.CHECK_PRIVILEGE(ACL_PATH, 'APEX_190100',
'connect') IS NULL THEN
DBMS_NETWORK_ACL_ADMIN.ADD_PRIVILEGE(ACL_PATH,
'APEX_190100', TRUE, 'connect');
END IF;
EXCEPTION
-- When no ACL has been assigned to 'localhost'.
WHEN NO_DATA_FOUND THEN
DBMS_NETWORK_ACL_ADMIN.CREATE_ACL('local-access-users.xml',
'ACL that lets users to connect to localhost',
'APEX_190100', TRUE, 'connect');
DBMS_NETWORK_ACL_ADMIN.ASSIGN_ACL('local-access-users.xml','localhost');
END;
/
COMMIT;
 Instalasi Oracle Apex 19.1 selesai, dan untuk mengetahui berhasil atau tidak
nya adalah dengan membuka browser dan masuk ke URL berikut :
http://localhost:8181/apex/apex_admin
 Workspace, Aplikasi, dan Schema Database di Oracle Apex
 Area untuk men-develop aplikasi disebut workspace
 Workspace adalah virtual private database yang memungkinkan banyak
user/developer untuk berkerja bersama di instalasi Oracle Apex yang sama
 Satu workspace bisa di-share untuk beberapa developer atau bisa juga satu workspace
hanya di-dedicated untuk satu developer
 Berikut ilustrasi hubungan antara user and developer, workspace, dan schema
database
 Oracle Apex User Roles
Penggunaan Oracle Apex di Organisasi/Perusahaan yang besar,
kita harus menerapkan roles dan privileges untuk spesifik
user/developer. Roles di Oracle Application Express :
 Workspace administrators : user yang bertugas spesifik
sebagai administrator untuk mengelola workspace seperti
mengelola user account, monitoring workspace, dan
monitoring log file
 Developers : user yang membuat dan mengedit aplikasi.
Developer bisa mempunyai workspace sendiri atau juga share
workspace
 End users : user yang tidak mempunyai hak development. End
users hanya mempunyai hak akses ke aplikasi, digunakan
ketika aplikasi tidak menggunakan external authentication
scheme.
 Oracle Application Express administrators : adalah
superusers yang mengelola seluruh instance yang di hosting
menggunakan Oracle Apex
 Untuk training kita biasanya menerapkan 3 role untuk satu user yang digunakan:
Application Express Administrator, Workspace Administrator, dan Developer.
Ilustrasinysa sbb :
 Link Referensi

https://docs.oracle.com/en/database/oracle/application-express/19.1/htmdb/quick-start.html

https://docs.oracle.com/en/database/oracle/application-express/19.1/books.html
Terimakasih

Anda mungkin juga menyukai