SlideShare ist ein Scribd-Unternehmen logo
1 von 28
Downloaden Sie, um offline zu lesen
B U I L D I N G W I T H B L O C K S
C O L D B O X M O D U L E S
B Y: C U R T G R A T Z
S O F T WA R E I S A LWAY S B O U N D T O
C H A N G E
G O L D E N R U L E
A S A G O O D D E V E L O P E R W E M U S T P L A N
F O R C H A N G E
G O L D E N R U L E
M O N O L I T H I C A P P L I C AT I O N
• Hard to understand
• Spaghetti code
• Hard to change things
• Challenging to maintain
W H AT I S A M O D U L E
" I N S T R U C T U R E D D E S I G N A N D D ATA - D R I V E N D E S I G N , A
M O D U L E I S A G E N E R I C T E R M U S E D T O D E S C R I B E A N A M E D
A N D A D D R E S S A B L E G R O U P O F P R O G R A M S TAT E M E N T S ”
B Y C R A I G B O RY S O W I C H ( C H I E F T E C H N O L O G Y TA C T I C I A N )
“ A S O F T WA R E M O D U L E I S A D E P L O YA B L E , M A N A G E A B L E ,
N AT I V E LY R E U S A B L E , C O M P O S A B L E , S TAT E L E S S U N I T O F
S O F T WA R E T H AT P R O V I D E S A C O N C I S E I N T E R FA C E T O
C O N S U M E R S . ”
B Y K I R K K N O E R N S C H I L D
M O D U L A R A R C H I T E C T U R E
“ A S A S Y S T E M E V O LV E S , I T ’ S C O M P L E X I T Y W I L L I N C R E A S E
U N L E S S W O R K I S D O N E T O M A I N TA I N O R R E D U C E I T. ”
L E H M A N ’ S 2 N D L AW O F S O F T WA R E E V O L U T I O N
W H AT A R E C O L D B O X M O D U L E S
• Hierarchal MVC
• Self contained subset of a ColdBox Application
• A set of drop-n-play functionality that can be easily added to your
application
• A way to further break down a large application into collections of
related functionality
• A way to bring even more re-usability and extensibility to your
applications
W H Y C O L D B O X M O D U L E S
• Manageability (i.e., small and simple parts that can be easily understood and worked on)
• Independence (i.e., a module can live on its own if necessary and tested outside of its
environments, produces very nice low coupling between core and modules)
• Isolation (i.e., some modules can be completely isolated and decoupled)
• Extensibility (i.e., you can easily extend ANY application by just building on top of the
modular architecture)
• Reusability (i.e., modules have independence and can therefore be shared and reused)
B E N E F I T S O F C O L D B O X M O D U L E S
• Represent separation of concerns
• Creates logical boundaries and encapsulation
• Provide behavior isolation
• Improves maintainability
• Improves reusability
• Improves extensibility
• Modular compositions
S O M E P I T FA L L S O F D E S I G N
•Tension between reuse and maintainability
•Module cohesion
•Too little behavior – Minimal value, provides too little
•Too much behavior – Difficult to reuse
•System Granularity
•Too detailed – Loose reusability
•Too general – Loose cohesiveness
•A Module Composition and interdependencies
C O L D B O X M O D U L E F E AT U R E S
• Small Reusable Parts
• Reload/Unload at runtime
• Include/Exclude from app
• Nice debugging options
• Simple or complex
C O L D B O X M O D U L E F E AT U R E S
• Has its own
• Domain model
• Settings
• SES Routes
• Load/Unload interception points
• Overridable views and layouts based on settings
C O L D B O X 4 + M O D U L E F E AT U R E S
C O L D B O X 4 + M O D U L E F E AT U R E S
• CommandBox CLI management
• Automatically map model objects with @namespace
• Execution alaises
• Improved data/setting retrievals
• Inception
• Bundles
• Dependencies
• Register as CFML mapping
C O L D B O X M O D U L E A N AT O M Y
M O D U L E L I F E C Y C L E
M O D U L E R E G I S T R AT I O N
M O D U L E A C T I VAT I O N
M O D U L E I N T E R C E P T I O N P O I N T S
M O D U L E C O N F I G . C F C
• Simple CFC
• Bootstraps your module
• Must exist in the root of your module folder
• Has public properties
• configure() for configuration
• 2 callback methods: onLoad(), onUnload()
• Tier-detection enabled
• It’s an interceptor too!
M O D U L E C O N F I G . C F C
• The configure() method
• parentSettings
• settings
• conventions
• datasources
• webServices
• The configure() method
• routes
• interceptorSettings
• customInterceptionPoints
• interceptors
• layoutSettings
• wireBox
C O L D B O X M O D U L E F E AT U R E S
• Decorated Variables
• controller: A reference to the current ColdBox controller
• appMapping: The appMapping of the parent application
• moduleMapping: The mapping setting of the module, similar to the
appMapping
• modulePath: The ABSOLUTE path to the module
• log: A pre-configured logBox logger object
• binder: A WireBox binder object
C O L D B O X M O D U L E I N C E P T I O N
D E S I G N PA R A D I G M
• How do you create a more modular architecture
• What is the right granularity of a module
• How do I minimize module dependencies
• How do we compose modules
C O N TA C T I N F O
• Email - gratzc@compknowhow.com
• Blog - http://www.compknowhow.com/blog/
• Twitter - gratzc
• Skype - gratzc
• Snapchat - gratzc
• League of Legends - gratzc
ITB2016 - ColdBox 4 Modules

Weitere ähnliche Inhalte

Andere mochten auch

Sitcom quiz!
Sitcom quiz!Sitcom quiz!
Sitcom quiz!
Burtoni
 

Andere mochten auch (17)

Killing Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORMKilling Shark-Riding Dinosaurs with ORM
Killing Shark-Riding Dinosaurs with ORM
 
Pro forma
Pro formaPro forma
Pro forma
 
Физика и техника.
Физика и техника.Физика и техника.
Физика и техника.
 
Office administrative assistant
Office administrative assistantOffice administrative assistant
Office administrative assistant
 
Administrative executive
Administrative executiveAdministrative executive
Administrative executive
 
CBDW2014 - This is ColdBox 4
CBDW2014 - This is ColdBox 4CBDW2014 - This is ColdBox 4
CBDW2014 - This is ColdBox 4
 
Cf Couchbase 2.0-and-N1-QL
Cf Couchbase 2.0-and-N1-QLCf Couchbase 2.0-and-N1-QL
Cf Couchbase 2.0-and-N1-QL
 
Center for Education on Social Responsibility (CESR) Introduction
Center for Education on Social Responsibility (CESR) IntroductionCenter for Education on Social Responsibility (CESR) Introduction
Center for Education on Social Responsibility (CESR) Introduction
 
Sitcom quiz!
Sitcom quiz!Sitcom quiz!
Sitcom quiz!
 
Ancillary task
Ancillary taskAncillary task
Ancillary task
 
Planning booklet
Planning bookletPlanning booklet
Planning booklet
 
Presentation1
Presentation1Presentation1
Presentation1
 
Latihan 1 Akutansi Dasar Prodi S/I Semester 1 STMIK MIC
Latihan 1 Akutansi Dasar Prodi S/I Semester 1 STMIK MICLatihan 1 Akutansi Dasar Prodi S/I Semester 1 STMIK MIC
Latihan 1 Akutansi Dasar Prodi S/I Semester 1 STMIK MIC
 
Horror
HorrorHorror
Horror
 
Story book
Story bookStory book
Story book
 
ITB2016 -BDD testing and automation from the trenches
ITB2016 -BDD testing and automation from the trenchesITB2016 -BDD testing and automation from the trenches
ITB2016 -BDD testing and automation from the trenches
 
Story Book
Story BookStory Book
Story Book
 

Ähnlich wie ITB2016 - ColdBox 4 Modules

From Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dotsFrom Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dots
Ronald Ashri
 
From Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the DotsFrom Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the Dots
Ronald Ashri
 

Ähnlich wie ITB2016 - ColdBox 4 Modules (20)

From Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dotsFrom Content Strategy to Drupal Site Building - Connecting the dots
From Content Strategy to Drupal Site Building - Connecting the dots
 
From Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the DotsFrom Content Strategy to Drupal Site Building - Connecting the Dots
From Content Strategy to Drupal Site Building - Connecting the Dots
 
High quality Front-End
High quality Front-EndHigh quality Front-End
High quality Front-End
 
Module
ModuleModule
Module
 
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
MongoDB Europe 2016 - Using MongoDB to Build a Fast and Scalable Content Repo...
 
Data Modelling at Scale
Data Modelling at ScaleData Modelling at Scale
Data Modelling at Scale
 
Reduce, Reuse, Refactor
Reduce, Reuse, RefactorReduce, Reuse, Refactor
Reduce, Reuse, Refactor
 
The 12 Factor App
The 12 Factor AppThe 12 Factor App
The 12 Factor App
 
Object Oriented Software Development revision slide
Object Oriented Software Development revision slide Object Oriented Software Development revision slide
Object Oriented Software Development revision slide
 
200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code200,000 Lines Later: Our Journey to Manageable Puppet Code
200,000 Lines Later: Our Journey to Manageable Puppet Code
 
Switching horses midstream - From Waterfall to Agile
Switching horses midstream - From Waterfall to AgileSwitching horses midstream - From Waterfall to Agile
Switching horses midstream - From Waterfall to Agile
 
Architecting your IT career
Architecting your IT careerArchitecting your IT career
Architecting your IT career
 
New Android Languages
New Android LanguagesNew Android Languages
New Android Languages
 
Angular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of SpeedAngular server side rendering with NodeJS - In Pursuit Of Speed
Angular server side rendering with NodeJS - In Pursuit Of Speed
 
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS SummitCanary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
Canary Deployments on Amazon EKS with Istio - SRV305 - Chicago AWS Summit
 
So You Want to Start Refactoring?
So You Want to Start Refactoring?So You Want to Start Refactoring?
So You Want to Start Refactoring?
 
Cassandra Data Modelling with CQL (OSCON 2015)
Cassandra Data Modelling with CQL (OSCON 2015)Cassandra Data Modelling with CQL (OSCON 2015)
Cassandra Data Modelling with CQL (OSCON 2015)
 
Cloudy with a chance of scale
Cloudy with a chance of scaleCloudy with a chance of scale
Cloudy with a chance of scale
 
Using MongoDB to Build a Fast and Scalable Content Repository
Using MongoDB to Build a Fast and Scalable Content RepositoryUsing MongoDB to Build a Fast and Scalable Content Repository
Using MongoDB to Build a Fast and Scalable Content Repository
 
WordPress for the 99%
WordPress for the 99%WordPress for the 99%
WordPress for the 99%
 

Mehr von Ortus Solutions, Corp

Mehr von 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
 

Kürzlich hochgeladen

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 

Kürzlich hochgeladen (20)

A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
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...
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
04-2024-HHUG-Sales-and-Marketing-Alignment.pptx
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
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
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 

ITB2016 - ColdBox 4 Modules

  • 1. B U I L D I N G W I T H B L O C K S C O L D B O X M O D U L E S B Y: C U R T G R A T Z
  • 2.
  • 3. S O F T WA R E I S A LWAY S B O U N D T O C H A N G E G O L D E N R U L E
  • 4. A S A G O O D D E V E L O P E R W E M U S T P L A N F O R C H A N G E G O L D E N R U L E
  • 5. M O N O L I T H I C A P P L I C AT I O N • Hard to understand • Spaghetti code • Hard to change things • Challenging to maintain
  • 6. W H AT I S A M O D U L E " I N S T R U C T U R E D D E S I G N A N D D ATA - D R I V E N D E S I G N , A M O D U L E I S A G E N E R I C T E R M U S E D T O D E S C R I B E A N A M E D A N D A D D R E S S A B L E G R O U P O F P R O G R A M S TAT E M E N T S ” B Y C R A I G B O RY S O W I C H ( C H I E F T E C H N O L O G Y TA C T I C I A N ) “ A S O F T WA R E M O D U L E I S A D E P L O YA B L E , M A N A G E A B L E , N AT I V E LY R E U S A B L E , C O M P O S A B L E , S TAT E L E S S U N I T O F S O F T WA R E T H AT P R O V I D E S A C O N C I S E I N T E R FA C E T O C O N S U M E R S . ” B Y K I R K K N O E R N S C H I L D
  • 7. M O D U L A R A R C H I T E C T U R E “ A S A S Y S T E M E V O LV E S , I T ’ S C O M P L E X I T Y W I L L I N C R E A S E U N L E S S W O R K I S D O N E T O M A I N TA I N O R R E D U C E I T. ” L E H M A N ’ S 2 N D L AW O F S O F T WA R E E V O L U T I O N
  • 8. W H AT A R E C O L D B O X M O D U L E S • Hierarchal MVC • Self contained subset of a ColdBox Application • A set of drop-n-play functionality that can be easily added to your application • A way to further break down a large application into collections of related functionality • A way to bring even more re-usability and extensibility to your applications
  • 9. W H Y C O L D B O X M O D U L E S • Manageability (i.e., small and simple parts that can be easily understood and worked on) • Independence (i.e., a module can live on its own if necessary and tested outside of its environments, produces very nice low coupling between core and modules) • Isolation (i.e., some modules can be completely isolated and decoupled) • Extensibility (i.e., you can easily extend ANY application by just building on top of the modular architecture) • Reusability (i.e., modules have independence and can therefore be shared and reused)
  • 10. B E N E F I T S O F C O L D B O X M O D U L E S • Represent separation of concerns • Creates logical boundaries and encapsulation • Provide behavior isolation • Improves maintainability • Improves reusability • Improves extensibility • Modular compositions
  • 11. S O M E P I T FA L L S O F D E S I G N •Tension between reuse and maintainability •Module cohesion •Too little behavior – Minimal value, provides too little •Too much behavior – Difficult to reuse •System Granularity •Too detailed – Loose reusability •Too general – Loose cohesiveness •A Module Composition and interdependencies
  • 12.
  • 13. C O L D B O X M O D U L E F E AT U R E S • Small Reusable Parts • Reload/Unload at runtime • Include/Exclude from app • Nice debugging options • Simple or complex
  • 14. C O L D B O X M O D U L E F E AT U R E S • Has its own • Domain model • Settings • SES Routes • Load/Unload interception points • Overridable views and layouts based on settings
  • 15. C O L D B O X 4 + M O D U L E F E AT U R E S
  • 16. C O L D B O X 4 + M O D U L E F E AT U R E S • CommandBox CLI management • Automatically map model objects with @namespace • Execution alaises • Improved data/setting retrievals • Inception • Bundles • Dependencies • Register as CFML mapping
  • 17. C O L D B O X M O D U L E A N AT O M Y
  • 18. M O D U L E L I F E C Y C L E
  • 19. M O D U L E R E G I S T R AT I O N
  • 20. M O D U L E A C T I VAT I O N
  • 21. M O D U L E I N T E R C E P T I O N P O I N T S
  • 22. M O D U L E C O N F I G . C F C • Simple CFC • Bootstraps your module • Must exist in the root of your module folder • Has public properties • configure() for configuration • 2 callback methods: onLoad(), onUnload() • Tier-detection enabled • It’s an interceptor too!
  • 23. M O D U L E C O N F I G . C F C • The configure() method • parentSettings • settings • conventions • datasources • webServices • The configure() method • routes • interceptorSettings • customInterceptionPoints • interceptors • layoutSettings • wireBox
  • 24. C O L D B O X M O D U L E F E AT U R E S • Decorated Variables • controller: A reference to the current ColdBox controller • appMapping: The appMapping of the parent application • moduleMapping: The mapping setting of the module, similar to the appMapping • modulePath: The ABSOLUTE path to the module • log: A pre-configured logBox logger object • binder: A WireBox binder object
  • 25. C O L D B O X M O D U L E I N C E P T I O N
  • 26. D E S I G N PA R A D I G M • How do you create a more modular architecture • What is the right granularity of a module • How do I minimize module dependencies • How do we compose modules
  • 27. C O N TA C T I N F O • Email - gratzc@compknowhow.com • Blog - http://www.compknowhow.com/blog/ • Twitter - gratzc • Skype - gratzc • Snapchat - gratzc • League of Legends - gratzc