The benefits of being your own client #1

I spent some time today watching a video from the latest WWDC on using the Model View Controller design pattern in iPhone development – a software design pattern that I have been trying to correctly implement in flash for years now.

I tried, I really did. I would start with a grand class diagram and a beautifully loosely-coupled group of classes… and then I’d end up with application logic in a view, or a bloated controller class, views directly referencing a model, multiple lines of switch and ifs in places that they shouldn’t be, or (worst of all) exceptions thrown in to the empty-catch-black-hole. My beautiful, reusable classes would end up being site-specific monsters that would need be re-written again and again for each project.

While some of this can be attributed to me and my lack of knowledge, an awful lot of this poor design was from expediency  – when developing for the web with a multitude of clients and rapid turnarounds, often the “just make it work” solution was the only solution (or at least, the only solution without pissing off the account manager and giving the studio manager yet another 50 grey hairs). Projects always had a “few” (read 25 to 50) design and or functionality changes that would require either a) a total re-design of a large number of the model, view and controller classes, or b) a whole bunch of hacks to get the project out the door as rapidly as possible. Needless to say, the manager(s) always wanted option b.

Now that I’m working for myself, I’m finding a certain joy in sitting with a  pen and paper and designing. Design is what it looks like. Design is how it works. Design is how it will be built. Slowly. Thoughtfully. Carefully.

Categories

Archives