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

[digg]
“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) –

sdl 
[ 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 (12) -

shavej
2/22/2016 9:07:54 AM #

Computer Course Center in Delhi
Special classes on weekends are reserved only for working professionals, who cannot spend time training on weekdays. Professionals looking to learn new technologies in their fields, will find COSITC to be one of the best institute. Computer Course Center in Delhi
http://www.cositc.com/

ShehlaRashid
2/23/2016 12:47:32 PM #

Last month, a woman who is partially blind was raped by an auto-driver in Thiruvananthapuram in the South Indian state of Kerala.Shehla Rashid Shora Realising that she had difficulty boarding the auto, he took advantage of the situation and drove her to a secluded spot where he raped her. Somehow, when we think of sexual abuse, Shehla Rashid Shora we do not think of the abuse faced by men, women and children with disabilities.
http://shehlarashidjnu.blogspot.in/
=======================================
http://shehlarashidshura.blogspot.in/

Senuke not Opening Jpg
2/23/2016 5:15:41 PM #

I really like your blog.. very nice colors & theme. Did you create this website yourself or did you hire someone to do it for you? Plz reply as I'm looking to create my own blog and would like to know where u got this from. appreciate it

cialis online
3/7/2016 2:38:54 AM #

This is really interesting, You're a very skilled blogger. I've joined your rss feed and look forward to seeking more of your wonderful post. Also, I've shared your web site in my social networks!

getmentalflex.com
4/5/2016 6:13:41 PM #

That particular invention exemplifies how the Japanese view the existence or the need for robots. Additional advantages of the Litter-Robot include a 60 day money back guarantee, an 18 month warranty and it is very easy to maintain. For a particular transformation of a matrix it is multiplied with a transformation matrix to obtain the required transformation.  My web-site -  getmentalflex.com - http://wwwgetmentalflex.com

Hello, I read your  New Brilliance Eye Serum face cream - www.sstmyanmartravels.com/.../546600.html  stuff regularly. Your humoristic style is witty, keep up the good work!

fap videos
5/16/2016 9:46:19 AM #

Quality content is the key to be a focus for the people to pay a visit the website, that's what this web page is providing.

Asking questions are actually good thing if you are not understanding anything totally, but this paragraph presents fastidious understanding yet.

repair manuals
6/2/2016 7:25:12 AM #

Hi there would you mind stating which blog platform you're using? I'm planning to start my own blog soon but I'm having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I'm looking for something unique.                  P.S Apologies for being off-topic but I had to ask!

instagram followers apps apk
6/6/2016 12:48:36 PM #

I almost never drop remarks, however i did some searching and wound up here GeeksCafe.NET | Design/Model Driven Development (DDD) or Test Driven Development (TDD). And I do have 2 questions for you if you tend not to mind. Could it be only me or does it seem like some of the responses look as if they are left by brain dead individuals? :-P And, if you are posting on other online sites, I would like to follow anything fresh you have to post. Would you list of the complete urls of all your public pages like your twitter feed, Facebook page or linkedin profile?  Stop by my page -  instagram followers apps apk - bbs.Dyj.cc/home.php

huawei gr5 kılıfları
6/8/2016 12:17:26 AM #

huawei gr 5 kiliflari  hey there and thank you for your info – I've certainly picked up something new from right here. I did however expertise some technical points using this website, since I experienced to reload the website many times previous to I could get it to load properly. I had been wondering if your web hosting is OK? Not that I'm complaining, but slow loading instances times will often affect your placement in google and can damage your high-quality score if advertising and marketing with Adwords. Anyway I'm adding this RSS to my email and can look out for much more of your respective fascinating content. Ensure that you update this again soon.

msds for cypermethrin
7/11/2016 11:42:51 AM #

Pests such as Fleas, Ticks, and Mosquitoes are out in even larger numbers than ever before. To use, combine the oil with water and store in a spray bottle. And if you see him in your house, just remember that he's there for a good purpose - to kill the roaches that may be hiding deep in the walls of your house - so try to resist the urge to squish.

cypermethrin epa acute Toxicity
7/11/2016 12:15:52 PM #

The following is a list of roach extermination techniques using simple tools. So, be it a termite control in requirement or a dangerous spider lurking around at the people's home, they will always be taken care of by the professionals in the field. Dispose of clutter, lawn trimmings, leaves and yard clippings, as these piles provide a great place for cockroaches to hide.

video marketing liverpool
7/23/2016 5:38:56 PM #

Nice blog here! Also your web site loads up fast! What web host are you using? Can I get your affiliate link to your host? I wish my site loaded up as fast as yours lol

RayCBoderick
8/27/2016 7:09:41 AM #

Excellent post. I had been checking continuously this weblog and I'm inspired! Very helpful information particularly the final part Smile I handle such information much. I was previously seeking this particular info for any very lengthy time. Thanks and better of luck.  My blog post:  RayCBoderick - www.xcdq112.com/.../index.php?page=1&id=191

rolex replica
9/17/2016 7:33:55 AM #

No bulk which way you aggregation it, both the http://www.redwoodfurniture.co.uk President and the Rolex Daytona are amazingly admirable http://www.replicaonlines.me.uk for chafe both on and off the tennis court. Finding the http://www.mmwatches.co.uk of your dreams can be an aboveboard adventure…full of adorable history, discovery, and inspiration!

family
9/17/2016 11:47:25 AM #

Hello to all, how is all, I think every one is getting more from this website, and your views are pleasant in favor of new users.

Add comment