SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
Thinking
Modularly
Modern CFML
Brad Wood
@bdw429s
What is a package?
Reusable, self contained, self describing, versioned code, functionality, or
application building blocks.
● A folder
● A box.json file
● Some code
A package could be a single UDF or an entire CMS. What makes it portable is the
agreed format of packaging, distribution, and installation.
What is a module?
A Box module is everything a package is, but with additional conventions and
lifecycle methods defined by ColdBox, ContentBox, CommandBox, etc.
● A folder
● A box.json file
● A ModuleConfig.cfc
● Some code
A Module could be a single interceptor or an entire shopping cart. Box modules are
“active” the framework loads them and they can run custom logic on registration as
well as contribute behaviors or functionality to the base app.
● Forgebox
○ https://www.forgebox.io
● HTTP(S)
○ http://mysite.com/myPackage.zip
● Git
○ git@github.com:bdw429s/commandbox-fusionreactor.git
● GitHub
○ bdw429s/commandbox-fusionreactor
● Local file/folder
○ C:/folder/myPackage.zip
● Jars
○ https://search.maven.org/remotecontent?filepath=org/jline/jline/3.7.0/jline-3.7.0.jar
Installing Packages
● ColdBox modules
○ cborm, cbvalidation, cbmessagebox
● CommandBox modules
○ Fusion-reactor, bullet train, host updater
● Non-box frameworks/CMSs
○ Preside, FW/1, CFWheels
● Total standalone stuff
○ SecurityUtil, BrewPunk API
ForgeBox.io
● Packages can depend on other packages
● Promotes reusability and smaller, single-purpose packages
● cborm
○ cbvalidation
■ Cb18n
● Dev dependencies
○ Only required for developing on the project (like testing frameworks)
○ Don’t want installed on production
○ Use “install --production” to skip
Package Dependencies
CFConfig Example
● Commandbox-cfconfig
○ cfconfig-services
■ lucee-password-util
■ JSONPrettyPrint
■ Adobe-password-util
● propertyFile
■ semver
■ propertyFile
Turn any folder into a package with one CLI command:
package init
Want some hand holding?
package init --wizard
Set additional metadata with:
package set name=”My Package”
Let’s create a package
Scaffold out a new module with one CLI command:
coldbox create module myModule
Let’s take a look at the ModuleConfig.cfc
component {
function configure() {
}
}
Let’s create a module
modules/
These are modules managed by CommandBox. Usually 3rd party. Not committed to
source control.
modules_app/
These are modules that are a core part of your app that you want to be part of the
main source repo. CommandBox doesn’t not manage them.
Box Module Locations
A ForgeBox account is free, easy, and let’s you publish packages and collaborators
forgebox register
Already have a ForgeBox account?
forgebox login
Create a ForgeBox account
● What happens when your code changes?
● You need to increment the version!
● Semantic versioning
○ Major
○ Minor
○ Patch
○ Prerelease Identifier
○ Build ID
Versioning
❏ 5
❏ 3.2
❏ 1.7.8
❏ 1.2.3-alpha
❏ 5.6+0045
❏ 2-beta.3
❏ 1.2.3-rc.4+9876
Semver Ranges
● Give me the latest version that starts with 5
○ 5.x
● Any version greater than 1.0.0 starting with 1.0.1
○ >1.0.0
● Any version between 2.0.0 and 2.5.0 inclusive
○ >=2.0.0 <=2.5.0
○ 2.0.0 - 2.5.0
● Any one of these exact versions
○ 1.0.0 || 2.0.0 || 3.0.0
● Allows 1.2.4 and 1.3, but not 2.0 (same as 1.x.x)
○ ^1.2.3
From the CLI
install coldbox@4.3
install testbox@<=2.6
In your box.json
“dependencies” : {
“coldbox” : “4.3”,
“Testbox” : “<=2.6”
}
Install a Specific Version
Automatically increment version numbers in box.json
● bump --major
● bump --minor
● bump --patch
If package is a Git repo, a tag will be created that matches the version number.
This helps “lock in” the exact commit of this version.
Bump Command
● Arbitrary commands of your choice to run at interception points
● postVersion
● onRelease
● postPublish
● Ties multiple steps together
● Automates repetitive bits
● Boils releasing down to a single command
"scripts" : {
"postVersion":"package set location='Ortus-Solutions/commandbox-cfconfig#v`package version`'",
"onRelease":"publish",
"postPublish":"!git push --follow-tags",
}
Package Scripts
A nice tool for scaffolding box modules complete with tests, Travis-CI builds, and
package scripts.
module scaffold myCoolModule
https://www.forgebox.io/view/cb-module-template
cbModuleTemplate Module
● Your code
● Frameworks
● 3rd party modules
● Your modules
● Git ignores
● box.json
● “Install” command
● --production flag
Building Your Apps

Más contenido relacionado

Similar a Itb2018 thinking modularly

CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...Ortus Solutions, Corp
 
Effectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP ProjectsEffectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP ProjectsAndrew Yatsenko
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at ScaleKris Buytaert
 
A Real ADF Experience Part II
A Real ADF Experience Part IIA Real ADF Experience Part II
A Real ADF Experience Part IIMano Swerts
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentAbid Malik
 
Nh php may 2014 - composer
Nh php   may 2014 - composerNh php   may 2014 - composer
Nh php may 2014 - composerDavid Weingart
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Revelation Technologies
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications Ramakrishna Reddy
 
Create a PHP Library the right way
Create a PHP Library the right wayCreate a PHP Library the right way
Create a PHP Library the right wayChristian Varela
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdfAbid Malik
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow Sebin Benjamin
 
Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]
Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]
Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]Ortus Solutions, Corp
 
Brad Wood 5 command box modules you should be using
Brad Wood   5 command box modules you should be usingBrad Wood   5 command box modules you should be using
Brad Wood 5 command box modules you should be usingOrtus Solutions, Corp
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro ServicesMarcel Offermans
 
New Features Webinar-April
New Features Webinar-AprilNew Features Webinar-April
New Features Webinar-AprilCodefresh
 
Setup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architectureSetup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architectureMindfire Solutions
 
Agile ALM with Traceability: Release of codeBeamer 5.5
Agile ALM with Traceability: Release of codeBeamer 5.5 Agile ALM with Traceability: Release of codeBeamer 5.5
Agile ALM with Traceability: Release of codeBeamer 5.5 Intland Software GmbH
 

Similar a Itb2018 thinking modularly (20)

CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
CBDW2014- Intro to CommandBox; The ColdFusion CLI, Package Manager, and REPL ...
 
Effectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP ProjectsEffectively Reuse the Code Between PHP Projects
Effectively Reuse the Code Between PHP Projects
 
Deploying software at Scale
Deploying software at ScaleDeploying software at Scale
Deploying software at Scale
 
A Real ADF Experience Part II
A Real ADF Experience Part IIA Real ADF Experience Part II
A Real ADF Experience Part II
 
IDE and Toolset For Magento Development
IDE and Toolset For Magento DevelopmentIDE and Toolset For Magento Development
IDE and Toolset For Magento Development
 
Nh php may 2014 - composer
Nh php   may 2014 - composerNh php   may 2014 - composer
Nh php may 2014 - composer
 
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)Version Uncontrolled - How to Manage Your Version Control (whitepaper)
Version Uncontrolled - How to Manage Your Version Control (whitepaper)
 
Build and deploy scientific Python Applications
Build and deploy scientific Python Applications  Build and deploy scientific Python Applications
Build and deploy scientific Python Applications
 
Create a PHP Library the right way
Create a PHP Library the right wayCreate a PHP Library the right way
Create a PHP Library the right way
 
Magento Docker Setup.pdf
Magento Docker Setup.pdfMagento Docker Setup.pdf
Magento Docker Setup.pdf
 
Es build presentation
Es build presentationEs build presentation
Es build presentation
 
Turbo Studio
Turbo StudioTurbo Studio
Turbo Studio
 
Introducing Git and git flow
Introducing Git and git flow Introducing Git and git flow
Introducing Git and git flow
 
Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]
Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]
Brad wood - 5 CommandBox Modules You Should Be Using [Into The Box 2020]
 
Brad Wood 5 command box modules you should be using
Brad Wood   5 command box modules you should be usingBrad Wood   5 command box modules you should be using
Brad Wood 5 command box modules you should be using
 
Modular Architectures using Micro Services
Modular Architectures using Micro ServicesModular Architectures using Micro Services
Modular Architectures using Micro Services
 
New Features Webinar-April
New Features Webinar-AprilNew Features Webinar-April
New Features Webinar-April
 
Readme
ReadmeReadme
Readme
 
Setup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architectureSetup ColdFusion application using fusebox mvc architecture
Setup ColdFusion application using fusebox mvc architecture
 
Agile ALM with Traceability: Release of codeBeamer 5.5
Agile ALM with Traceability: Release of codeBeamer 5.5 Agile ALM with Traceability: Release of codeBeamer 5.5
Agile ALM with Traceability: Release of codeBeamer 5.5
 

Más de Ortus Solutions, Corp

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEOrtus Solutions, Corp
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionOrtus Solutions, Corp
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Ortus Solutions, Corp
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfOrtus Solutions, Corp
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfOrtus Solutions, Corp
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfOrtus Solutions, Corp
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfOrtus Solutions, Corp
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfOrtus Solutions, Corp
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfOrtus Solutions, Corp
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfOrtus Solutions, Corp
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfOrtus Solutions, Corp
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfOrtus Solutions, Corp
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfOrtus Solutions, Corp
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfOrtus Solutions, Corp
 

Más de Ortus Solutions, Corp (20)

BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASEBATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
 
Ortus Government.pdf
Ortus Government.pdfOrtus Government.pdf
Ortus Government.pdf
 
Luis Majano The Battlefield ORM
Luis Majano The Battlefield ORMLuis Majano The Battlefield ORM
Luis Majano The Battlefield ORM
 
Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI Brad Wood - CommandBox CLI
Brad Wood - CommandBox CLI
 
Secure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusionSecure your Secrets and Settings in ColdFusion
Secure your Secrets and Settings in ColdFusion
 
Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023Daniel Garcia ContentBox: CFSummit 2023
Daniel Garcia ContentBox: CFSummit 2023
 
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdfITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
ITB_2023_Human-Friendly_Scheduled_Tasks_Giancarlo_Gomez.pdf
 
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdfITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
ITB_2023_CommandBox_Multi-Server_-_Brad_Wood.pdf
 
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdfITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
ITB_2023_The_Many_Layers_of_OAuth_Keith_Casey_.pdf
 
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdfITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
ITB_2023_Relationships_are_Hard_Data_modeling_with_NoSQL_Curt_Gratz.pdf
 
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdfITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
ITB_2023_Extend_your_contentbox_apps_with_custom_modules_Javier_Quintero.pdf
 
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdfITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
ITB_2023_25_Most_Dangerous_Software_Weaknesses_Pete_Freitag.pdf
 
ITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdfITB_2023_CBWire_v3_Grant_Copley.pdf
ITB_2023_CBWire_v3_Grant_Copley.pdf
 
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdfITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
ITB_2023_Practical_AI_with_OpenAI_-_Grant_Copley_.pdf
 
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdfITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
ITB_2023_When_Your_Applications_Work_As_a_Team_Nathaniel_Francis.pdf
 
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdfITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
ITB_2023_Faster_Apps_That_Wont_Get_Crushed_Brian_Klaas.pdf
 
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdfITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
ITB_2023_Chatgpt_Box_Scott_Steinbeck.pdf
 
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdfITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
ITB_2023_CommandBox_Task_Runners_Brad_Wood.pdf
 
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdfITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
ITB_2023_Create_as_many_web_sites_or_web_apps_as_you_want_George_Murphy.pdf
 
ITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdfITB2023 Developing for Performance - Denard Springle.pdf
ITB2023 Developing for Performance - Denard Springle.pdf
 

Último

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsNanddeep Nachan
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Bhuvaneswari Subramani
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​Elevate Developer Efficiency & build GenAI Application with Amazon Q​
Elevate Developer Efficiency & build GenAI Application with Amazon Q​
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 

Itb2018 thinking modularly

  • 2. What is a package? Reusable, self contained, self describing, versioned code, functionality, or application building blocks. ● A folder ● A box.json file ● Some code A package could be a single UDF or an entire CMS. What makes it portable is the agreed format of packaging, distribution, and installation.
  • 3. What is a module? A Box module is everything a package is, but with additional conventions and lifecycle methods defined by ColdBox, ContentBox, CommandBox, etc. ● A folder ● A box.json file ● A ModuleConfig.cfc ● Some code A Module could be a single interceptor or an entire shopping cart. Box modules are “active” the framework loads them and they can run custom logic on registration as well as contribute behaviors or functionality to the base app.
  • 4. ● Forgebox ○ https://www.forgebox.io ● HTTP(S) ○ http://mysite.com/myPackage.zip ● Git ○ git@github.com:bdw429s/commandbox-fusionreactor.git ● GitHub ○ bdw429s/commandbox-fusionreactor ● Local file/folder ○ C:/folder/myPackage.zip ● Jars ○ https://search.maven.org/remotecontent?filepath=org/jline/jline/3.7.0/jline-3.7.0.jar Installing Packages
  • 5. ● ColdBox modules ○ cborm, cbvalidation, cbmessagebox ● CommandBox modules ○ Fusion-reactor, bullet train, host updater ● Non-box frameworks/CMSs ○ Preside, FW/1, CFWheels ● Total standalone stuff ○ SecurityUtil, BrewPunk API ForgeBox.io
  • 6. ● Packages can depend on other packages ● Promotes reusability and smaller, single-purpose packages ● cborm ○ cbvalidation ■ Cb18n ● Dev dependencies ○ Only required for developing on the project (like testing frameworks) ○ Don’t want installed on production ○ Use “install --production” to skip Package Dependencies
  • 7. CFConfig Example ● Commandbox-cfconfig ○ cfconfig-services ■ lucee-password-util ■ JSONPrettyPrint ■ Adobe-password-util ● propertyFile ■ semver ■ propertyFile
  • 8. Turn any folder into a package with one CLI command: package init Want some hand holding? package init --wizard Set additional metadata with: package set name=”My Package” Let’s create a package
  • 9. Scaffold out a new module with one CLI command: coldbox create module myModule Let’s take a look at the ModuleConfig.cfc component { function configure() { } } Let’s create a module
  • 10. modules/ These are modules managed by CommandBox. Usually 3rd party. Not committed to source control. modules_app/ These are modules that are a core part of your app that you want to be part of the main source repo. CommandBox doesn’t not manage them. Box Module Locations
  • 11. A ForgeBox account is free, easy, and let’s you publish packages and collaborators forgebox register Already have a ForgeBox account? forgebox login Create a ForgeBox account
  • 12. ● What happens when your code changes? ● You need to increment the version! ● Semantic versioning ○ Major ○ Minor ○ Patch ○ Prerelease Identifier ○ Build ID Versioning ❏ 5 ❏ 3.2 ❏ 1.7.8 ❏ 1.2.3-alpha ❏ 5.6+0045 ❏ 2-beta.3 ❏ 1.2.3-rc.4+9876
  • 13. Semver Ranges ● Give me the latest version that starts with 5 ○ 5.x ● Any version greater than 1.0.0 starting with 1.0.1 ○ >1.0.0 ● Any version between 2.0.0 and 2.5.0 inclusive ○ >=2.0.0 <=2.5.0 ○ 2.0.0 - 2.5.0 ● Any one of these exact versions ○ 1.0.0 || 2.0.0 || 3.0.0 ● Allows 1.2.4 and 1.3, but not 2.0 (same as 1.x.x) ○ ^1.2.3
  • 14. From the CLI install coldbox@4.3 install testbox@<=2.6 In your box.json “dependencies” : { “coldbox” : “4.3”, “Testbox” : “<=2.6” } Install a Specific Version
  • 15. Automatically increment version numbers in box.json ● bump --major ● bump --minor ● bump --patch If package is a Git repo, a tag will be created that matches the version number. This helps “lock in” the exact commit of this version. Bump Command
  • 16. ● Arbitrary commands of your choice to run at interception points ● postVersion ● onRelease ● postPublish ● Ties multiple steps together ● Automates repetitive bits ● Boils releasing down to a single command "scripts" : { "postVersion":"package set location='Ortus-Solutions/commandbox-cfconfig#v`package version`'", "onRelease":"publish", "postPublish":"!git push --follow-tags", } Package Scripts
  • 17. A nice tool for scaffolding box modules complete with tests, Travis-CI builds, and package scripts. module scaffold myCoolModule https://www.forgebox.io/view/cb-module-template cbModuleTemplate Module
  • 18. ● Your code ● Frameworks ● 3rd party modules ● Your modules ● Git ignores ● box.json ● “Install” command ● --production flag Building Your Apps