Removing Event-Handlers Programmatically

In a recent application of mine, I have a large collection of test event-handlers that we use to test certain application functionality (such as javascript).  While very useful for us when developing the application, we do not want to deploy these event-handlers when the application is deployed to our production environment.  So what are the options?

  • Manually comment out the event-handlers when deploying (very messy, error prone, possible security concern if forgotten)
  • Programmatically remove the event-handlers when the application is deployed to a production environment (best solution because a computer does it for us)

I thought it would nice to share this code with other Mach-II users so I wrote up a short wiki entry that demonstrates how we did it. It even includes a working sample code that you can use and shows off some nifty new features in Mach-II Simplicity (1.8), so read Removing Event-Handlers for Security Purposes wiki entry now.  You never know when you'll need this bit of code.

0 Trackbacks  |  Mach-II 1.8, Articles  |  Send
Posted 8/11/09 @ 3:50 PM by Peter J. Farrell