Blog

Curt Gratz

June 29, 2010

Spread the word


Share your thoughts

One of my favorite new features of Coldbox 3.0 is the ability to have a CFC only config file. Thats right, no more XML. No don't get me wrong, XML has its place, but I love the ability to get funky with my config file. With it now being a CFC, I can do some crazy cool stuff.

For example

  1. I can now have my config files all extend a base config file or any other CFC, now thats cool.
  2. I can get creative with defining my enviromental variables, or create any other kind of helper functions.
  3. I can easily set a variable anywhere in the config file and EASILY refer to it.

These are just a few of the ways that I have already taken advantage of the Config.cfc.

What are some ways you have? Feel free to comment with any crazy or funky ideas you've used or plan to use with a fully ColdFusion-ifide (its a word, look it up) config file, I'd love to hear them.

Add Your Comment

(4)

Jun 29, 2010 22:41:08 UTC

by John Farrar

OK... now this makes me curious if it will be easy for me to use COOP and/or CFish with ColdBox now. :)

Jun 29, 2010 22:55:58 UTC

by Doug Boude

I personally was so intrigued with this feature in Coldbox that I dissected it to find out exactly "how" it works and learned a LOT about implementing the decorator pattern in CF in general! I haven't used the config CFC to do anything uber funky, but the freedom it allows to be able to utilize CF functionality directly within one's configuration is priceless! For instance, populating a variable that contains a calculated date, like "X days till Christmas".

Jun 30, 2010 08:46:23 UTC

by Curt Gratz

Doug, I remember reading some posts you did about creating a CFC Config file. They were some good stuff. Oh, and setting configuration settings that change on certain dates, now that is a cool idea. Maybe change up all your Layouts around holidays to be a holiday theme automatically. I could use that.

Jun 30, 2010 10:42:37 UTC

by Luis Majano

WOW! That is really funky, I like that! Get your xmas themes up and ready now! I also use it to instantiate external API's or factories or whatever, then just place them on the cache directly or in the settings structure. You have full control now and I love that!

Recent Entries

ColdBox 7.2.0 Released

ColdBox 7.2.0 Released

ColdBox, a widely used development platform for ColdFusion (CFML), has unveiled version 7.2. Packed with compelling new features, bug fixes, and enhancements, this release is designed to empower developers by boosting productivity, refining scheduled task capabilities, and enhancing the overall reliability and efficiency of application development. This article will delve into the key highlights of ColdBox 7.2 and elucidate how these advancements can positively impact developers in their daily coding endeavors.

Luis Majano
Luis Majano
November 20, 2023
Into the Box 2023 Series on CFCast

Into the Box 2023 Series on CFCast

Excitement is in the air as we unleash the highly anticipated ITB 2023 series exclusively for our valued CFCast subscribers – and the best part? It's FREE for CFCast members! Now is the perfect time if you haven't joined the CFCast community yet. Plus, we've got an incredible End-of-Year deal that's too good to miss

Maria Jose Herrera
Maria Jose Herrera
November 20, 2023
Ortus Deals are Finally Here!

Ortus Deals are Finally Here!

The much-anticipated Ortus End-of-the-Year Sale has arrived, and it's time to elevate your development experience! Whether you're a seasoned developer, a tech enthusiast, or someone on the lookout for top-notch projects, Ortus has something special in store for you. Brace yourself for incredible discounts across a wide array of products and services, including Ortus annual events, books, cutting-edge services, and more.

Maria Jose Herrera
Maria Jose Herrera
November 15, 2023