I just wanted to mention a pretty common design pattern that I know a lot of us use, but I thought it might be worth having a reference to this pattern somewhere on the blog.
Often you come across a problem where an application needs to be able to change it’s behavior without reprogramming and where language limitations make it difficult to implement a solution using dynamic programming.
For example, lets say you would like to be able to allow administrators to add, edit and delete the fields displayed within a contact form. That is pretty straightforward. With enough metadata about each field, you can just loop through the field list dynamically and generate the appropriate HTML to display it. But what happens if you’d like client side Javascript and would like to take advantage of cfform’s ability to generate the code?
[More]