Simberon Design Minute
 

Transform the Problem

I'm doing some work that involves analyzing and manipulating the positioning properties of widgets on a user interface. Although the user interface domain objects technically contain the information I need to perform this analysis, it's inconvenient to use them for that purpose. I need to track some additional information and sometimes I need to make copies that I can play with and throw away. Instead, I've created another model that mimics the real user interface widgets but only focuses on the positioning properties I'm interested in. With this model, I can do much better analysis and try things out without affecting the original widgets. When I'm finished, I can write the results from the transformed model back to the original objects. I sometimes find that when algorithms get tricky, it's useful to transform the problem into one that you can manipulate more easily and transform it back when you're finished.

Download