Saturday, September 16, 2006

Simplicity

Maintainability, continued --

I know a lot of smart people have done a lot of deep thinking about software design patterns, but it really seems to me that levels of abstraction can be way overdone.

When your application has multiple nested methods, all but the last basically calling the next one in the chain to get to the last one that does something -- access a database, or whatever -- you're creating places where there's a possibility, even a likelihood, of "errors and omissions": typos, forgetting to flesh out a stubbed in method, etc. Simply following this sequence to troubleshoot or make changes can be time-consuming. Is deliberate complexity a good thing? My consulting company (Webtuitive Design) tag line is "Simplicity · Balance · Power", so you can probably guess what side of that question I come down on :-)

MVC -- Model/View/Controller -- is a good overall design pattern, but think seriously about how many layers you want to split each of those into, and how that really affects your application's maintainability.