I hope you are enjoying Ortus Solutions' ContentBox Roadshow so far. We're had one free webinar already, and a few blog posts, with plenty more to come. Today I'm going to talk about modules a little more. I mentioned them in my "What's New with ContentBox" presentation ( you can read more about it and watch the recording here ), but you might not have known, I got excited about ContentBox and all of the modules before the roadshow even started.
Blog
ContentBox - Creating Custom Layouts for you Custom Modules
In our last post on Extending ContentBox 3 with your own Custom Modules we learned that you could build a custom ColdBox Modile with amazingly, just 2 files. You could paste in your legacy spaghetti code right into your default view, and it would work. Of course, we probably want to dress it up a little more, and add some more functionality, so lets look at the layout first.
ContentBox - Extending ContentBox 3 with your Own Custom Modules
In a previous Post, we talked about extending ContentBox easily with modules, and showed you how you could just download a module, activate it and use it in minutes. In this post, we'll look at how to add Modules into your website, by building your own, and how to leverage Module Layouts.
Whether you have used ColdBox before or not, using Modules with ContentBox and ColdBox is fairly straightforward, in fact, I think its a great way to dip your toes into using both technologies. Working with Modules is like everything else in ColdBox, you work with conventions, but you have control. In this previous post, 'Modules Modules everywhere, Extending ContentBox', we show you how there are 4 locations for modules in ContentBox, and depending on how your module will work, you should choose the appropriate location. In this post, we're going to build a custom ColdBox module, which it not managed by ContentBox Admin's Module Manager.
Attention: MessageBox is Now a Module
The beloved MessageBox plugin has been a staple of the ColdBox platform since the beginning. With ColdBox 4.0 it's still available, but if you don't need it, you have the freedom to leave it out.
<...ColdBox 4.0 Removed Plugins
ColdBox Plugins have graduated to become just models. The plugins convention has been removed and all references to plugin injection or DSL's are gone. You must now place all your plugins in your models directory and request them via getInstance() or getModel() calls.
Plugins are an old ColdBox convention but their baggage doesn't really serve a purpose now that we have modules for easy packaging of libraries and WireBox for easy creation of CFCs. Neither of those existed back when Plugins were birthed. It's time to say goodbye to the concept of plugins, but all their functionality will still be here, just with a slightly different (and more standardized) way of creating them.
Module Bundles in ColdBox 4
With the advent of so much more functionality in modules, in ColdBox 4 we added the ability to group modules in a single directory we lovingly call The Module Bundle. This feature became a reality due to a real client's need of being able to logically separate modules into logical buckets. His application had an extensive amount of modules and he wanted to further segregate them, thus module bundles became a reality.
The Storages Module
If you have been following our series here on ColdBox 4.0, you are probably sensing a theme.
Another major change in ColdBox 4.0 was the removal of plugins as a thing. They were just model objects anyway and we had treated them as such within the framework for some time. However, because of that, we needed to do something with some of our various "core" plugins. So sticking with our...
Easily Inject Java into Your ColdBox App
If you've ever worked with jars or raw java in ColdFusion, you will love the JavaLoader module for ColdBox. The JavaLoader module will interface with Mark Mandel's JavaLoader to allow you to do a network class loader, compiler and proxy. You can keep jars with your application's code instead of putting them in ColdFusion classpath, and you can even dynamically compile java co...
The Security Module
Looking to secure your ColdBox application? The Security Module can be your security rules engine for your application. It provides flexible options to rules based security for you to use.
We have often talked about how a module can be either complex or as simple as an interceptor. Our Security Module is basically just an interceptor that gets registered in your application to enforce rules you define. Installing it is easy u...
Hey, where'd my debugger go?
You may be wondering where all that amazing debugging information went in your ColdBox 4.0 application. Have no fear. You can still have your cake and eat it too. We modularized it (sensing a theme in ColdBox 4.0 yet?) So, how do you get all that wonderful debugging info?
Easy! Using CommandBox, run the following command.