This presentation was hold at APEXConnect in Berlin 28th of April 2016.
The presentition describes how to user a source control / versioning system in combination with database oriented projects. You can see how to manage the folder structure and what types of files are versioned, including an Oracle Application Express Application.
Call Girls In Doddaballapur Road ☎ 7737669865 🥵 Book Your One night Stand
How to use source control with apex?
1. How to use Version
Control in APEX projects?
Oliver Lemm
APEX Connect
26.04.2016
2. Facts & Figures
Independent Technology House
with Cross-Industry Expertise
Headquarter
Ratingen
(North Rhine – Westphalia)
240
Employees
Founded
1994
Branches
Dortmund, Cologne,
Frankfurt
Top Company
for Trainees &
Students
Privately-
Owned
Corporation
Oracle
Platinum
Partner
24 Mio. Euro
Revenue
2
3. about me
Oliver Lemm
since february 2007 working for MT AG in Ratingen
Competence Center Leader APEX & Service Center Leader APEX
Diploma applied computer science at the university of Duisburg-Essen
Projectleader, IT-Architect and Developer
working with Oracle Databases and Oracle Application Express since 2007
Blog http://oliverlemm.blogspot.de
Twitter https://twitter.com/OliverLemm
3
4. Agenda
1. Motivation
2. Version Control
3. Versioning APEX Application
4. Versioning Database Objects
5. Versioning external Files
4
6. Motivation
„make it visible what has changed, who changed it and when was the change“
„create a snapshot of the whole scripts of a delivered software“
„define a central repository for the code“
„make it possible to automate testing and deployment“
6
8. Version Control
proprietary and local
PVCS since 1985
Open Source & Client Server
CVS since 1986
Subversion / SVN since 2000
Distributed
Git since 2005
GitHub – web-based Git repository
8
software history
9. Version Control
you need a repository server
direct commit into repository
revision and version central
version history only on server
Central approach supports security and rights management
9
Subversion
working directory
repository
11. Version Control
there is no repository server
all operations are locally
sync mechanism for distributed systems
11
Git
working directory
staging area
repository
13. Version Control
Subversion
TortoiseSVN (Windows) Cornerstone (MAC)
https://tortoisesvn.net/ http://www.zennaware.com/cornerstone/
Git
Sourcetree (Windows & Mac)
https://www.sourcetreeapp.com/
13
client tools
14. Versioning APEX Applications
f100.sql
14
one or many?
Shared
components
Navigation
• Breadcrumbs
• Tabs
User Interface
• lov
• templates
• themes
• shortcuts
Security
• authorization
• authentication
Plugins
• dynamic action
• Item
• Process
• region
Pages
15. Versioning APEX Application
15
single vs multiple
single file multiple files
web based Export & Import Divide into multiple by using APEXExportSplitter
one big file including static files better usable with version control
bring a single change to other instance
all changes encapsulated dependency tracking by developers
changes always replace – no update scripts
16. Versioning APEX Applications
export your application as often as you have done changes
commit the application changes together with database changes
commit single file AND splitted files (by automation)
deliver single file for installation
use splitted file for identifying changes
16
conclusion
20. Versioning Database Objects
divide files by Schema
don‘t use schemanames in script
don‘t mix up DML, DDL and PLSQL
single script for every object
use force in types and views
20
preconditions
21. Versioning Database Object
create a file for every schema combination for grants
one file for synonyms
Include a check in every DDL and DML
21
optional
22. folder structure
trunk/
objects in development
tags/
Every release gets a subfolder in tags
branches/
objects in parallel development
objects for hotfixes in old releases
22
level 1
/trunk/
/tags/
/branches/
23. folder structure
one folder per
release as subfolder
every release
has the same structure
as the trunk
23
level 2 – tags & branches
/tags
/1_40_1
/1_40
/…
/1_1
/branches/
/1_40
/1_30
24. folder structure
Windows -> batch
Linux -> shell
Scripts with instance parameters
Scripts usable with CI/CD or
standalone
No SQL or PL/SQL
24
level 2 – trunk/batch or trunk/shell
/trunk
/batch
/shell
/config
/doc
/logs
/app
/schema_main
/schema_export
/schema_import
/scripts
/static-files
/db-model
25. folder structure
25
level 2 – trunk/config
config
one file for every target instance
Database-IP
Database-Port
Database-Servicename
Schema and Password
Tablespaces
Datafiles
Release
Additional Parameter
Based on security restrictions parameters
not included
dba / datapump / sys
/trunk
/batch
/shell
/config
/doc
/logs
/app
/schema_main
/schema_export
/schema_import
/scripts
/static-files
/db-model
27. folder structure
27
level 2 – trunk/logs
One Installations/Patchlogsfolder per
Instance
Foldername based on
Servicename
Serveraddress
Example:
/ORCL.DEV-COSMOS.DE
Every installation creates a new entry in
/tags/version
If not installing by automation
place logs from installation by hand
/trunk
/batch
/shell
/config
/doc
/logs
/app
/schema_main
/schema_export
/schema_import
/scripts
/static-files
/db-model
29. folder structure
one subfolder per schema
use schema_<name>
easier with parameter
human readable
Higher security when running
scripts from one schema separated
29
level 2 – trunk/schema_xxx
/trunk
/batch
/shell
/config
/doc
/logs
/app
/schema_main
/schema_export
/schema_import
/scripts
/static-files
/db-model
30. folder structure
30
level 2 – trunk/scripts
Scripts for the installation process
Generated installationscripts
Recompile
Checking for invalide objects
Pre-Patchchecks
Updating to the new version
Every Script is called by
shell or batch script
/trunk
/batch
/shell
/config
/doc
/logs
/app
/schema_main
/schema_export
/schema_import
/scripts
/static-files
/db-model
38. 38
Presentations by MT AG
Dienstag, 26. April Mittwoch, 17. April Donnerstag, 28. April
14.00 Uhr | Music Hall 1
Echtzeitvisualisierung von Twitter und Co.
| Kai Donato & Oliver Lemm
16.15 Uhr | Music Hall 2
12.00 Uhr | Soul
14.00 Uhr | Music Hall 3
14.00 Uhr | Jazz 1
16.15 Uhr | Music Hall 1
11.00 Uhr | Music Hall 1
11.00 Uhr | Music Hall 3
14.00 Uhr | Music Hall 2
Universal Theme vs. APEX mobile vs.
MAF
| Davide Groppuso & Steven Grzbielok
WebSocket my APEX!
| Kai Donato
Single Sign-On für alle!
| Niels de Bruijn
Workshop: Einstieg in die aktuelle Version
von Oracle Application Express
| Oliver Lemm
Wie versioniere ich in APEX?
| Oliver Lemm
Interactive Reports Downloads Reloaded
| Moritz Klein
Zeitreisen mit PL/SQL
| Daniel Dyla
APEX for mobile only. Gewusst wie!
| Alexej Schneider