SlideShare a Scribd company logo
APEX Application
Lifecycle
with feature based
deployment
I am Richard Martens
Welcome to this presentation.
You can find me at
◉ @rhjmartens
◉ smart4solutions.nl/blog
Hello!
The world according to SMART4Solutions
Agenda
• Objectives
• Requirements
• Development Methodology
• Solution
• Branching Strategies
• Workflow
• Project Folder Structure
• Deployment
• Assumptions
• Challenges
Objectives
What are we
trying to
achieve?
1
“
Our customers expect and need a way to deploy an APEX
application based on a single feature
Objectives
“
Easy deployment throughout the application lifecycle
Objectives
“
Development of new features may not be stopped
Objectives
Objectives
◉ Our customers expect and need a way to deploy an APEX application based
on a single feature
◉ Easy deployment throughout the application lifecycle
◉ Development of new features may not be stopped
Requirements
What conditions
must be met?
1
Requirements
• No dependency on specific project-management tools
○ Jira, Wrike, MS-Project
○ Confluence, Sharepoint
○ Bitbucket, Gitlab, Github
• Using our standard development methodology
• 1 core schema
■ for data and business-rules
• 1 apex schema
○ for APEX specific views and packages
■ This is the schema our APEX workspace looks at
also known as “parsing schema”
• Optional a VPD layer or other “external” schemas involved
• DB deployment-tool using regular SQL / Command scripts that every DB developer
understands (learning curve)
Development
Methodology
How do we
develop?
1
Standard infrastructure
• The basic idea
○ APEX does not “touch” tables directly
○ A view / package for each individual APEX page
○ A view / package for each individual REST module
• We pushed it a bit further
○ A view for each individual region
○ LOV’s compilable in the database!
○ Naming standards for objects:
■ prefix_app_page_description_suffix
○ UI and Business should not be mingled, Modularising code
○ Enforces the question: what is business logic, what is not
Standard infrastructure dev
CORE-schema
(s4sbo_core_dev)
ORDS
Reverse
Proxy
static project
files
static APEX files
(/i)
other
(s4sbo_other_dev)
other
(s4sbo_other_dev)
APEX-schema
(s4sbo_apex_dev)
Each new interface
gets its own schema
APEX-schema
(s4sbo_apex_dev)
Standard infrastructure tst
CORE-schema
(s4sbo_core_tst)
ORDS
Reverse
Proxy
other
(s4sbo_other_tst)
other
(s4sbo_other_tst)
APEX-schema
(s4sbo_apex_tst)
Each new interface
gets its own schema
static project
files
static APEX files
(/i)
Standard infrastructure prd
CORE-schema
(s4sbo_core_prd)
ORDS
Reverse
Proxy
other
(s4sbo_other_prd)
other
(s4sbo_other_prd)
APEX-schema
(s4sbo_apex_prd)
Each new interface
gets its own schema
static project
files
static APEX files
(/i)
Solution
Deploying
database
objects
1
Introducing Flyway CE
Flyway run
1. Scan folder-
structure
2. Execute
Versioned files
by version
increment (ie
alphabetically)
3. Execute
Repeatable files
alphabetically
Project Folder Structure
Structuring
our work
Project Folder Structure
• Each db-object deserves a file
○ Separate package (or type) spec and body
○ Project dependant
(ie indexes at table creation)
• Predefined structure
• Naming method for Flyway
○ R__xxx
○ VYYYYMMDDHHMI__xxx
• We’re not using an “install_all” script !
20
Flyway at work
• Flyway CE
§ only allows “.sql” file-extensions
§ No SQL*Plus commands
• “prep4flyway.sh” renames all files
§ Extensions to “.sql”
§ Prefixes files according to folder-number
§ Enforces order of spec and body
• Flyway only sees the renamed files
• We can now build all our DB objects
• What do we feed Flyway to get a proper builds ?
• Introducing: GIT and branching
Flyway at work
Branching Strategies
Separating our
work
Branching Strategies
main
hotfix
acceptance
develop
feature 1
feature 2
GITFLOW
Branching Strategies
main
hotfix
acceptance
develop
feature 1
feature 2
test
S4S-FLOW
Build Server Jenkins
Deploy DB Objects
• We’re now able to deploy a specific
branch
• Including all DB-objects
• Including data
• The deployment contains the features
that were merged into the build
branches (Test, Acc, Prod)
• What is missing?
Integrating APEX into the build
• A special component-export application
Integrating APEX into the build
• The generated ZIP contains an installer
for the exported components
Integrating APEX into the build
• The developer unzips the ZIP into the GIT-branch
• f100.zip unpacks in f100 folder
§ Mac users need a tool to merge folders
• Application folder contains entire application
but only exported files are “new”
• The included installer cannot be used
• Extra build-step: “create_cmp_install.sh”
§ Generates a new application-installer
• Extra build-step to deploy static files (*.js, *.png etc)
Deployment
• The deployment process is as follows (DTAP)
§ D for Docker, an environment that gets reset (to the latest production version) before each build
§ Because we build all environments automatically we have tested our deployment-scripts 3! Times by the time we deploy to
production
1. Checkout the branch
2. Start “prep4flyway” script for CORE (1st) and APEX (2nd) schema
3. Copy static files (rsync)
4. Start “create_cmp_install” script for each application (D & T)
5. Invoke flyway for CORE (first) and APEX (second) schema
1. Uses callbacks to check for invalids, invalids break the build!
6. Start the generated install script from step 4 (D & T) otherwise full-app install
7. Full App export (T)
8. Place full-app export on the Test Branch
GIT
Checkout
Start
Docker
APEX
Deploy
APEX
Export
DB
Deploy A
DB
Deploy C
Commit &
Push
prep4
flyway
copy
static files
Create
CMP
Install
Team 2
Team 2
The deployment street
Integration
deploy
(dev)
TEST
deploy
ACC
deploy
PROD
deploy
Team 1
Team 2
1 2 3 4
1. Feature branch merged into DEV branch
2.DEV branch merged into TEST branch
3.TEST branch merged into ACC branch
4.ACC branch merged into MAIN branch
Team 2
Team 2
2
a
The deployment street
Integration
deploy
(dev)
TEST
deploy
ACC
deploy
PROD
deploy
Team 1
Team 2
1 2 3 4
1
a
1. Feature branch merged into DEV branch
a. Feature merged into DEV brach (REVIEW)
After it was built in docker and reviewed
2.DEV branch merged into TEST branch
a. Full application export pushed into TEST and DEV branch
3.TEST branch merged into ACC branch
4.ACC branch merged into MAIN branch
Workflow
Doing the actual
work
• Create Feature Branch (FB)
• Lock page before start
• Save changes on the Feature Branch (DB / APEX)
• Push to Remote Feature Branch
• Build Docker instance to test integration
• Check work on Docker instance
• Create Merge Request
§ Is review step by colleague / QA
• Unlock page when merged into Development Branch
Working Flow
Ready!
Assumptions
We have some
quirks
Assumptions
• We don’t use the built-in static menu-list in our applications
§ Overcome by using build-options
• NEVER EVER touch a versioned file after it has been merged
into DEV branch
• Btw, never ever touch a versioned file
after it has been merged into DEV branch!!
Challenges
Difficulties?
Challenges
• A shared development instance
§ Simultaneous development on single Database objects
• Corrections for versioned files should go in a new versioned
file
• Commits and Merges preferably on the local filesystem
push as late as possible
• Get to know your tools
§ IDE (PL/SQL Developer)
§ Gitkraken / Sourcetree / Fork / Tower / TortoiseGit
• Get to know your process
§ Git for teams
Recap
• All software is stored in the GIT repository
• A proven branching strategy
• Standard directory structure
• Deployment-tools are stored inside the
repo
• Tools used
§ A ticket system (Jira/Wrike etc)
§ A GIT server (Bitbucket/Gitlab/Github etc)
§ A GIT Client (any will do)
§ IDEs for PL/SQL and CSS, images Javascript
etc.
§ Flyway Community Edition
42
Any questions ?
You can find me at
◉ @rhjmartens
◉ rmartens@smart4solutions.nl
Thanks!

More Related Content

Similar to APEX Application Lifecycle and Deployment 20220714.pdf

KYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under ControlKYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under Control
Coimbra JUG
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
Eric Overfield
 
Meetup developing building and_deploying databases with SSDT
Meetup developing building and_deploying databases with SSDTMeetup developing building and_deploying databases with SSDT
Meetup developing building and_deploying databases with SSDT
Solidify
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Mack Hardy
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
Ulrich Krause
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
Synapseindiappsdevelopment
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
Thomas Daly
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin Architecture
Matt Nolan
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
Trivadis
 
(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern Desktop(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern Desktop
Oren Novotny
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
Mat Mannion
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
GlobalLogic Ukraine
 
Staged Patching Approach in Oracle E-Business Suite
Staged Patching Approach in Oracle E-Business SuiteStaged Patching Approach in Oracle E-Business Suite
Staged Patching Approach in Oracle E-Business Suite
vasuballa
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
ShaimaaMohamedGalal
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
Vagif Abilov
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
Azure Riyadh User Group
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Anupam Ranku
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
Victor Morales
 

Similar to APEX Application Lifecycle and Deployment 20220714.pdf (20)

KYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under ControlKYSUC - Keep Your Schema Under Control
KYSUC - Keep Your Schema Under Control
 
Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
 
Meetup developing building and_deploying databases with SSDT
Meetup developing building and_deploying databases with SSDTMeetup developing building and_deploying databases with SSDT
Meetup developing building and_deploying databases with SSDT
 
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
Strategies and Tips for Building Enterprise Drupal Applications - PNWDS 2013
 
Extension Library - Viagra for XPages
Extension Library - Viagra for XPagesExtension Library - Viagra for XPages
Extension Library - Viagra for XPages
 
SynapseIndia drupal presentation on drupal info
SynapseIndia drupal  presentation on drupal infoSynapseIndia drupal  presentation on drupal info
SynapseIndia drupal presentation on drupal info
 
Plantilla oracle
Plantilla oraclePlantilla oracle
Plantilla oracle
 
Learn from my Mistakes - Building Better Solutions in SPFx
Learn from my  Mistakes - Building Better Solutions in SPFxLearn from my  Mistakes - Building Better Solutions in SPFx
Learn from my Mistakes - Building Better Solutions in SPFx
 
Unlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin ArchitectureUnlocking the power of the APEX Plugin Architecture
Unlocking the power of the APEX Plugin Architecture
 
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
TechEvent 2019: Oracle to PostgreSQL - a Travel Guide from Practice; Roland S...
 
(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern Desktop(WPF + WinForms) * .NET Core = Modern Desktop
(WPF + WinForms) * .NET Core = Modern Desktop
 
Ow
OwOw
Ow
 
DevOps: Automate all the things
DevOps: Automate all the thingsDevOps: Automate all the things
DevOps: Automate all the things
 
Modern Web-site Development Pipeline
Modern Web-site Development PipelineModern Web-site Development Pipeline
Modern Web-site Development Pipeline
 
Staged Patching Approach in Oracle E-Business Suite
Staged Patching Approach in Oracle E-Business SuiteStaged Patching Approach in Oracle E-Business Suite
Staged Patching Approach in Oracle E-Business Suite
 
Lecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdfLecture11_LaravelGetStarted_SPring2023.pdf
Lecture11_LaravelGetStarted_SPring2023.pdf
 
SOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class LibrariesSOLID Programming with Portable Class Libraries
SOLID Programming with Portable Class Libraries
 
Power of Azure Devops
Power of Azure DevopsPower of Azure Devops
Power of Azure Devops
 
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
Office 365 Saturday (Sydney) - SharePoint framework – build integrated user e...
 
How to setup a development environment for ONAP
How to setup a development environment for ONAPHow to setup a development environment for ONAP
How to setup a development environment for ONAP
 

Recently uploaded

Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
gdsczhcet
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
Kamal Acharya
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
Neometrix_Engineering_Pvt_Ltd
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Teleport Manpower Consultant
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
bakpo1
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
TeeVichai
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
MLILAB
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
SamSarthak3
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
AafreenAbuthahir2
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
BrazilAccount1
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
AhmedHussein950959
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
ankuprajapati0525
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
Pratik Pawar
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
ongomchris
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
karthi keyan
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
Kerry Sado
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation & Control
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
Jayaprasanna4
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Dr.Costas Sachpazis
 

Recently uploaded (20)

Gen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdfGen AI Study Jams _ For the GDSC Leads in India.pdf
Gen AI Study Jams _ For the GDSC Leads in India.pdf
 
Student information management system project report ii.pdf
Student information management system project report ii.pdfStudent information management system project report ii.pdf
Student information management system project report ii.pdf
 
Standard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - NeometrixStandard Reomte Control Interface - Neometrix
Standard Reomte Control Interface - Neometrix
 
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
H.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdfH.Seo,  ICLR 2024, MLILAB,  KAIST AI.pdf
H.Seo, ICLR 2024, MLILAB, KAIST AI.pdf
 
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdfTop 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
Top 10 Oil and Gas Projects in Saudi Arabia 2024.pdf
 
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
一比一原版(SFU毕业证)西蒙菲莎大学毕业证成绩单如何办理
 
Railway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdfRailway Signalling Principles Edition 3.pdf
Railway Signalling Principles Edition 3.pdf
 
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang,  ICLR 2024, MLILAB, KAIST AI.pdfJ.Yang,  ICLR 2024, MLILAB, KAIST AI.pdf
J.Yang, ICLR 2024, MLILAB, KAIST AI.pdf
 
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdfAKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
AKS UNIVERSITY Satna Final Year Project By OM Hardaha.pdf
 
WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234WATER CRISIS and its solutions-pptx 1234
WATER CRISIS and its solutions-pptx 1234
 
AP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specificAP LAB PPT.pdf ap lab ppt no title specific
AP LAB PPT.pdf ap lab ppt no title specific
 
ASME IX(9) 2007 Full Version .pdf
ASME IX(9)  2007 Full Version       .pdfASME IX(9)  2007 Full Version       .pdf
ASME IX(9) 2007 Full Version .pdf
 
The role of big data in decision making.
The role of big data in decision making.The role of big data in decision making.
The role of big data in decision making.
 
weather web application report.pdf
weather web application report.pdfweather web application report.pdf
weather web application report.pdf
 
space technology lecture notes on satellite
space technology lecture notes on satellitespace technology lecture notes on satellite
space technology lecture notes on satellite
 
CME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional ElectiveCME397 Surface Engineering- Professional Elective
CME397 Surface Engineering- Professional Elective
 
Hierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power SystemHierarchical Digital Twin of a Naval Power System
Hierarchical Digital Twin of a Naval Power System
 
Water Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdfWater Industry Process Automation and Control Monthly - May 2024.pdf
Water Industry Process Automation and Control Monthly - May 2024.pdf
 
ethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.pptethical hacking in wireless-hacking1.ppt
ethical hacking in wireless-hacking1.ppt
 
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
Sachpazis:Terzaghi Bearing Capacity Estimation in simple terms with Calculati...
 

APEX Application Lifecycle and Deployment 20220714.pdf

  • 2. I am Richard Martens Welcome to this presentation. You can find me at ◉ @rhjmartens ◉ smart4solutions.nl/blog Hello!
  • 3. The world according to SMART4Solutions
  • 4. Agenda • Objectives • Requirements • Development Methodology • Solution • Branching Strategies • Workflow • Project Folder Structure • Deployment • Assumptions • Challenges
  • 6. “ Our customers expect and need a way to deploy an APEX application based on a single feature Objectives
  • 7. “ Easy deployment throughout the application lifecycle Objectives
  • 8. “ Development of new features may not be stopped Objectives
  • 9. Objectives ◉ Our customers expect and need a way to deploy an APEX application based on a single feature ◉ Easy deployment throughout the application lifecycle ◉ Development of new features may not be stopped
  • 11. Requirements • No dependency on specific project-management tools ○ Jira, Wrike, MS-Project ○ Confluence, Sharepoint ○ Bitbucket, Gitlab, Github • Using our standard development methodology • 1 core schema ■ for data and business-rules • 1 apex schema ○ for APEX specific views and packages ■ This is the schema our APEX workspace looks at also known as “parsing schema” • Optional a VPD layer or other “external” schemas involved • DB deployment-tool using regular SQL / Command scripts that every DB developer understands (learning curve)
  • 13. Standard infrastructure • The basic idea ○ APEX does not “touch” tables directly ○ A view / package for each individual APEX page ○ A view / package for each individual REST module • We pushed it a bit further ○ A view for each individual region ○ LOV’s compilable in the database! ○ Naming standards for objects: ■ prefix_app_page_description_suffix ○ UI and Business should not be mingled, Modularising code ○ Enforces the question: what is business logic, what is not
  • 14. Standard infrastructure dev CORE-schema (s4sbo_core_dev) ORDS Reverse Proxy static project files static APEX files (/i) other (s4sbo_other_dev) other (s4sbo_other_dev) APEX-schema (s4sbo_apex_dev) Each new interface gets its own schema APEX-schema (s4sbo_apex_dev)
  • 18. Introducing Flyway CE Flyway run 1. Scan folder- structure 2. Execute Versioned files by version increment (ie alphabetically) 3. Execute Repeatable files alphabetically
  • 20. Project Folder Structure • Each db-object deserves a file ○ Separate package (or type) spec and body ○ Project dependant (ie indexes at table creation) • Predefined structure • Naming method for Flyway ○ R__xxx ○ VYYYYMMDDHHMI__xxx • We’re not using an “install_all” script ! 20
  • 21. Flyway at work • Flyway CE § only allows “.sql” file-extensions § No SQL*Plus commands • “prep4flyway.sh” renames all files § Extensions to “.sql” § Prefixes files according to folder-number § Enforces order of spec and body • Flyway only sees the renamed files
  • 22. • We can now build all our DB objects • What do we feed Flyway to get a proper builds ? • Introducing: GIT and branching Flyway at work
  • 27. Deploy DB Objects • We’re now able to deploy a specific branch • Including all DB-objects • Including data • The deployment contains the features that were merged into the build branches (Test, Acc, Prod) • What is missing?
  • 28. Integrating APEX into the build • A special component-export application
  • 29. Integrating APEX into the build • The generated ZIP contains an installer for the exported components
  • 30. Integrating APEX into the build • The developer unzips the ZIP into the GIT-branch • f100.zip unpacks in f100 folder § Mac users need a tool to merge folders • Application folder contains entire application but only exported files are “new” • The included installer cannot be used • Extra build-step: “create_cmp_install.sh” § Generates a new application-installer • Extra build-step to deploy static files (*.js, *.png etc)
  • 31. Deployment • The deployment process is as follows (DTAP) § D for Docker, an environment that gets reset (to the latest production version) before each build § Because we build all environments automatically we have tested our deployment-scripts 3! Times by the time we deploy to production 1. Checkout the branch 2. Start “prep4flyway” script for CORE (1st) and APEX (2nd) schema 3. Copy static files (rsync) 4. Start “create_cmp_install” script for each application (D & T) 5. Invoke flyway for CORE (first) and APEX (second) schema 1. Uses callbacks to check for invalids, invalids break the build! 6. Start the generated install script from step 4 (D & T) otherwise full-app install 7. Full App export (T) 8. Place full-app export on the Test Branch GIT Checkout Start Docker APEX Deploy APEX Export DB Deploy A DB Deploy C Commit & Push prep4 flyway copy static files Create CMP Install
  • 32. Team 2 Team 2 The deployment street Integration deploy (dev) TEST deploy ACC deploy PROD deploy Team 1 Team 2 1 2 3 4 1. Feature branch merged into DEV branch 2.DEV branch merged into TEST branch 3.TEST branch merged into ACC branch 4.ACC branch merged into MAIN branch
  • 33. Team 2 Team 2 2 a The deployment street Integration deploy (dev) TEST deploy ACC deploy PROD deploy Team 1 Team 2 1 2 3 4 1 a 1. Feature branch merged into DEV branch a. Feature merged into DEV brach (REVIEW) After it was built in docker and reviewed 2.DEV branch merged into TEST branch a. Full application export pushed into TEST and DEV branch 3.TEST branch merged into ACC branch 4.ACC branch merged into MAIN branch
  • 35. • Create Feature Branch (FB) • Lock page before start • Save changes on the Feature Branch (DB / APEX) • Push to Remote Feature Branch • Build Docker instance to test integration • Check work on Docker instance • Create Merge Request § Is review step by colleague / QA • Unlock page when merged into Development Branch Working Flow
  • 38. Assumptions • We don’t use the built-in static menu-list in our applications § Overcome by using build-options • NEVER EVER touch a versioned file after it has been merged into DEV branch • Btw, never ever touch a versioned file after it has been merged into DEV branch!!
  • 40. Challenges • A shared development instance § Simultaneous development on single Database objects • Corrections for versioned files should go in a new versioned file • Commits and Merges preferably on the local filesystem push as late as possible • Get to know your tools § IDE (PL/SQL Developer) § Gitkraken / Sourcetree / Fork / Tower / TortoiseGit • Get to know your process § Git for teams
  • 41. Recap • All software is stored in the GIT repository • A proven branching strategy • Standard directory structure • Deployment-tools are stored inside the repo • Tools used § A ticket system (Jira/Wrike etc) § A GIT server (Bitbucket/Gitlab/Github etc) § A GIT Client (any will do) § IDEs for PL/SQL and CSS, images Javascript etc. § Flyway Community Edition
  • 42. 42 Any questions ? You can find me at ◉ @rhjmartens ◉ rmartens@smart4solutions.nl Thanks!