Create Simple Configuraiton Beans using JSON

The more I use JSON, the more enamoured I am with the simplicity of the format. For configuration settings, JSON can easily be decoded into structures used to populate simple configuration beans. While updating a legacy application to a service oriented, framework driven implementation, I found the need to access default settings in different contexts. In the legacy app, these defaults were set in many list templates to both pre-populate a form and filter a query. My first inclination was to use Mach-II properties to store the config settings, but with many different pages all having some default params, that would become unwieldy. In order to provide access to the default values in both a view and a Mach-II listener, I decided to build a "ConfigurationService" that would serve up event-focused simple configuration beans from a JSON configuration file.

[More]

Use Alias and Apache to Create Custom Mappings

I really love the flexibility Apache gives you when setting up virtual hosts. Another benefit is the Alias directive.

I've worked on a few concepts recently that I want to demo as a sample app. After a few revisions, I finally settled on a folder structure and Alias name setup I felt would secure my component classes and facilitate mappings to frameworks and shared libraries.

[More]

LightWire Configuration Using ColdSpring XML

As a follow-up to Peter Bell's "LightWire or ColdSpring?" entry, I'm happy to announce that LightWire now supports XML configuration using ColdSrping XML bean definitions.

With the current release (0.65), you can set your object dependencies with xml, programatically, or a mix of both. This feature supports recursion, factories and optional default settings...

[More]

LightWire and Lighthouse Pro Application Configuration Example

I see a lot of discussions centered around application configuration and the merits of different implementations. Of these, XML cofiguraiton is the most pervasive. A suggested best practice when using xml config files is to keep them outside of the web root to prevent exposing key settings. After recently installing Raymond Camden's Lighthouse Pro, I learned that you can also obfuscate the xml inside a comment block. To try and understand this clever workaround, I openend the hood (a.k.a Appplicaiton.cfc) and noted that with a very small change in onApplicationStart I could introduce both an IoC/DI container and swap out the xml for a programatic config using Peter Bell's LightWire.

[More]

BlogCFC was created by Raymond Camden. This blog is running version 5.9. Contact Blog Owner