Click here to Skip to main content
15,878,748 members
Articles / Web Development / HTML
Article

Extreme Designing

Rate me:
Please Sign up or sign in to vote.
1.70/5 (24 votes)
28 Jan 20054 min read 88.7K   32   25
test the apps design

Introduction

I had attended a session on design and architecture recently. One of the topics of discussion was on how design cannot be implemented strictly during the coding stage and so is it really worth spending too much effort on design. This got me thinking. I come from a civil engineering background where nothing gets done right including the estimate, contract terms and execution unless the design is thorough.

I mean you can’t build a new and complex machine/bridge/railway system without a design in place. Design is where the requirements become tangible. The real weakness is that we don't come out with clear design and the shortcomings usually show up while coding. It should be clear to the developers who have to churn out the code. Just drawing some UML diagrams to explain how issues are handled in generic terms is not enough. 'A picture says a thousand words'. But somebody has to now clearly understand it and write those words to recreate the picture in script, plus some.

So I decided to focus on how best to improve the design phase of software development rather than treat it as a necessary evil.

Background

It's true that, in many projects by the time of coding, there is usually a lot of disparity with the design. This happens mainly because we focus only on providing a high level design but never focus on what the developer needs to achieve the expected output. To solve this issue, what we need to do is put more details into the design and not less. The fine detailing (ask a building architect what this means) should be done.

To achieve a pukka design, the real need would be to find a way to test the design and prove that it implements the application requirements and the coding requirements. After all, we test our code so why not the design too. Perhaps the low level design could be compared against the test cases.

Designing extended

To ensure a more complete design, try some of the following in a suitable sequence:

  • Put in the pseudo code.

    By doing so, the designer is actually trying to implement the design. During this process, shortcomings in the design from the coding point of view could be realized. Even programming bits like class fields, properties, constants, enumerators, helper/private functions to do some specific tasks all could be identified while doing the pseudo code. In fact, during coding stage the developer would mostly write language specific code to implement the pseudo code.

    This means we now have a two stage design process. First, do a high level design to implement the general architecture. So design patterns, identifying domain entities, relationship between domain entities and all the normal design work is done first. Then an experienced developer would take the design further by trying to implement the pseudo code for it. This can be considered as a kind of unit testing.

  • Create a traceability matrix

    Map each requirement/specific rules to our design classes/methods. This will help ensure that most issues have been considered in the design. It will also help identify what was left out. Create flow charts and map each node in the chart to your design elements. Again this could be a two stage process. First, the high level business related flow charts are created and the high level design (abstract classes or interfaces) is mapped to it. Then the lower level flow charts are created and specific concrete classes/methods are mapped to it. This can be thought of as a kind of integration testing.

  • Documentation.

    Yes, this is a cumbersome process but it does clear lot of confusion when writing the code for them. So every class, variable, property, method and event's existence/usage is explained so that the coder knows exactly what to do with it. In this way even developers new to the project could get going without having to know in detail the business process and project specific nuances involved.

  • White box testing

    Explain the classes support the workflow/process to your peers and developers involved in the project. This way the designer gets a better understanding of the developer's expectations.

  • Black box testing

    Have people who haven’t got much information about the project to read your design, explain what they have understood from it and how they would implement it.

  • And last but not least, make sure that the coding does not include anything significant that isn’t reflected in the design.

    The design document should be the only reference for coding. Even usage of other coding components, DLLs that are part of the project must be mentioned in the design by referring to the specific design document.

Bottom line

Of course, to ensure that the code does what it was required to do can only be proved during testing. A test driven development process would ensure that your output is right (it doesn’t ensure that you developed it the right way). To take that further, if test driven code was the best way to do things then why not code driven design, design driven requirements and requirements driven customers.

Changes to requirements and design do happen all the time and have to be accepted (within limits). Use UML to explain the design and put in the pseudo code. And pair designing would give greater value than pair coding.

Email me.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
India India
achievements: underpaid-underrated-confused
status: Comfortably_Numb

Comments and Discussions

 
Question??? Pin
Corneliu Tusnea31-Jan-05 13:38
Corneliu Tusnea31-Jan-05 13:38 
AnswerRe: ??? Pin
Corneliu Tusnea31-Jan-05 13:41
Corneliu Tusnea31-Jan-05 13:41 
GeneralRe: ??? Pin
Colin Angus Mackay31-Jan-05 14:00
Colin Angus Mackay31-Jan-05 14:00 
Generalhinglish Pin
RedSunBeer31-Jan-05 19:11
RedSunBeer31-Jan-05 19:11 
AnswerRe: ??? :confused: Pin
RedSunBeer31-Jan-05 19:09
RedSunBeer31-Jan-05 19:09 
GeneralExperiences with XP Pin
WillemM30-Jan-05 4:03
WillemM30-Jan-05 4:03 
GeneralRe: Experiences with XP Pin
RedSunBeer30-Jan-05 18:14
RedSunBeer30-Jan-05 18:14 
GeneralRe: Experiences with XP Pin
WillemM30-Jan-05 20:18
WillemM30-Jan-05 20:18 
GeneralRe: Experiences with XP Pin
WillemM31-Jan-05 2:51
WillemM31-Jan-05 2:51 
GeneralComments Pin
peterchen29-Jan-05 3:49
peterchen29-Jan-05 3:49 
GeneralRe: Comments Pin
RedSunBeer30-Jan-05 17:28
RedSunBeer30-Jan-05 17:28 
GeneralRe: Comments Pin
peterchen30-Jan-05 23:53
peterchen30-Jan-05 23:53 
GeneralRe: Comments Pin
RedSunBeer31-Jan-05 1:59
RedSunBeer31-Jan-05 1:59 
GeneralOn design... Pin
Anonymous16-Dec-04 5:39
Anonymous16-Dec-04 5:39 
GeneralRe: On design... give the devil his due Pin
RedSunBeer16-Dec-04 17:01
RedSunBeer16-Dec-04 17:01 
GeneralFrom my experience... Pin
Marc Clifton9-Dec-04 0:27
mvaMarc Clifton9-Dec-04 0:27 
GeneralRe: From my experience... Pin
RedSunBeer9-Dec-04 1:06
RedSunBeer9-Dec-04 1:06 
GeneralRe: From my experience... Pin
Kyudos15-Dec-04 0:41
Kyudos15-Dec-04 0:41 
GeneralRe: From my experience... Pin
RedSunBeer15-Dec-04 2:09
RedSunBeer15-Dec-04 2:09 
GeneralRe: From my experience... Pin
Colin Angus Mackay31-Jan-05 14:10
Colin Angus Mackay31-Jan-05 14:10 
RedSunBeer wrote:
I personally believe that design should be flexible enough to accept change while at the same time give clear inputs to the programmer so that they dont create any class or method on their own.

I've worked on a project like this and it is most frustrating. The developer begins to feel that anything that is not perfectly described in the design has to be approved. You begin to wonder why the extra man power was put in place to create a mountain of documentation that is almost at the level of the source code and why not just create the source code in the first place.


RedSunBeer wrote:
This is why I believe a 2 level design process would help satisfy both flexibility while preventing the programmer from extending the design unnecessarily.

Jeez, you must work on some very very relaxed projects if you (or your developers) have time to extend the design unnecessarily.


RedSunBeer wrote:
My main concern is to ensure that the design doesnt end up a being meaningless to the developers

From what I see, the rate of change means that most documentation is useless in a matter of months, and is usually going out of date in a matter of weeks. I'm going with Marc on this one and his idea of a more generic design where the detail can be filled in later.


Do you want to know more?
WDevs.com - Open Source Code Hosting, Blogs, FTP, Mail and Forums


GeneralRe: From my experience... Pin
WillemM30-Jan-05 4:06
WillemM30-Jan-05 4:06 
GeneralReinventing the wheel Pin
mav.northwind8-Dec-04 22:30
mav.northwind8-Dec-04 22:30 
GeneralRe: Reinventing the wheel Pin
RedSunBeer9-Dec-04 1:15
RedSunBeer9-Dec-04 1:15 
GeneralI Strongly agree With the Article Pin
Ashi8-Dec-04 21:48
Ashi8-Dec-04 21:48 
GeneralRe: I Strongly agree With the Article Pin
RedSunBeer9-Dec-04 1:09
RedSunBeer9-Dec-04 1:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.