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 (4) -

Hotel Panda
2/22/2015 12:46:01 PM #

wonderful put up, very informative. I ponder why the other experts of this sector do not notice this. You should proceed your writing. I am sure, you've a great readers' base already!

my site  Hotel Panda - www.lgrc.caraga.dilg.gov.ph/index.php

Family Vacations
2/24/2015 10:57:38 AM #

I almost never write remarks, but i did a few searching and wound up here GeeksCafe.NET | Design/Model Driven Development (DDD) or Test Driven Development (TDD). And I actually do have a few questions for you if it's allright. Is it just me or does it appear like a few of these responses come across like they are written by brain dead people? :-P And, if you are posting on additional sites, I would like to follow anything fresh you have to post. Would you make a list of all of your public pages like your twitter feed, Facebook page or linkedin profile?

Look at my homepage  Family Vacations - www.hotel-discount.com/.../

probolan 50
3/5/2015 9:22:00 AM #

You really make it seem so easy with your presentation but I find this matter to be actually something that I think I would never understand. It seems too complex and extremely broad for me. I am looking forward for your next post, I'll try to get the hang of it!

adventure vacations
3/9/2015 11:49:20 AM #

Today, I went to the beach with my children. I found a sea shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed. There was a hermit crab inside and it pinched her ear. She never wants to go back! LoL I know this is totally off topic but I had to tell someone!

Also visit my blog post ...  adventure vacations - www.hotel-discount.com/cheap-hotels-in-portugal/

Mel
3/12/2015 5:25:26 PM #

Hi,

I have gone through your site and found it interesting with respect to content you have posted. However, your site is not fully optimized to get listed in top search results and needs improvement in some areas. Your site must be clearly readable in the eyes of search engine bots which emphasize mostly on Meta Tags, Heading Tags, Body Content, Image Tags, Anchor Text and Links. Therefore, it is necessary to optimize these areas with respect to your targeted keywords or with the keywords you want your audience to reach your site.

I have been providing optimization (SEO Audit) report to webmasters and bloggers like you for quite sometimes. The benefit linked with such website audit reports is endless as you can quickly identify the areas your site lacks and by making slight adjustments you would simply rank higher in search engines and get more traffic.

Grab your SEO Audit report from the link below:
www.fiverr.com/.../give-comprehensive-on-page-seo-audit-report

If you want to ask anything regarding SEO you also contact me anytime.

Regards
Kaytee SEO
https://www.fiverr.com/kaytee_seo

http://hartmandzya.jigsy.com
3/17/2015 10:43:15 PM #

Thanks for your personal marvelous posting! I really enjoyed reading it, you can be a great author. I will ensure that I bookmark your blog and may come back in the future. I want to encourage you to continue your great posts, have a nice holiday weekend!

Gonzalo
3/22/2015 1:54:32 AM #

Thanks  for any other wonderful post. The place else could anyone get that type of information in such a perfect approach of writing? I've a presentation subsequent week, and I'm on the look for such info.

my web blog: Csorex Reviews ( Gonzalo - https://wiki.kastnet.at/5_Hiking_Boot_Critiques )

Alda
4/21/2015 4:15:38 AM #

Its like you read my thoughts! You appear to grasp a lot approximately this, such as you wrote the e-book in it or something. I believe that you just could do with a few % to pressure the message home a bit, but instead of that, that is wonderful blog. An excellent read. I'll certainly be back.

Kandi
5/15/2015 2:14:30 AM #

It is possible to get the desired results by implementing good SEO strategies in a business or institutional website. The best objective of SEO is to buy your webpages noticed. Different businesses have different methods to SEO. While many tend to be focused on regular SEO campaigns, others are happy with periodic SEO campaigns. To keep competitive and profitable, your Off-page optimization expert should work continuously which help you eclipse your competition online.

Here is my webpage: Search Engine Optimization ( Kandi - www.expressbusinessdirectory.com/.../I-Know-SEO-C162865 )

It is not my first time to pay a visit this website, i am browsing this web page dailly and get good data from here daily.

my website: business domain name registration australian ( www.toosfuse.com/ - www.toosfuse.com/ )

Lien
5/27/2015 12:10:42 AM #

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

domain Seo rank
5/27/2015 9:38:56 AM #

I'd like to find out more? I'd love to find out some additional information.

seo for me domains with network
5/27/2015 10:04:19 AM #

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

buying expired domains For seo
5/27/2015 9:03:44 PM #

This design is spectacular! You most certainly know how to keep a reader amused. Between your wit and your videos, I was almost moved to start my own blog (well, almost...HaHa!) Great job. I really loved what you had to say, and more than that, how you presented it. Too cool!

Aretha
5/28/2015 12:35:05 AM #

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 respond as I'm looking to design my own blog and would like to find out where u got this from. thanks a lot

garcinia pure
6/23/2015 11:37:21 PM #

I'd like to find out more? I'd like to find out more details.

My Internet Success Coach
7/3/2015 11:20:18 PM #

Appreciate the recommendation. Will try it out.

Add comment