SlideShare a Scribd company logo
1 of 17
Download to read offline
ā€œFramework Principal" pattern
Philippe Rabier - twitter.com/prabier
Sophiacom
@prabier
Follow me!
Why this presentation?
ā€¢What is a Framework Principal?
ā€¢ Starter class automatically instantiated, very early
ā€¢ Used to initialize your stuffs
ā€¢ Independent from the Application
ā€¢ @see ERXFrameworkPrincipal
What is the goal?
Resource optimization!
Feedback fromYou ā€™N Push
Sandbox environment
1 application
Back Ofļ¬ce FTP Server Web Services
Job Scheduler
In-App
Purchase
Service
Push
Notiļ¬cation
Service
Production environment
Back Ofļ¬ce FTP Server Web Services
Job Scheduler
In-App
Purchase
Service
Push
Notiļ¬cation
Service
4 applications
How to do that?
Not rocket science!
ā€¢ Make your FP runnable. Change the build.properties like this:
principalClass=ca.wowodc.pascal.util.MyFrameworkPrincipal
ā€¢ Create an empty Wonder application
ā€¢ Add the frameworks to the classpath
ā€¢ Choose a rule for your properties ļ¬le names like
Properties.staging or Properties.production
ā€¢ Set your properties
ā€¢ Set the appropriate user name in the WOMonitor conļ¬guration
ā€¢ ā€¦et voilĆ !
The Recipe
Skeleton of a FP
	 public static boolean serviceMustRun()
	 {
	 	 return ERXProperties.booleanForKeyWithDefault("myServiceToLaunch", false);
	 }
	 public void finishInitialization()
	 {
	 	 if (serviceMustRun() )
	 	 {
	 	 	 // your code
	 	 	 ...		 	 	
	 	 }
	 }
	 public boolean isServiceRunning()
	 {
	 	 return a condition;
	 }
Skeleton of a Properties ļ¬le
#Launch first service
firstServiceToLaunch=true
#second service is not running
secondServiceToLaunch=false
WOMonitor conļ¬gs
The application will look for Properties.production file
The application will look for Properties.sandbox file
2 Strategies
ā€¢ Only one application
ā€¢ user name is different for each application
ā€¢ ex: Properties.scheduler, Properties.backofļ¬ce, ā€¦
ā€¢ Several specialized applications
ā€¢ user name is the same for every app like Properties.production
ā€¢ applications are different: scheduler.woa, backofļ¬ce.woa, ā€¦
Do you know?
ā€¢ ERRest can be conļ¬gured in a FP (set up the request handler, the
routes, ā€¦)
ā€¢ D2W applications could be deļ¬ned in a FP (the
ERXNavigationManager loads all navigationMenu.plist in any
frameworks, the rules can be anywhere, ā€¦).
@prabier
Follow me!
Q&A
ā€œFramework Principal" pattern

More Related Content

What's hot

MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 Joe Ferguson
Ā 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionJoe Ferguson
Ā 
Continuous delivery for native apps
Continuous delivery for native appsContinuous delivery for native apps
Continuous delivery for native appsNiels Frydenholm
Ā 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsYakov Fain
Ā 
All Aboard for Laravel 5.1
All Aboard for Laravel 5.1All Aboard for Laravel 5.1
All Aboard for Laravel 5.1Jason McCreary
Ā 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScriptkoppenolski
Ā 
BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...
BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...
BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...JosephTesta9
Ā 
Azure web functions little bites of services
Azure web functions little bites of servicesAzure web functions little bites of services
Azure web functions little bites of servicesAaron Petry
Ā 
Azphp phpunit-jenkins
Azphp phpunit-jenkinsAzphp phpunit-jenkins
Azphp phpunit-jenkinsEric Cope
Ā 
Continuous delivery of your legacy application
Continuous delivery of your legacy applicationContinuous delivery of your legacy application
Continuous delivery of your legacy applicationColdFusionConference
Ā 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingFrank van der Linden
Ā 
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...NETWAYS
Ā 
CI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsCI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsMike North
Ā 
Helpful Automation Techniques - Selenium Camp 2014
Helpful Automation Techniques - Selenium Camp 2014Helpful Automation Techniques - Selenium Camp 2014
Helpful Automation Techniques - Selenium Camp 2014Justin Ison
Ā 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React AppAll Things Open
Ā 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New FeaturesJoe Ferguson
Ā 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkBukhori Aqid
Ā 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StorySauce Labs
Ā 

What's hot (20)

Future of Java
Future of JavaFuture of Java
Future of Java
Ā 
MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5 MidwestPHP 2016 - Adventures in Laravel 5
MidwestPHP 2016 - Adventures in Laravel 5
Ā 
Laravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello ProductionLaravel Forge: Hello World to Hello Production
Laravel Forge: Hello World to Hello Production
Ā 
Continuous delivery for native apps
Continuous delivery for native appsContinuous delivery for native apps
Continuous delivery for native apps
Ā 
Using JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot appsUsing JHipster 4 for generating Angular/Spring Boot apps
Using JHipster 4 for generating Angular/Spring Boot apps
Ā 
Migrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to GradleMigrating 25K lines of Ant scripting to Gradle
Migrating 25K lines of Ant scripting to Gradle
Ā 
All Aboard for Laravel 5.1
All Aboard for Laravel 5.1All Aboard for Laravel 5.1
All Aboard for Laravel 5.1
Ā 
Intro JavaScript
Intro JavaScriptIntro JavaScript
Intro JavaScript
Ā 
BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...
BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...
BSides Rochester 2018: Justin Moore: Automated HTTP Request Repeating With Bu...
Ā 
Azure web functions little bites of services
Azure web functions little bites of servicesAzure web functions little bites of services
Azure web functions little bites of services
Ā 
Azphp phpunit-jenkins
Azphp phpunit-jenkinsAzphp phpunit-jenkins
Azphp phpunit-jenkins
Ā 
Continuous delivery of your legacy application
Continuous delivery of your legacy applicationContinuous delivery of your legacy application
Continuous delivery of your legacy application
Ā 
Engage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everythingEngage 2020: Hello are you listening, There is stream for everything
Engage 2020: Hello are you listening, There is stream for everything
Ā 
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...
OSCamp 2019 | #3 Ansible: Automated Tests of Ansible code with GitLab, Vagran...
Ā 
CI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page AppsCI/CD and Asset Serving for Single Page Apps
CI/CD and Asset Serving for Single Page Apps
Ā 
Helpful Automation Techniques - Selenium Camp 2014
Helpful Automation Techniques - Selenium Camp 2014Helpful Automation Techniques - Selenium Camp 2014
Helpful Automation Techniques - Selenium Camp 2014
Ā 
The Many Ways to Test Your React App
The Many Ways to Test Your React AppThe Many Ways to Test Your React App
The Many Ways to Test Your React App
Ā 
Laravel 5 New Features
Laravel 5 New FeaturesLaravel 5 New Features
Laravel 5 New Features
Ā 
Knowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP frameworkKnowing Laravel 5 : The most popular PHP framework
Knowing Laravel 5 : The most popular PHP framework
Ā 
Moving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life StoryMoving From a Selenium Grid to the Cloud - A Real Life Story
Moving From a Selenium Grid to the Cloud - A Real Life Story
Ā 

Viewers also liked

COScheduler In Depth
COScheduler In DepthCOScheduler In Depth
COScheduler In DepthWO Community
Ā 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to WonderWO Community
Ā 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsWO Community
Ā 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO DevsWO Community
Ā 
Life outside WO
Life outside WOLife outside WO
Life outside WOWO Community
Ā 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldWO Community
Ā 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnitWO Community
Ā 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache CayenneWO Community
Ā 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERRESTWO Community
Ā 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W WO Community
Ā 
Build and deployment
Build and deploymentBuild and deployment
Build and deploymentWO Community
Ā 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative versionWO Community
Ā 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSWO Community
Ā 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful ControllersWO Community
Ā 
KAAccessControl
KAAccessControlKAAccessControl
KAAccessControlWO Community
Ā 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on WindowsWO Community
Ā 
High availability
High availabilityHigh availability
High availabilityWO Community
Ā 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engineWO Community
Ā 

Viewers also liked (20)

COScheduler
COSchedulerCOScheduler
COScheduler
Ā 
COScheduler In Depth
COScheduler In DepthCOScheduler In Depth
COScheduler In Depth
Ā 
Migrating existing Projects to Wonder
Migrating existing Projects to WonderMigrating existing Projects to Wonder
Migrating existing Projects to Wonder
Ā 
Using Nagios to monitor your WO systems
Using Nagios to monitor your WO systemsUsing Nagios to monitor your WO systems
Using Nagios to monitor your WO systems
Ā 
Apache Cayenne for WO Devs
Apache Cayenne for WO DevsApache Cayenne for WO Devs
Apache Cayenne for WO Devs
Ā 
Life outside WO
Life outside WOLife outside WO
Life outside WO
Ā 
Chaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real WorldChaining the Beast - Testing Wonder Applications in the Real World
Chaining the Beast - Testing Wonder Applications in the Real World
Ā 
Unit Testing with WOUnit
Unit Testing with WOUnitUnit Testing with WOUnit
Unit Testing with WOUnit
Ā 
Advanced Apache Cayenne
Advanced Apache CayenneAdvanced Apache Cayenne
Advanced Apache Cayenne
Ā 
iOS for ERREST
iOS for ERRESTiOS for ERREST
iOS for ERREST
Ā 
Filtering data with D2W
Filtering data with D2W Filtering data with D2W
Filtering data with D2W
Ā 
WOver
WOverWOver
WOver
Ā 
Build and deployment
Build and deploymentBuild and deployment
Build and deployment
Ā 
iOS for ERREST - alternative version
iOS for ERREST - alternative versioniOS for ERREST - alternative version
iOS for ERREST - alternative version
Ā 
Reenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWSReenabling SOAP using ERJaxWS
Reenabling SOAP using ERJaxWS
Ā 
D2W Stateful Controllers
D2W Stateful ControllersD2W Stateful Controllers
D2W Stateful Controllers
Ā 
KAAccessControl
KAAccessControlKAAccessControl
KAAccessControl
Ā 
Deploying WO on Windows
Deploying WO on WindowsDeploying WO on Windows
Deploying WO on Windows
Ā 
High availability
High availabilityHigh availability
High availability
Ā 
In memory OLAP engine
In memory OLAP engineIn memory OLAP engine
In memory OLAP engine
Ā 

Similar to Framework Principal pattern optimizes resource usage

Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartEric Overfield
Ā 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationJonny Allbut
Ā 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.WO Community
Ā 
Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9PrinceGuru MS
Ā 
WordPress 4.4 and Beyond
WordPress 4.4 and BeyondWordPress 4.4 and Beyond
WordPress 4.4 and BeyondScott Taylor
Ā 
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPTMark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPTMark Wall
Ā 
Drupal 8 - Quick bites
Drupal 8 - Quick  bitesDrupal 8 - Quick  bites
Drupal 8 - Quick bitesBrahampal Singh
Ā 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Hsuan Fu Lien
Ā 
What is an Automation Framework ?
What is an Automation Framework ?�What is an Automation Framework ?�
What is an Automation Framework ?Sriram Angajala
Ā 
All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...
All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...
All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...Eric Overfield
Ā 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Hong Tat Yew
Ā 
Web development with Python
Web development with PythonWeb development with Python
Web development with PythonRaman Balyan
Ā 
Supercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with ReactSupercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with ReactEric Overfield
Ā 
Modern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint OnlineModern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint OnlineDocFluix, LLC
Ā 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsDaniel Stange
Ā 
Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2Eric Overfield
Ā 
Automated PHP delivery with Bamboo @Rakuten ICHIBA
Automated PHP delivery with Bamboo @Rakuten ICHIBAAutomated PHP delivery with Bamboo @Rakuten ICHIBA
Automated PHP delivery with Bamboo @Rakuten ICHIBATakahiro Yamaki
Ā 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer ToolsWO Community
Ā 

Similar to Framework Principal pattern optimizes resource usage (20)

Build Your First SharePoint Framework Webpart
Build Your First SharePoint Framework WebpartBuild Your First SharePoint Framework Webpart
Build Your First SharePoint Framework Webpart
Ā 
WordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow PresentationWordCamp Sheffield 2014 Theme Workflow Presentation
WordCamp Sheffield 2014 Theme Workflow Presentation
Ā 
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Beyond Fluffy Bunny. How I leveraged WebObjects in my lean startup.
Ā 
Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9Phpworks enterprise-php-1227605806710884-9
Phpworks enterprise-php-1227605806710884-9
Ā 
WordPress 4.4 and Beyond
WordPress 4.4 and BeyondWordPress 4.4 and Beyond
WordPress 4.4 and Beyond
Ā 
SpringBoot
SpringBootSpringBoot
SpringBoot
Ā 
F5 Automation - The Journey
F5 Automation - The JourneyF5 Automation - The Journey
F5 Automation - The Journey
Ā 
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPTMark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
Mark Wall - F5 Agility 2017 - F5 Automation The Journey - PPT
Ā 
Drupal 8 - Quick bites
Drupal 8 - Quick  bitesDrupal 8 - Quick  bites
Drupal 8 - Quick bites
Ā 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)
Ā 
What is an Automation Framework ?
What is an Automation Framework ?�What is an Automation Framework ?�
What is an Automation Framework ?
Ā 
All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...
All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...
All You Need to Know for Automated SharePoint Site Provisioning with PnP Powe...
Ā 
Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)Introduction to cypress in Angular (Chinese)
Introduction to cypress in Angular (Chinese)
Ā 
Web development with Python
Web development with PythonWeb development with Python
Web development with Python
Ā 
Supercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with ReactSupercharge Your SharePoint Framework Webpart with React
Supercharge Your SharePoint Framework Webpart with React
Ā 
Modern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint OnlineModern Automated Site Provisioning for SharePoint Online
Modern Automated Site Provisioning for SharePoint Online
Ā 
Setting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce AppsSetting Up CircleCI Workflows for Your Salesforce Apps
Setting Up CircleCI Workflows for Your Salesforce Apps
Ā 
Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2Move past bootstrap and build our lightweight responsive framework w.v1.2
Move past bootstrap and build our lightweight responsive framework w.v1.2
Ā 
Automated PHP delivery with Bamboo @Rakuten ICHIBA
Automated PHP delivery with Bamboo @Rakuten ICHIBAAutomated PHP delivery with Bamboo @Rakuten ICHIBA
Automated PHP delivery with Bamboo @Rakuten ICHIBA
Ā 
WebObjects Developer Tools
WebObjects Developer ToolsWebObjects Developer Tools
WebObjects Developer Tools
Ā 

More from WO Community

Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languagesWO Community
Ā 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerWO Community
Ā 
CMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanCMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanWO Community
Ā 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session StorageWO Community
Ā 
Back2 future
Back2 futureBack2 future
Back2 futureWO Community
Ā 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects OptimizationWO Community
Ā 
Dynamic Elements
Dynamic ElementsDynamic Elements
Dynamic ElementsWO Community
Ā 
Practical ERSync
Practical ERSyncPractical ERSync
Practical ERSyncWO Community
Ā 
ERRest: the Basics
ERRest: the BasicsERRest: the Basics
ERRest: the BasicsWO Community
Ā 

More from WO Community (12)

Localizing your apps for multibyte languages
Localizing your apps for multibyte languagesLocalizing your apps for multibyte languages
Localizing your apps for multibyte languages
Ā 
WOdka
WOdkaWOdka
WOdka
Ā 
ERGroupware
ERGroupwareERGroupware
ERGroupware
Ā 
D2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRollerD2W Branding Using jQuery ThemeRoller
D2W Branding Using jQuery ThemeRoller
Ā 
CMS / BLOG and SnoWOman
CMS / BLOG and SnoWOmanCMS / BLOG and SnoWOman
CMS / BLOG and SnoWOman
Ā 
Using GIT
Using GITUsing GIT
Using GIT
Ā 
Persistent Session Storage
Persistent Session StoragePersistent Session Storage
Persistent Session Storage
Ā 
Back2 future
Back2 futureBack2 future
Back2 future
Ā 
WebObjects Optimization
WebObjects OptimizationWebObjects Optimization
WebObjects Optimization
Ā 
Dynamic Elements
Dynamic ElementsDynamic Elements
Dynamic Elements
Ā 
Practical ERSync
Practical ERSyncPractical ERSync
Practical ERSync
Ā 
ERRest: the Basics
ERRest: the BasicsERRest: the Basics
ERRest: the Basics
Ā 

Recently uploaded

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
Ā 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
Ā 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
Ā 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
Ā 
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...Patryk Bandurski
Ā 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupFlorian Wilhelm
Ā 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
Ā 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo GarcĆ­a Lavilla
Ā 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
Ā 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
Ā 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
Ā 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
Ā 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
Ā 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
Ā 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
Ā 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
Ā 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
Ā 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
Ā 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervƩ Boutemy
Ā 

Recently uploaded (20)

New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Ā 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
Ā 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
Ā 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
Ā 
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Integration and Automation in Practice: CI/CD in MuleĀ Integration and Automat...
Ā 
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project SetupStreamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Ā 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Ā 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
Ā 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
Ā 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
Ā 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
Ā 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
Ā 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
Ā 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
Ā 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Ā 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
Ā 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Ā 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Ā 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
Ā 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
Ā 

Framework Principal pattern optimizes resource usage

  • 1. ā€œFramework Principal" pattern Philippe Rabier - twitter.com/prabier Sophiacom
  • 4. ā€¢What is a Framework Principal? ā€¢ Starter class automatically instantiated, very early ā€¢ Used to initialize your stuffs ā€¢ Independent from the Application ā€¢ @see ERXFrameworkPrincipal
  • 5. What is the goal? Resource optimization!
  • 7. Sandbox environment 1 application Back Ofļ¬ce FTP Server Web Services Job Scheduler In-App Purchase Service Push Notiļ¬cation Service
  • 8. Production environment Back Ofļ¬ce FTP Server Web Services Job Scheduler In-App Purchase Service Push Notiļ¬cation Service 4 applications
  • 9. How to do that? Not rocket science!
  • 10. ā€¢ Make your FP runnable. Change the build.properties like this: principalClass=ca.wowodc.pascal.util.MyFrameworkPrincipal ā€¢ Create an empty Wonder application ā€¢ Add the frameworks to the classpath ā€¢ Choose a rule for your properties ļ¬le names like Properties.staging or Properties.production ā€¢ Set your properties ā€¢ Set the appropriate user name in the WOMonitor conļ¬guration ā€¢ ā€¦et voilĆ ! The Recipe
  • 11. Skeleton of a FP public static boolean serviceMustRun() { return ERXProperties.booleanForKeyWithDefault("myServiceToLaunch", false); } public void finishInitialization() { if (serviceMustRun() ) { // your code ... } } public boolean isServiceRunning() { return a condition; }
  • 12. Skeleton of a Properties ļ¬le #Launch first service firstServiceToLaunch=true #second service is not running secondServiceToLaunch=false
  • 13. WOMonitor conļ¬gs The application will look for Properties.production file The application will look for Properties.sandbox file
  • 14. 2 Strategies ā€¢ Only one application ā€¢ user name is different for each application ā€¢ ex: Properties.scheduler, Properties.backofļ¬ce, ā€¦ ā€¢ Several specialized applications ā€¢ user name is the same for every app like Properties.production ā€¢ applications are different: scheduler.woa, backofļ¬ce.woa, ā€¦
  • 15. Do you know? ā€¢ ERRest can be conļ¬gured in a FP (set up the request handler, the routes, ā€¦) ā€¢ D2W applications could be deļ¬ned in a FP (the ERXNavigationManager loads all navigationMenu.plist in any frameworks, the rules can be anywhere, ā€¦).