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

Hackers demand a ransom to restore data from my ColdFusion web applications!

Hackers demand a ransom to restore data from my ColdFusion web applications!

Hackers demand a ransom to restore data from my ColdFusion web applications!

Unfortunately, we often hear this message from clients who thought it would never happen to them... until it did. Some believed they could delay the expense of Implementing ColdFusion security best practices for one year, while others were tempted to put it off for just a few months. However, in today's rapidly evolving digital landscape, the security of web applications, including ColdFusio...

Cristobal Escobar
Cristobal Escobar
April 16, 2024
Ortus March Newsletter

Ortus March Newsletter

Welcome to Ortus Solutions’ monthly roundup, where we're thrilled to showcase cutting-edge advancements, product updates, and exciting events! Join us as we delve into the latest innovations shaping the future of technology.

Maria Jose Herrera
Maria Jose Herrera
April 01, 2024
Into the Box 2024 Last Early Bird Days!

Into the Box 2024 Last Early Bird Days!

Time is ticking, with less than 60 days remaining until the excitement of Into the Box 2024 unfolds! Don't let this golden opportunity slip away; our exclusive Early Bird Pricing is here for a limited time only, available until March 31st. Why wait? Secure your seat now and take advantage of this steal!

Maria Jose Herrera
Maria Jose Herrera
March 20, 2024