Is Monkey Patching in Flex Evil?

When googling for solutions to any number of Flex challenges, I commonly find posts that include monkey patching as part of the solution.  Monkey patching is basically replacing a Flex class with your own.  For example, if you want to change something in UIComponent you can create a mx.core.UIComponent in your project, and the Flex compiler will use your class instead of the frameworks class.  So, basically you take the source code from the framework and modify it to meet your needs.

While it is interesting to have this option, its seems like a horrific idea to actually do this on a real enterprise project.  With this sort of solution upgrading the Flex SDK will be painful at best, and impossible at worst.  I think the only time I would ever do this is to get a bug fix into my code before it is available in a release, with the intent to throw away my class once the next release of the SDK is available.

From all the posts out there, it does appear this is a common thing to do in the Flex community.  So, am I missing something here, or is this as evil of an approach as it seems?

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • LinkedIn
  • DZone
  • Facebook
  • Digg
  • del.icio.us
  • Reddit
This entry was posted in Historic. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>