Design/Model Driven Development (DDD) or Test Driven Development (TDD)

“A complex system that works is invariably found to have evolved from a simple system that worked…A complex system designed from scratch never works and cannot be patched up to make it work. You have to start over with a working simple system.” — John Gall in Systemantics: How Systems Really Work and How They Fail

Software is complex, so the point is, how do you organize your system at a high level to be flexible, loosely coupled, and yet highly cohesive? we need to document simple mechanisms that work. Here are certain points to ponder while considering an undertaking like software development on a larger scale –

  • Define a well known software process and then stick to it
  • Provide a common vocabulary and taxonomy for developers and architects.
  • Enable solutions to be described concisely as combinations of patterns.
  • Enable reuse of architecture, design, and implementation decisions.

Selection of the software process is one of the foremost and visionary step in the software engineering and has to be applied wisely and diligently, as its effects may last in the whole software development life cycle and the success of any software is highly dependent on it. During my professional career I have noticed many times that we know some process, say Test driven (TDD) or Agile, is great but we don't know when it is feasible. I am using Model Driven Development and Agile Development for a long time and applied them where needed. I suggest that we should always have some comparative study before adapting any methodology. Here is my take on this broad subject –

Before even go into the details of our subject topic, I'll discuss a little bit about SDLC, Software Engineering and Object Oriented Software Development / Engineering. Software development life cycle (SDLC, SDLC2), also known as “Macro Process” has four phases, the Inception, elaboration,  construction and transition / delivery and if we take the iterative and incremental behavior of the software process the picture of it presented by Grady Booch in his finest book on object oriented design.

 SDLC / Macro Process
[ Courtesy: Book “Object-Oriented Analysis and Design with Applications (Third Edition)” ]

SDLC requires a vision and shall be divided into different phases logically and carefully. These SDLC phases broadly include the followings –

  • Vision – Conceptualization of the software domain;
  • Define – Detailing the requirements along with specification – Use cases;
  • Design – Realization of the Use Cases;
  • Develop – Realization of the design leads to software development / Coding;
  • Test – Enforcing the use cases while Testing.

Here is an abstract view of the software development life cycle (SDLC) –

[ SDLC (Macro Process), Simplified View ]

Proper Software engineering then is applied by putting a well known software process in place, that actually imposes certain rules to accomplish various software development tasks economically and in time. In other words, software project management enforces well known software engineering principles. Now, what we deal in software engineering are requirements, analyze those requirements, detailing different scenarios along with use cases, documenting them, defining proper procedures for design and development of the software, defining testing / QA related issues, software configuration and change management planning etc. And most importantly, software engineering enforces a proper software process or a combination of processes (hybrid process) where needed. The process we are considering here in our discussion is either, it utilizes DDD (design first) or TDD (implementation first) and both will be discussed in the object oriented paradigm. In the Object Oriented Software Development  or Object Oriented Paradigm, when we are analyzing a problem domain or analyzing requirements, actually we are looking for objects / abstractions that will solve some particular problem in the software. First cut objects / abstractions are mare names/nouns and for behavior we look for verbs / actions. Now, how we fill the gaps of how our abstraction will look like, we go deeper in analyzing the requirements, and come up with some handful of use cases, those actually give us an idea of functional aspects of the objects or give us behavioral aspect of them or provides us interfaces, called object contracts. So the outcome of the  use cases are the interfaces, providing us the means of testing the contracts. This practice along with sequence / scenarios leads us to find interactions between objects – where are we heading??? we are into the designing of the solution, I mean we are creating a static design which tells us how the interfaces and then the concrete implementations would look like and what are the interdependencies among those objects. When you look deeper into the model the software patterns would evolve and you will replace some of the interactions with the well known design patterns. Here are the tasks that we accomplished during this phase of Model Driven Approach and all of these tasks are Iterative and Incremental by nature –

  • Analyzing requirements
  • Elaborate requirements - Use case scenarios
  • Building prototype
  • Finding Objects responsible for a particular job.
  • Finding relationships among them.
  • Finding design patterns needed.
  • Elaborate Objects while designing them, and find functionality for them 

If you now look at the bigger picture, you don’t see any need of another process like Test Driven / Agile process, am I right? But hello we are not done yet… With the model in hand, you actually categorize them, that leads to components and then the categorization of components leads you to Domains. So it was bottom up, right, we found the objects, then the components and then the domains... During this categorization process, at some point we realize that some of the areas are new to us. We call them “GREY” areas.  We come across  these grey areas right in the beginning of the objects / components discovery and we might have no idea how they will look like and during componentization and object discovery process, we’ll realize that we might have incomplete picture of the design and it will become much more obvious when we discover the rest of the domains. In the end we mostly have “Green” and some “Grey” Domains; let’s stop here for a while, take a deep breath, we’ll see how to deal with this situation. By Grey we mean no or very little knowledge of the domain or component or object.  When you reach at this point then, Test Driven Development (TDD) Approach becomes feasible for those Grey areas. TDD also known as Agile process or RAD process is both Iterative and Incremental, I call them recursive in nature as the solution is unknown. You only enforce this process when you don’t have enough knowledge or sufficient details about the domain/component/object in hand. In order to get acquaintance about the component, you take baby steps while climbing up the tree, finding more abstractions and their relationships and gain the knowledge of Grey areas or unknowns... Its a bottom up approach too, but this time bottom up for demystifying objects and there relationships and the design then will evolve with time and the Grey areas will eventually become green and you have a better picture in front of you. When you reach at this point, that’s the time to update the Model and back on track with the Model Driven approach. This is really fantastic and you’ll start loving it smiley-smile

  DDD vs TDD [ MDD vs. TDD ]

If you look at the whole scenario that I presented so far, you’ll see that most of the time you will be working in the known or green areas, and so the DDD is feasible to that point and TDD will only be feasible once you have grey areas. So no one process can strictly be followed in a real world. The best approach is, you start with Model Driven Development and that’s how the real world systems are made, that is you develop blueprint / prototype / model of the system first and then go for the development of it. During this development if you find something unknown, give it to the RND team to research on it, and come up with a solution for it until then you don’t stop the development and you move on with the rest. The RND in case of software activity shall take the TDD approach, and you may not be able to estimate the time of completion as TDD is an RND activity and RND projects usually have no time limits or the time of completion is unknown. Remember the software workflow will change altogether, as in TDD you write the test first, while in the DDD you model the design first and then test it later. This is an important factor to remember as they are complete inverse of each other (DDD==MDD==TDDinverse) .  Now, when you are involved in the RND of certain problem domain, you need a greater user experience, because its relatively a new area for you as well as new for others, so getting input of the consumers / actual users makes lot of sense, in that case you come up with user-stories, their roles etc… and then those user stories be further broken down into use-cases and that will help you a lot in defining new interfaces for testing of the new components under development or under test.

That's all folks for now, more on these may be some time later, feeling sleepy, its 2am yaar, cheers smiley-smile

If you enjoyed reading this blog, leave your valuable feedback and consider subscribing to the RSS feed. You can also subscribe to it by email. Also, you can follow me on Twitter. Thank you!

Comments (11) -

Porter Carrahan
6/25/2014 5:25:36 AM #

Cześć, Na wstępie chciałbym podziękować za trud włożony w napisanie artykułu. Pomógł mi niezmiernie i pewne sprawy stały się dla mnie jasne. Szczególnie te zawarte w tym artykule. Na pewno umieszczę link na swoim Facebooku – link pewnie dam o nazwie: , aby moi znajomi się nim zaciekawili. A mam sporo znajomych, którzy interesują się komputerami i wszystkim co z nimi jest związane.

Hunter Soans
6/27/2014 9:21:20 PM #

azithromycin diphenhydramine hcl <a href=";>azithromycin dosages for infants</a> azithromycin diphenhydramine hcl azithromycin diphenhydramine hcl!

Sport information
7/2/2014 8:36:39 AM #

I am unbelievably shocked with your crafting capabilities as perfectly as with the design and style upon your site. Is this a paid out concept or did your self transform it on your own? Both path continue to keep up the good excellent composing, it's scarce in direction of view a Wonderful site which include this one particular Those people times.|

On Sport info
7/2/2014 9:07:52 AM #

Good day! I want towards supply a higher thumbs up for that superior content on your own've below with regards to this posting. I am returning towards your blog site posting in the direction of attain excess shortly.

Sport information
7/5/2014 7:41:21 AM #

Ought to disagree with the remark more than, obtain your information specifically just before writting this kind of a remark.

Brandie Depalma
7/11/2014 8:27:39 PM #

side effects dexamethasone sodium phosphate injection <a href="";>compound dexamethasone acetate cream price</a> dexamethasone steroid diabetes side effects dexamethasone sodium phosphate injection!

Latanya Lobalbo
7/18/2014 1:54:38 PM #

Hi, i feel that i saw you visited my website thus i got here to return the desire?.I'm trying to in finding things to improve my web site!I guess its adequate to use a few of your ideas!!

On Sport information
7/19/2014 10:45:08 AM #


Mac Deppen
7/19/2014 12:50:12 PM #

Calkiem elegancko...

Madge Pap
7/19/2014 1:18:27 PM #

Darmowe kamerki zapraszam.

Curtis Shuffstall
7/19/2014 2:35:32 PM #

Zapraszam na super pokazy

Tosha Salsa
7/19/2014 3:22:03 PM #

"Benachrichtige mich über nachfolgende Kommentare"

Raymond Solton
7/19/2014 3:22:08 PM #

"Powered by !JoomlaComment"

Harmony Bhattacharya
7/19/2014 3:22:22 PM #

"%EB%B9%84%EB%B0%80%EA%B8%80" "%ED%99%88%ED%8E%98%EC%9D%B4%EC%A7%80" "%EC%9D%B4%EB%A6%84/%EB%B9%84%EB%B0%80%EB%B2%88%ED%98%B8%EB%A1%9C+%EA%B8%80%EC%93%B0%EA%B8%B0"

Idalia Teesdale
7/19/2014 3:22:31 PM #

"Podpis:" "E-mail (nie zostanie upubliczniony)" "Strona internetowa" "(wymagane)"

*Youre so cool! I dont suppose Ive read anything like this before. So nice to find somebody with some original thoughts on this subject. realy thank you for starting this up. this website is something that is needed on the web, someone with a little originality. useful job for bringing something new to the internet!

Ivory Cheatem
7/20/2014 8:48:23 AM #


Sindy Rieke
7/20/2014 8:48:23 AM #

"Skriv en kommentar" "Endnu ingen kommentarer."

Soledad Horvers
7/20/2014 8:48:23 AM #

"Din epostadress delas eller publiceras aldrig Obligatoriska f?lt ?r markerade med"

Judie Dallen
7/20/2014 8:48:58 AM #

"powered by pMachine" "Notify me when someone replies to this post"

what google did to me
8/5/2014 1:00:05 PM #

I would like to thnkx for the efforts you've put in writing this website. I'm hoping the same high-grade website post from you in the upcoming as well. Actually your creative writing abilities has encouraged me to get my own web site now. Really the blogging is spreading its wings quickly. Your write up is a great example of it.

Source Webpage
8/5/2014 1:02:32 PM #

Undeniably believe that which you said. Your favorite justification appeared to be on the net the easiest thing to be aware of. I say to you, I definitely get annoyed while people consider worries that they just don't know about. You managed to hit the nail upon the top and also defined out the whole thing without having side effect , people could take a signal. Will probably be back to get more. Thanks

Fidelia Arkadie
8/7/2014 6:24:59 AM #

nitrofurantoin highly bound plasma protein <a href=";>nitrofurantoin highly bound plasma protein</a> nitrofurantoin monohydrate and drinking alcohol furadantin wikipedia!

real racing 3 cheats forums
8/8/2014 2:55:50 AM #

I was just looking for this info for a while. After 6 hours of continuous Googleing, at last I got it in your site. I wonder what's the lack of Google strategy that do not rank this type of informative websites in top of the list. Generally the top web sites are full of garbage.

Jonathan Braddy
8/8/2014 7:28:42 PM #

very well that is beneficial website, lover! i am able to notice your current work for you to, abide by for you BY THE WAY!!!

Rona Hammel
8/13/2014 6:25:40 AM #

I think  this  web site   holds  some really   superb  info  for everyone. "A sense of share is not a bad moral compass." by Colin.

Dovie Sotello
8/13/2014 6:27:42 AM #

I together with my guys were actually taking note of the great things found on your website then suddenly came up with a horrible suspicion I never thanked you for those strategies. All of the men appeared to be totally thrilled to learn all of them and have in effect undoubtedly been making the most of these things. I appreciate you for being simply considerate and for picking some marvelous subject areas millions of individuals are really desperate to learn about. My personal sincere regret for not saying thanks to you earlier.

DEBORA Laurence
8/15/2014 8:17:04 AM # vous propose de créer gratuitement un annuaire de sites internet pour un bon référencement.

8/18/2014 12:16:22 AM #

I simply want to tell you that I am all new to blogging and site-building and absolutely enjoyed your web-site. Almost certainly I’m going to bookmark your blog post . You actually have incredible article content. Regards for sharing with us your website page.

Isaac Shields
8/19/2014 10:11:01 AM #

bactrim celebrex <a href="";>can celebrex make me tired</a> celebrex stomach irritation can celebrex make me tired?

Darrel Soapes
8/19/2014 11:48:59 PM #

cymbalta luvox interaction <a href=";>cymbalta luvox interaction</a> cymbalta headaches side effects take cymbalta in morning or evening?

Colleen Hoops
8/20/2014 11:15:19 AM #

cephalexin capsules made <a href="";>> is keflex a quinolone drug cephalexin route administration?

Damian Sholes
8/21/2014 5:47:58 AM #

buy priligy online <a href=";>> dapoxetine hydrochloride available india dapoxetine herbal!

Add comment