- What exactly is a Module?
- A self contained bundle of code
- Similar idea in other languages
- WP Plugin
- Ruby Gem
- NPM package
- What is ColdBox?
- MVC framework
- Why use Modules?
- Save time by dropping in a module to your app
- Where can I find pre-written Modules
- Creating a new module from existing reusable code in minutes
- Why share your modules as open source code
- Saving timing with Module conventions – module superpowers
- Using Modules outside of ColdBox
- Sharing modules between other frameworks
- Cool API examples
- Fast versioning of APIs with Modules
- API transformations
- API versioning endpoints
- Github API
- 39 amazing modules that Eric has shared on Forgebox
- Testing Modules, augmented testing
- The ColdBox framework viewed as a Module
- What is like being a new CF developer vs a seasoned one
- Why are you proud to use CF?
- WWIT for you to make CF more alive this year?
- What are you looking forward to at CFObjective?
ColdBox Modules are the preferred unit of code reuse in ColdBox applications. ColdBox Modules are extremely powerful and can provide anything from a simple component to a full self-contained api module. This talk will showcase some common module types in ColdBox, provide tools for quickly scaffolding shared modules, investigate testing modules (both with and without an embedded ColdBox application), and sharing your modules with the world.
Mentioned in this episode
- ColdBox module config file
- ColdBox Interceptors
- API versioning
- QB Query Builder
- All of Eric’s modules
- Postmark email module
- cbmodule Template
- Lucee CFML
- Travis Continuous Integration
- “For me participation in CF open source and conferences changed everything about seeing CF as alive vs dying” – Eric
- CF Slack Community
- Introducing ColdBox to a Legacy Application blog post by Brad Wood
(* WWIT = What Would It Take)
Michael: Welcome back to the show. I'm here with Eric Peterson, and he is the module superman. He's written over 40 modules in ForgeBox and he's giving a talk … We're going to be talking today about modules make your projects have superpowers. He's giving a talk cf.Objective in a few weeks, and we're going to be looking at what exactly a module is and why you'd use modules, where you can find pre-written modules, how you can save time with them, and also you don't have to use them with ColdBox. You can use them with other frameworks so he's gonna talk about that. Also, we're gonna look at some of the ways you can use [inaudible 00:00:40], and putting together a query builder with modules, testing, and even how you could view the whole ColdBox framework itself as a module. If we have time we'll look about, because Eric only joined the ColdFusion community a few years ago, but he's been very prolific. So we'll talk about how it's different being a new ColdFusion developer versus a, how should we put this politely, the seasoned ColdFusion developer. So welcome Eric.
Eric: Thank you for having me on Michael, glad to be here.
Michael: Yeah, so what exactly is the module for folks who don't know what it is?
Eric: The easiest way to define the module, is probably to define it in terms in other communities. It's analogous to a Ruby Gem, or a WordPress plugin, or even a MPM package, if you know those languages. It's a self contained bundle of code, that can be reused across different projects, and even different platforms, like the web for ColdBox, or another framework, and even CommandBox on the Command Line.
Michael: Wow, you can even use it from the Command Line?
Eric: You can. I have a couple of examples where I used the same module on my website and in the Command Line with CommandBox.
Michael: And I guess the technical term here is encapsulated. The code is self-contained, doesn't depend on other stuff-
Michael: You can just plug it into your program, and away it goes and does what it's supposed to do.
Michaela Light is the host of the CF Alive Podcast and has interviewed more than 100 ColdFusion experts. In each interview, she asks "What Would It Take to make CF more alive this year?" The answers still inspire her to continue to write and interview new speakers.
Michaela has been programming in ColdFusion for more than 20 years. She founded TeraTech in 1989. The company specializes in ColdFusion application development, security and optimization. She has also founded the CFUnited Conference and runs the annual State of the CF Union Survey.