Category Filtering: 'coldfusion'

Legacy app, meet ColdBox

Category ColdBox, ColdFusion, Refactoring, Tutorials

The term "legacy application" strikes fear in the heart of many a developer, invoking images of spaghetti code, undocumented secret sauce, and evidence of multiple attempts to start some semblance of a paradigm that might have been in the vague direction of a coding standard or convention. Fortunately, there now exists a direct path to bring your legacy out of the cold and into the warm embrace of a modern framework.

ColdBox has seen the need for a migration path for these applications and implemented a feature called Implicit View Dispatch. This means that without having an event handler defined, you can create views, and the events and actions are implicitly created based on folder structure of /views. For example, I can create a view file in the location of views/about/contactUs.cfm, and the corresponding event is implicitly created, permitting the URL to display that view. No handlers, no layouts, no routes. Just views. Pretty slick.

Handling BOMs with JSMin

Category ColdBox, ColdFusion, JSMin, Tips

A fantastic tool for increasing web app efficiency is Luis Majano's JSMin compressor.  It takes your local CSS or JavaScript files, compresses them, and stores them as an aggregated file in your app's cache.  I did run into a bit of trouble with it recently when I ran it on an app's new stack and encountered a bit of a BOM problem.  Here's why the BOM can be a problem and a simple way to fix it.