About maintainability and why certain things are easier.....

As (nearly) always, It depends on what you mean.


Suppose I have been given the task of building a fairly simple WinForm applicationt that will be used to filter data for problems, allow the users to 'clear' those problems by either saying they aren't problems, or manually overriding the values they want.

As always, the requirements are vague, but I know the range of what they are now, and what they will be in the future (someone will immediately say, "But you don't know this"....I don't know how to explain this other than to paraphrase the former Secretary of Defense....there are things we know we know, and there are things we know that we don't know, and there are things we don't know that we don't other words, there are requirements clearly defined now, there are requirements that we don't have clearly defined but we know the range of possible definitions, and then there are requirements that are completely out there......for that last category of requirements, this application will never be extended to include them, a different application will be built.  Because that's how they do things, and I know this).

How would I, jdn, prefer to build this application?  Since it's database driven (and really, what isn't), I want OR/M definitely.  I personally prefer Wilson, but it is less well known than nHibernate, which was recently approved by the committee that approves things, so I should go with that (if you understand this last sentence, you already know what my conclusion is).

Should I use TDD?  Well, let's put that aside and say it should at least have as comprehensive a test suite as possible (whether they are written first or second or third....that's often a religious argument).  Absolutely.  Now that I've drunk that kool-aid, I can't imagine not having unit tests for at least core business logic (if not also the ORM layer).

Should I use some variant (at least count, I think there are 147, roughly) of MVP/MVC?  Well, if I really want to ensure maintainability (in one sense), I, jdn, would want this.

Okay, so, TDD-like design, ORM solution, using MVP.  Oh, and talk to the users, preferably before you being coding.

One problem (well, it's really more than one).  I know for a fact that I am going to be handing this application off to other people.  I will not be maintaining it.  I know the people who I will be handing it off to, so I know their skill sets, I know generally how they like to code.

None of them have ever used ORM.

None of them do unit testing.  One knows what they are and for whatever reason hates them.  The others just don't know.

None of them have ever used MVP/MVC, and I doubt any but one has even heard of it.

All of them are intelligent, so could grasp all the concepts readily, and become proficient with them over time.  If they are given time by their bosses, or do the work overtime, or whatever.

There is a 'standard' architecture in place that they have worked with for quite some time.  I personally think it blows, and frankly, so do most of them, but it is familiar, and applications can be passed between developers as they use a common style.

I am not going to have enough time to teach them ORM, MVP/MVC, convince them of the brilliance of unit testing, because I'm leaving.

I submit to you, that my preferred way would very well be less maintainable, by that group of developers in that situation.  I don't know if I would go so far as to say that it would be irresponsible of me to do it my way, and then just toss it over the wall to them as I run out the door.  The jackass in me wants to do it, even if just to force the one guy to have to learn unit testing, because, well, I'm a jackass.

And I submit to you, that in a vast number of cases this is true.

The reason I made the comment about ODS is along similar lines.  Yes, I've used them.  Yes, they make my teeth hurt.  Yes, unless I am forced to, I will probably not use them again ever.

But, by show of hands out there in the community, how many people are familiar with ODS, can use the wizard to connect to their business objects or whatever, and make an application that works?  Or even use, gag, typed datasets, which produce some of the most hideously auto-generated code ever?

Maintainability means more than one thing.

posted on Thursday, June 14, 2007 12:13 PM Print
# re: Maintainability
7/18/2007 9:18 PM
Good ! thank the author.
# re: Maintainability
9/22/2007 2:17 PM
Most popular soft for youtube video.

Post Comment

Title *
Name *
Comment *  
Please add 4 and 6 and type the answer here: