Model on the data not the UI
I found an interesting idea today - this is something which most people do wrong in software. Sometimes we want to display information differently than what we have already shown on the screen - most developers just simple change the UI code directly to change the way it renders on the screen. This may not be the best approach to handle this situation. If the display is complex enough, it might be better to simply create a data structure of the same data, tuned to showing it in the different way. Then you just create the data structure, populate it and rendering it becomes easy. I used a similar technique in another more complex project as well. There data coming from disparate sources had to be shown in a unified manner in a grid. Rather than getting raw data and squeezing it to show the information directly on the screen - I developed a domain model which directly represented the generic model of the disparate data. Then the work of showing this on the UI became significantly...