<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bryson</id>
	<title>Expertiza_Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.expertiza.ncsu.edu/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Bryson"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Bryson"/>
	<updated>2026-06-26T15:27:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27304</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27304"/>
		<updated>2009-11-17T14:06:53Z</updated>

		<summary type="html">&lt;p&gt;Bryson: More presentation issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle was coined by Robert C. Martin in C++ Report 1996 and states that “The granule of reuse is the granule of release.  Only components that are released through a tracking system can effectively be reused.  This granule is the package.” [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] This principle is one of several principles used in software design and development and is central to how packages should be built.  Before attempting to understand the principle, a look at understanding the proper definition of code reuse is necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Definition of Reuse ==&lt;br /&gt;
&lt;br /&gt;
Code reuse takes on different meanings to different people.  To some, reuse may be the simple idea of cutting code from one module and copying in another.  To others, reuse is copying a compiled class into another project or application.  Both of those examples are in fact undeveloped versions of code reuse.  They are better explained as copying code rather than examples of proper reuse.  Why? Reusable code is better defined as packaged modules capable of being used in multiple applications but having a single residence, owner, and maintainer.  Both the owner and maintainer are entities that may consist of one or multiple people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements for Reuse ==&lt;br /&gt;
&lt;br /&gt;
In order to effectively reuse code, several requirements should be met.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Packages – Dependent classes or modules are placed into a package.  Packages are the foundation for reuse. They provide a place for all dependencies to be grouped and released collectively.  For example, for a Health Insurance Claims Workfile system the following classes can be separated into different packages as shown below: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;table border=&amp;quot;1&amp;quot;&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Patient Information (org.name.patient)&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;&amp;lt;u&amp;gt;&amp;lt;b&amp;gt;Claim Information (org.name.claim)&amp;lt;/b&amp;gt;&amp;lt;/u&amp;gt;&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Patient&amp;lt;/td&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Claim&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Account&amp;lt;/td&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Status&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Policy&amp;lt;/td&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Medium&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Insurance&amp;lt;/td&amp;gt;&amp;lt;td WIDTH=&amp;quot;25%&amp;quot;&amp;gt;Representative&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Since all of the above classes work collectively, it is better to pull them together into one package, like org.name.claimworkfile, so that all of the classes are released as a whole.  There could still be two subpackages of org.name.patient and org.name.claim.  So a possible package structure of the above classes could be: &lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Claim Workfile (org.name.claimworkfile)&amp;lt;/li&amp;gt;&lt;br /&gt;
     &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Patient Information (org.name.patient)&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Patient&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Account&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Policy&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Insurance&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
     &amp;lt;li&amp;gt;Claim Information (org.name.claim)&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Claim&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Status&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Medium&amp;lt;/li&amp;gt;&lt;br /&gt;
          &amp;lt;li&amp;gt;Representative&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/ul&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Release / Source Control – Packages should be placed under the governance of a source control or tracking system.  The control system would manage the release of original packages as well as the enhanced versions.  Each release would have a release or version number associated with it.  Ideally clients or reusers would get notified before a release occurs so that they can plan and prioritize their schedule in order to incorporate the new package release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Documentation – Proper documentation must accompany each release.  Without good release notes it is difficult for the client who uses the package to easily incorporate it into their own application.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefits of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle has several benefits for the client or reuser.  &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Decreased Maintenance [http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] – The client has less code that he must maintain himself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Improved Quality [http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] - Since the client has less code to maintain, focus can be given to that which he does need to keep up.  Also, the client does not have to be the only one to provide enhancements or new features to his application.  As the supplier of the reused code periodically upgrades it, the client can take advantage of those upgrades without having to be the one who changed the code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Automated Builds [http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 [3]] - Clients of reused code should take advantage of the tools that are available to automatically build their application from a storehouse of packages.  That practice frees the developers from the IDE because their applications can be rebuilt outside of the IDE using a tool like ANT.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Robust software [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] – Because the client does not have to develop every feature in his software from scratch, his software can include more features with much less effort or time for including those features.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
Everything that has an advantage typically has a disadvantage.  The same is true for the Reuse/Release Principle.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Dependence on supplier – It is nice to be able to depend on the supplier for enhancements to a particular package of code.  However, for the client it may be inconvenient at times and may possibly become a risk against meeting an implementation deadline.  The client may need a bug fixed or an enhancement made to the reused package before their deliverable can be released.  Yet, they are at the mercy of the supplier’s schedule as to when the update will be complete and ready for release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Pressure from clients – While the clients may have it easier in some regard, the suppliers may not.  They may be placed under pressure and time constraints that are proposed by their clients.  Clients expect for the reused code to be bug free.  Timely upgrades are also expected so that the code is current with trends and technologies.  Suppliers may therefore feel the pressure of those client wishes as they lobby for position in their busy schedules.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.objectmentor.com/resources/articles/granularity.pdf Granularity]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt Object Reuse]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 Object Reuse Within the Enterprise: A Report From the Field]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27302</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27302"/>
		<updated>2009-11-17T13:42:39Z</updated>

		<summary type="html">&lt;p&gt;Bryson: More presentation issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle was coined by Robert C. Martin in C++ Report 1996 and states that “The granule of reuse is the granule of release.  Only components that are released through a tracking system can effectively be reused.  This granule is the package.” [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] This principle is one of several principles used in software design and development and is central to how packages should be built.  Before attempting to understand the principle, a look at understanding the proper definition of code reuse is necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Definition of Reuse ==&lt;br /&gt;
&lt;br /&gt;
Code reuse takes on different meanings to different people.  To some, reuse may be the simple idea of cutting code from one module and copying in another.  To others, reuse is copying a compiled class into another project or application.  Both of those examples are in fact undeveloped versions of code reuse.  They are better explained as copying code rather than examples of proper reuse.  Why? Reusable code is better defined as packaged modules capable of being used in multiple applications but having a single residence, owner, and maintainer.  Both the owner and maintainer are entities that may consist of one or multiple people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements for Reuse ==&lt;br /&gt;
&lt;br /&gt;
In order to effectively reuse code, several requirements should be met.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Packages – Dependent classes or modules are placed into a package.  Packages are the foundation for reuse. They provide a place for all dependencies to be grouped and released collectively.  For example, for a Health Insurance Claims Workfile system the following classes can be separated into different packages as shown below: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Patient Information&amp;lt;/u&amp;gt;				&amp;lt;u&amp;gt;Claim Information&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Patient&amp;amp;nbsp						Claim&amp;lt;br&amp;gt;&lt;br /&gt;
PatientAccount&amp;amp;nbsp					ClaimStatus&amp;lt;br&amp;gt;&lt;br /&gt;
PatientPolicy&amp;amp;nbsp					ClaimMedium&amp;lt;br&amp;gt;&lt;br /&gt;
PatientInsurance&amp;amp;nbsp 				ClaimRepresentative&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
However, since all of the above classes work collectively, it is better to pull them together into one package so that all of the classes are released as a whole.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Release / Source Control – Packages should be placed under the governance of a source control or tracking system.  The control system would manage the release of original packages as well as the enhanced versions.  Each release would have a release or version number associated with it.  Ideally clients or reusers would get notified before a release occurs so that they can plan and prioritize their schedule in order to incorporate the new package release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Documentation – Proper documentation must accompany each release.  Without good release notes it is difficult for the client who uses the package to easily incorporate it into their own application.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefits of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle has several benefits for the client or reuser.  &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Decreased Maintenance [http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] – The client has less code that he must maintain himself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Improved Quality [http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] - Since the client has less code to maintain, focus can be given to that which he does need to keep up.  Also, the client does not have to be the only one to provide enhancements or new features to his application.  As the supplier of the reused code periodically upgrades it, the client can take advantage of those upgrades without having to be the one who changed the code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Automated Builds [http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 [3]] - Clients of reused code should take advantage of the tools that are available to automatically build their application from a storehouse of packages.  That practice frees the developers from the IDE because their applications can be rebuilt outside of the IDE using a tool like ANT.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Robust software [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] – Because the client does not have to develop every feature in his software from scratch, his software can include more features with much less effort or time for including those features.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
Everything that has an advantage typically has a disadvantage.  The same is true for the Reuse/Release Principle.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Dependence on supplier – It is nice to be able to depend on the supplier for enhancements to a particular package of code.  However, for the client it may be inconvenient at times and may possibly become a risk against meeting an implementation deadline.  The client may need a bug fixed or an enhancement made to the reused package before their deliverable can be released.  Yet, they are at the mercy of the supplier’s schedule as to when the update will be complete and ready for release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Pressure from clients – While the clients may have it easier in some regard, the suppliers may not.  They may be placed under pressure and time constraints that are proposed by their clients.  Clients expect for the reused code to be bug free.  Timely upgrades are also expected so that the code is current with trends and technologies.  Suppliers may therefore feel the pressure of those client wishes as they lobby for position in their busy schedules.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.objectmentor.com/resources/articles/granularity.pdf Granularity]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt Object Reuse]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 Object Reuse Within the Enterprise: A Report From the Field]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27301</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27301"/>
		<updated>2009-11-17T13:37:30Z</updated>

		<summary type="html">&lt;p&gt;Bryson: Fixing presentation issues&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle was coined by Robert C. Martin in C++ Report 1996 and states that “The granule of reuse is the granule of release.  Only components that are released through a tracking system can effectively be reused.  This granule is the package.” [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] This principle is one of several principles used in software design and development and is central to how packages should be built.  Before attempting to understand the principle, a look at understanding the proper definition of code reuse is necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Definition of Reuse ==&lt;br /&gt;
&lt;br /&gt;
Code reuse takes on different meanings to different people.  To some, reuse may be the simple idea of cutting code from one module and copying in another.  To others, reuse is copying a compiled class into another project or application.  Both of those examples are in fact undeveloped versions of code reuse.  They are better explained as copying code rather than examples of proper reuse.  Why? Reusable code is better defined as packaged modules capable of being used in multiple applications but having a single residence, owner, and maintainer.  Both the owner and maintainer are entities that may consist of one or multiple people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements for Reuse ==&lt;br /&gt;
&lt;br /&gt;
In order to effectively reuse code, several requirements should be met.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Packages – Dependent classes or modules are placed into a package.  Packages are the foundation for reuse. They provide a place for all dependencies to be grouped and released collectively.  For example, for a Health Insurance Claims Workfile system the following classes can be separated into different packages as shown below: &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;u&amp;gt;Patient Information&amp;lt;/u&amp;gt;				&amp;lt;u&amp;gt;Claim Information&amp;lt;/u&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Patient						Claim&amp;lt;br&amp;gt;&lt;br /&gt;
PatientAccount					ClaimStatus&amp;lt;br&amp;gt;&lt;br /&gt;
PatientPolicy					ClaimMedium&amp;lt;br&amp;gt;&lt;br /&gt;
PatientInsurance 				ClaimRepresentative&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
However, since all of the above classes work collectively, it is better to pull them together into one package so that all of the classes are released as a whole.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Release / Source Control – Packages should be placed under the governance of a source control or tracking system.  The control system would manage the release of original packages as well as the enhanced versions.  Each release would have a release or version number associated with it.  Ideally clients or reusers would get notified before a release occurs so that they can plan and prioritize their schedule in order to incorporate the new package release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Documentation – Proper documentation must accompany each release.  Without good release notes it is difficult for the client who uses the package to easily incorporate it into their own application.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefits of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle has several benefits for the client or reuser.  &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Decreased Maintenance [http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] – The client has less code that he must maintain himself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Improved Quality [http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] - Since the client has less code to maintain, focus can be given to that which he does need to keep up.  Also, the client does not have to be the only one to provide enhancements or new features to his application.  As the supplier of the reused code periodically upgrades it, the client can take advantage of those upgrades without having to be the one who changed the code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Automated Builds [http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 [3]] - Clients of reused code should take advantage of the tools that are available to automatically build their application from a storehouse of packages.  That practice frees the developers from the IDE because their applications can be rebuilt outside of the IDE using a tool like ANT.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Robust software [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] – Because the client does not have to develop every feature in his software from scratch, his software can include more features with much less effort or time for including those features.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
Everything that has an advantage typically has a disadvantage.  The same is true for the Reuse/Release Principle.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Dependence on supplier – It is nice to be able to depend on the supplier for enhancements to a particular package of code.  However, for the client it may be inconvenient at times and may possibly become a risk against meeting an implementation deadline.  The client may need a bug fixed or an enhancement made to the reused package before their deliverable can be released.  Yet, they are at the mercy of the supplier’s schedule as to when the update will be complete and ready for release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Pressure from clients – While the clients may have it easier in some regard, the suppliers may not.  They may be placed under pressure and time constraints that are proposed by their clients.  Clients expect for the reused code to be bug free.  Timely upgrades are also expected so that the code is current with trends and technologies.  Suppliers may therefore feel the pressure of those client wishes as they lobby for position in their busy schedules.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.objectmentor.com/resources/articles/granularity.pdf Granularity]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt Object Reuse]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 Object Reuse Within the Enterprise: A Report From the Field]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27300</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27300"/>
		<updated>2009-11-17T13:34:59Z</updated>

		<summary type="html">&lt;p&gt;Bryson: Fixing the links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle was coined by Robert C. Martin in C++ Report 1996 and states that “The granule of reuse is the granule of release.  Only components that are released through a tracking system can effectively be reused.  This granule is the package.” [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] This principle is one of several principles used in software design and development and is central to how packages should be built.  Before attempting to understand the principle, a look at understanding the proper definition of code reuse is necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Definition of Reuse ==&lt;br /&gt;
&lt;br /&gt;
Code reuse takes on different meanings to different people.  To some, reuse may be the simple idea of cutting code from one module and copying in another.  To others, reuse is copying a compiled class into another project or application.  Both of those examples are in fact undeveloped versions of code reuse.  They are better explained as copying code rather than examples of proper reuse.  Why? Reusable code is better defined as packaged modules capable of being used in multiple applications but having a single residence, owner, and maintainer.  Both the owner and maintainer are entities that may consist of one or multiple people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements for Reuse ==&lt;br /&gt;
&lt;br /&gt;
In order to effectively reuse code, several requirements should be met.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Packages – Dependent classes or modules are placed into a package.  Packages are the foundation for reuse. They provide a place for all dependencies to be grouped and released collectively.  For example, for a Health Insurance Claims Workfile system the following classes can be separated into different packages as shown below: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Patient Information&amp;lt;/u&amp;gt;				&amp;lt;u&amp;gt;Claim Information&amp;lt;/u&amp;gt;		&lt;br /&gt;
Patient						Claim&lt;br /&gt;
PatientAccount					ClaimStatus&lt;br /&gt;
PatientPolicy					ClaimMedium&lt;br /&gt;
PatientInsurance 				ClaimRepresentative&lt;br /&gt;
&lt;br /&gt;
However, since all of the above classes work collectively, it is better to pull them together into one package so that all of the classes are released as a whole.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Release / Source Control – Packages should be placed under the governance of a source control or tracking system.  The control system would manage the release of original packages as well as the enhanced versions.  Each release would have a release or version number associated with it.  Ideally clients or reusers would get notified before a release occurs so that they can plan and prioritize their schedule in order to incorporate the new package release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Documentation – Proper documentation must accompany each release.  Without good release notes it is difficult for the client who uses the package to easily incorporate it into their own application.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefits of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle has several benefits for the client or reuser.  &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Decreased Maintenance [downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] – The client has less code that he must maintain himself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Improved Quality [downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt [2]] - Since the client has less code to maintain, focus can be given to that which he does need to keep up.  Also, the client does not have to be the only one to provide enhancements or new features to his application.  As the supplier of the reused code periodically upgrades it, the client can take advantage of those upgrades without having to be the one who changed the code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Automated Builds [http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 [3]] - Clients of reused code should take advantage of the tools that are available to automatically build their application from a storehouse of packages.  That practice frees the developers from the IDE because their applications can be rebuilt outside of the IDE using a tool like ANT.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Robust software [http://www.objectmentor.com/resources/articles/granularity.pdf [1]] – Because the client does not have to develop every feature in his software from scratch, his software can include more features with much less effort or time for including those features.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
Everything that has an advantage typically has a disadvantage.  The same is true for the Reuse/Release Principle.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Dependence on supplier – It is nice to be able to depend on the supplier for enhancements to a particular package of code.  However, for the client it may be inconvenient at times and may possibly become a risk against meeting an implementation deadline.  The client may need a bug fixed or an enhancement made to the reused package before their deliverable can be released.  Yet, they are at the mercy of the supplier’s schedule as to when the update will be complete and ready for release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Pressure from clients – While the clients may have it easier in some regard, the suppliers may not.  They may be placed under pressure and time constraints that are proposed by their clients.  Clients expect for the reused code to be bug free.  Timely upgrades are also expected so that the code is current with trends and technologies.  Suppliers may therefore feel the pressure of those client wishes as they lobby for position in their busy schedules.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.objectmentor.com/resources/articles/granularity.pdf Granularity]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt Object Reuse]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905 Object Reuse Within the Enterprise: A Report From the Field]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27296</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 16 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_16_aa&amp;diff=27296"/>
		<updated>2009-11-17T13:27:48Z</updated>

		<summary type="html">&lt;p&gt;Bryson: Initial entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle was coined by Robert C. Martin in C++ Report 1996 and states that “The granule of reuse is the granule of release.  Only components that are released through a tracking system can effectively be reused.  This granule is the package.” [[1] http://www.objectmentor.com/resources/articles/granularity.pdf] This principle is one of several principles used in software design and development and is central to how packages should be built.  Before attempting to understand the principle, a look at understanding the proper definition of code reuse is necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Definition of Reuse ==&lt;br /&gt;
&lt;br /&gt;
Code reuse takes on different meanings to different people.  To some, reuse may be the simple idea of cutting code from one module and copying in another.  To others, reuse is copying a compiled class into another project or application.  Both of those examples are in fact undeveloped versions of code reuse.  They are better explained as copying code rather than examples of proper reuse.  Why? Reusable code is better defined as packaged modules capable of being used in multiple applications but having a single residence, owner, and maintainer.  Both the owner and maintainer are entities that may consist of one or multiple people.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Requirements for Reuse ==&lt;br /&gt;
&lt;br /&gt;
In order to effectively reuse code, several requirements should be met.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Packages – Dependent classes or modules are placed into a package.  Packages are the foundation for reuse. They provide a place for all dependencies to be grouped and released collectively.  For example, for a Health Insurance Claims Workfile system the following classes can be separated into different packages as shown below: &amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;u&amp;gt;Patient Information&amp;lt;/u&amp;gt;				&amp;lt;u&amp;gt;Claim Information&amp;lt;/u&amp;gt;		&lt;br /&gt;
Patient						Claim&lt;br /&gt;
PatientAccount					ClaimStatus&lt;br /&gt;
PatientPolicy					ClaimMedium&lt;br /&gt;
PatientInsurance 				ClaimRepresentative&lt;br /&gt;
&lt;br /&gt;
However, since all of the above classes work collectively, it is better to pull them together into one package so that all of the classes are released as a whole.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Release / Source Control – Packages should be placed under the governance of a source control or tracking system.  The control system would manage the release of original packages as well as the enhanced versions.  Each release would have a release or version number associated with it.  Ideally clients or reusers would get notified before a release occurs so that they can plan and prioritize their schedule in order to incorporate the new package release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Documentation – Proper documentation must accompany each release.  Without good release notes it is difficult for the client who uses the package to easily incorporate it into their own application.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Benefits of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
The Reuse/Release Principle has several benefits for the client or reuser.  &lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Decreased Maintenance [[2] downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt] – The client has less code that he must maintain himself.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Improved Quality [[2] downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt] - Since the client has less code to maintain, focus can be given to that which he does need to keep up.  Also, the client does not have to be the only one to provide enhancements or new features to his application.  As the supplier of the reused code periodically upgrades it, the client can take advantage of those upgrades without having to be the one who changed the code.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Automated Builds [[3] http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905] - Clients of reused code should take advantage of the tools that are available to automatically build their application from a storehouse of packages.  That practice frees the developers from the IDE because their applications can be rebuilt outside of the IDE using a tool like ANT.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Robust software [[1] http://www.objectmentor.com/resources/articles/granularity.pdf] – Because the client does not have to develop every feature in his software from scratch, his software can include more features with much less effort or time for including those features.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of Reuse/Release Principle ==&lt;br /&gt;
&lt;br /&gt;
Everything that has an advantage typically has a disadvantage.  The same is true for the Reuse/Release Principle.&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Dependence on supplier – It is nice to be able to depend on the supplier for enhancements to a particular package of code.  However, for the client it may be inconvenient at times and may possibly become a risk against meeting an implementation deadline.  The client may need a bug fixed or an enhancement made to the reused package before their deliverable can be released.  Yet, they are at the mercy of the supplier’s schedule as to when the update will be complete and ready for release.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;li&amp;gt;Pressure from clients – While the clients may have it easier in some regard, the suppliers may not.  They may be placed under pressure and time constraints that are proposed by their clients.  Clients expect for the reused code to be bug free.  Timely upgrades are also expected so that the code is current with trends and technologies.  Suppliers may therefore feel the pressure of those client wishes as they lobby for position in their busy schedules.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[[Granularity] http://www.objectmentor.com/resources/articles/granularity.pdf]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Object Reuse] downloads.urbancode.com/presentations/reuse/ObjectReuse.ppt]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[[Object Reuse Within the Enterprise: A Report From the Field] http://cmcrossroads.tangram-studio.com/index2.php?option=com_content&amp;amp;do_pdf=1&amp;amp;id=5905]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23962</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23962"/>
		<updated>2009-10-09T15:48:01Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Survey of “Driven Development” Methodologies */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23961</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23961"/>
		<updated>2009-10-09T15:47:38Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Test Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23960</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23960"/>
		<updated>2009-10-09T15:46:53Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Behavior Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23957</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23957"/>
		<updated>2009-10-09T15:46:26Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Model Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23955</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23955"/>
		<updated>2009-10-09T15:46:00Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Domain Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23953</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23953"/>
		<updated>2009-10-09T15:45:37Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Responsibility Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23949</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23949"/>
		<updated>2009-10-09T15:45:14Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Responsibility Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23948</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23948"/>
		<updated>2009-10-09T15:45:04Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Responsibility Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   . . .&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
      account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
      account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   . . .&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23943</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23943"/>
		<updated>2009-10-09T15:43:10Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Domain Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23941</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23941"/>
		<updated>2009-10-09T15:42:30Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Behavior Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23940</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23940"/>
		<updated>2009-10-09T15:41:33Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Test Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23936</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23936"/>
		<updated>2009-10-09T15:40:56Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Model Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.&lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23932</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23932"/>
		<updated>2009-10-09T15:38:44Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Behavior Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&amp;lt;/li&amp;gt;&lt;br /&gt;
      &amp;lt;li&amp;gt;Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&amp;lt;/li&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23926</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23926"/>
		<updated>2009-10-09T15:35:30Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Behavior Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23924</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23924"/>
		<updated>2009-10-09T15:34:21Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Test Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter.  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23922</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23922"/>
		<updated>2009-10-09T15:33:40Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Test Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
   public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23920</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23920"/>
		<updated>2009-10-09T15:32:24Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Test Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
	public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
   public CheckingAccount(float initialAmount) {&lt;br /&gt;
      if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
   public ZeroDepositException(String inMessage) {&lt;br /&gt;
      super(inMessage + “ cannot be zero!”);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23917</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23917"/>
		<updated>2009-10-09T15:30:50Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Behavior Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
	public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
	public CheckingAccount(float initialAmount) {&lt;br /&gt;
		if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
	public ZeroDepositException(String inMessage) {&lt;br /&gt;
		super(inMessage + “ cannot be zero!”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited.&lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23916</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23916"/>
		<updated>2009-10-09T15:30:06Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Test Driven Development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
	public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
	public CheckingAccount(float initialAmount) {&lt;br /&gt;
		if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
	public ZeroDepositException(String inMessage) {&lt;br /&gt;
		super(inMessage + “ cannot be zero!”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited. &lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23913</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23913"/>
		<updated>2009-10-09T15:29:12Z</updated>

		<summary type="html">&lt;p&gt;Bryson: Adding links&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  That process is focused on writing [http://en.wikipedia.org/wiki/Unit_test unit tests] first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the [http://en.wikipedia.org/wiki/Unit_test unit tests] [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for [http://en.wikipedia.org/wiki/User_interface UI] code or code that works with databases or certain network configurations [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [http://en.wikipedia.org/wiki/Test_Driven_Development [6]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
All examples in this article will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
	public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
	public CheckingAccount(float initialAmount) {&lt;br /&gt;
		if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
	public ZeroDepositException(String inMessage) {&lt;br /&gt;
		super(inMessage + “ cannot be zero!”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], system behavior is described using “should” statements.  Then, those statements are further defined using the words ''Given'', ''When'', and ''Then''. [http://en.wikipedia.org/wiki/Behavior_Driven_Development [3]]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [http://video.google.com/videoplay?docid=8135690990081075324# [4]]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the [http://en.wikipedia.org/wiki/State_%28computer_science%29 state] of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the [http://en.wikipedia.org/wiki/User_interface UI] is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the [http://en.wikipedia.org/wiki/User_interface UI] and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the [http://en.wikipedia.org/wiki/User_story user story] practices from [http://en.wikipedia.org/wiki/Scrum_%28development%29 Scrum] and Test Driven Development practices from XP.” [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [http://www.code-magazine.com/article.aspx?quickid=0805061 [5]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the ''Given'', ''When'', ''Then'' example given above:&lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the [http://en.wikipedia.org/wiki/User_interface UI] to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited. &lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [http://en.wikipedia.org/wiki/Model-driven_engineering [9]] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language (UML)]:&lt;br /&gt;
&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard [http://en.wikipedia.org/wiki/Object_oriented_design Object Oriented Design].  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design [7]]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [http://www.infoq.com/interviews/eric-evans-ddd-interview [8]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [http://www.methodsandtools.com/archive/archive.php?id=90 [1]]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf [2]]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the [http://en.wikipedia.org/wiki/Software_development_lifecycle software lifecycle], the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  [http://en.wikipedia.org/wiki/Crc_cards CRC] (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
==Links==&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;[http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&amp;lt;/li&amp;gt;&amp;lt;/ol&amp;gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23877</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23877"/>
		<updated>2009-10-09T14:54:27Z</updated>

		<summary type="html">&lt;p&gt;Bryson: Added images&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [4]  That process is focused on writing unit tests first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Loose or low coupling&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;High cohesion&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter. [6]  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [6]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the unit tests [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for UI code or code that works with databases or certain network configurations [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [6]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
All examples in this wiki will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
	public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
	public CheckingAccount(float initialAmount) {&lt;br /&gt;
		if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
	public ZeroDepositException(String inMessage) {&lt;br /&gt;
		super(inMessage + “ cannot be zero!”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [3]  During the design phase of the software lifecycle, system behavior is described using “should” statements.  Then, those statements are further defined using the words Given, When, and Then. [3]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [4]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the state of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the UI is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the UI and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the user story practices from Scrum and Test Driven Development practices from XP.” [5]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [5]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the Given, When, Then example given above:&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the UI to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited. &lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [9] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using Unified Modeling Language (UML):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
**Image**	&lt;br /&gt;
[[Image:UML.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [7]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard Object Oriented Design.  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [7]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD [7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [7]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [8]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [1]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [2] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [2]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
   &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the software lifecycle, the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  CRC (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
**Image**&lt;br /&gt;
[[Image:CRC.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
Links&lt;br /&gt;
1) [http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&lt;br /&gt;
2) [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&lt;br /&gt;
3) [http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&lt;br /&gt;
4) [http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&lt;br /&gt;
5) [http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&lt;br /&gt;
6) [http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&lt;br /&gt;
7) [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&lt;br /&gt;
8) [http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD&lt;br /&gt;
9) [http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:UML.jpg&amp;diff=23876</id>
		<title>File:UML.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:UML.jpg&amp;diff=23876"/>
		<updated>2009-10-09T14:53:35Z</updated>

		<summary type="html">&lt;p&gt;Bryson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CRC.jpg&amp;diff=23875</id>
		<title>File:CRC.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CRC.jpg&amp;diff=23875"/>
		<updated>2009-10-09T14:53:19Z</updated>

		<summary type="html">&lt;p&gt;Bryson: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23874</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 19 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_19_aa&amp;diff=23874"/>
		<updated>2009-10-09T14:52:33Z</updated>

		<summary type="html">&lt;p&gt;Bryson: Initial entry&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Survey of “Driven Development” Methodologies==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
It seems that the discipline of software engineering has been inundated with methodologies with names ending in “driven development” or “driven design”.  Each of the methodologies asserts that it is important for a developer to be driven by a specific concept as he/she designs a software system.  Some of the methodologies are totally new and others simply supply new names to ideas that have been around for years.  None of the methodologies present a perfect way to design code.  Each of them has its own niche in the software community.&lt;br /&gt;
&lt;br /&gt;
In this wiki, we will explore the following subset of the “driven development” methodologies: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Test Driven Development (TDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Behavior Driven Development (BDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Model Driven Development (MDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Domain Driven Development (DDD)&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Responsibility Driven Development (RDD)&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief overview of each methodology is given along with its strengths and weaknesses.  As a conclusion, we will discuss when each methodology should be put into practice.&lt;br /&gt;
&lt;br /&gt;
==Test Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Despite the name, Test Driven Development (TDD) is not about testing.  It is a design process. [4]  That process is focused on writing unit tests first and then writing the application code that will cause the test to pass.  TDD is described using four simple steps:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;ol&amp;gt;&amp;lt;li&amp;gt;Write a test and watch it fail.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Write code that will cause the test to pass.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Rerun the test and watch it succeed.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Repeat.&amp;lt;/li&amp;gt;&amp;lt;ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Loose or low coupling&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;High cohesion&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Virtually bug-free code&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be used in conjunction with all other “driven development” methodologies&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Ensures that all code has a test that validates its correctness which produces an overall trust of the code [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code implementation time is typically shorter. [6]  The tests help to eliminate defects early which will decrease the amount of debugging necessary before implementation. [6]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;More code is required due to the unit tests [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Difficult to use for UI code or code that works with databases or certain network configurations [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests can become a maintenance overhead [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Less quality assurance activities may be put into place based on a false sense of security in the code [6]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Tests may still include gaps or blind spots since the developer that  writes the tests is also writing the code that the tests are working on [6]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
All examples in this wiki will be based on a banking transaction.  A bank is requesting a new application that would allow tellers to create new checking or savings accounts, process a transaction like a withdrawal, or close an account.  &lt;br /&gt;
&lt;br /&gt;
For TDD, the developer may start by writing a test that assumes that an object called CheckingAccount receives a non-zero deposit when it is created.&lt;br /&gt;
&lt;br /&gt;
public class BankAppTest extends TestCase {&lt;br /&gt;
   public void testCheckingAccountInitialDepositNotZero() {&lt;br /&gt;
      try {&lt;br /&gt;
          CheckingAccount checkingAccount = new CheckingAccount(0.00);&lt;br /&gt;
          fail(“Zero dollar initial deposit should throw an exception.”)&lt;br /&gt;
      } catch(ZeroDepositException zde) {&lt;br /&gt;
          //This is the correct action so the test should pass&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
The developer would then run the test and see that it would fail due to the fact that no code has been written for the object CheckingAccount. Next, it is time to write just enough code to cause the test to pass. &lt;br /&gt;
&lt;br /&gt;
public class BankingOnline {&lt;br /&gt;
	public static void main(String args[]){&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class CheckingAccount {&lt;br /&gt;
	public CheckingAccount(float initialAmount) {&lt;br /&gt;
		if (initialAmount &amp;lt;= 0) throw new ZeroDepositException(“Initial Deposit”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
public class ZeroDepositException implements Throwable {&lt;br /&gt;
	public ZeroDepositException(String inMessage) {&lt;br /&gt;
		super(inMessage + “ cannot be zero!”);&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Another run of the test should find that it succeeds.  Repeat the process until all features have been developed.&lt;br /&gt;
&lt;br /&gt;
==Behavior Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development (BDD) is the process of designing software by creating objects that accomplish certain behaviors expected of the system.  “Each element of code provides some aspect of behavior which, in collaboration with the other elements, provides the application behavior.” [3]  During the design phase of the software lifecycle, system behavior is described using “should” statements.  Then, those statements are further defined using the words Given, When, and Then. [3]  For example, &lt;br /&gt;
&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
BDD is basically an extension of Test Driven Development.  Dave Astels says that BDD is “what you are doing already if you are doing Test Driven Development very well.” [4]  BDD redefines some of the terms as well as the focus of TDD in its early adoption.  For example, TDD was focused on writing tests that would verify the state of an object.  BDD should still use TDD because development is still driven by writing “tests” first.  However, the tests should verify that an expected behavior occurred rather than verifying the state of an object after a segment of code has been executed.&lt;br /&gt;
&lt;br /&gt;
BDD takes an outside-in approach to designing a system.  Typically, the UI is the first part of the system that is written.  If the prototypes are accepted as behaving appropriately, then developers move forward to create objects that collaborate with the UI and so on.  Therefore, one system feature is fully developed before continuing to another feature.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;“. . . creates more harmony between the user story practices from Scrum and Test Driven Development practices from XP.” [5]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Increases “. . . fluidity between analysis and design”. [5]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Focuses on behaviors that add value to the business&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Could lead to tight coupling of various objects since one feature is developed at a time.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Back to the banking application . . . we will use the Given, When, Then example given above:&lt;br /&gt;
      '''''Given''''' a checking account,&lt;br /&gt;
      '''''When''''' a customer opens the account,&lt;br /&gt;
      '''''Then''''' the initial deposit should be greater than zero.&lt;br /&gt;
&lt;br /&gt;
The developer would begin by creating the UI to allow the banker to open a new checking account for a customer.  Before any code is written, the UI would be described using “should” statements.&lt;br /&gt;
&lt;br /&gt;
      The banking application should have a main screen with buttons for opening a new account, processing a transaction, and closing an account.&lt;br /&gt;
&lt;br /&gt;
      Clicking the “Create New Account” button should bring up a new screen that will ask the banker what type of account is to be created – checking or savings – as well as the initial deposit for the account.&lt;br /&gt;
&lt;br /&gt;
      Entering zero for the initial deposit should display an error message once the banker exits the initial deposit field.&lt;br /&gt;
&lt;br /&gt;
Software code would be created to accomplish the behavior described by each “should” statement.  A prototype would be presented to the end-user with the purpose of gaining acceptance of the behavior(s) exhibited. &lt;br /&gt;
&lt;br /&gt;
==Model Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Model Driven Development (MDD) is the process of designing a software system where the focus is put on producing models for a given domain.  System specifications are described in the form of models which are developed through extensive communication between the development team and the business experts.  The models are considered effective if both the end-user and the development team can understand them. [9] Objects are then developed based on the models.&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Buy-in from the end-user for the system design is easier to gain because of the work put into having them be able to thoroughly understand the models prior to developing the system&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Design is more thorough because the end-user or business experts as well as system architects are intricately involved in the system design from the ground up.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Helps to reduce risk because areas of risk are discovered early in the development process&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Model development is highly dependent on a specified toolset and typically requires being locked-in to a specific vendor.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;One object often has a relationship with many other objects which create numerous dependencies. &amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
In order to design the banking application we have used thus far, MDD developers would create a set of models that would provide a picture of the system to be created.  That picture could be described graphically or with text.  Here’s an example of one type of model that could be created using Unified Modeling Language (UML):&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
**Image**	&lt;br /&gt;
[[Image:Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Similar to BDD, once the models have been accepted by both developers and business experts, software code would be created to accomplish the behavior described by each model.  &lt;br /&gt;
&lt;br /&gt;
==Domain Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Domain Driven Development (DDD) is the process of designing software by concentrating on thoroughly understanding the domain in which the product will live.  Some example domains are shipping, banking, academia, and health care.  DDD is all about avoiding the problem of having many objects that talk to many other objects which produces a lot of dependencies. [7]  Such a problem is one of the weaknesses of Model Driven Development.   As a matter of fact, DDD is based on MDD in that models are used to design a system.  However, those models are based on an intricate knowledge of the domain or business logic.  So, DDD forces the developer to thoroughly learn the domain and then incorporate it into the code.  That process helps bridge the gap between business experts and developers. The basics of DDD are not much different than what has been used for years in standard Object Oriented Design.  However, one of the major differences is the practice of forming that distinct or ubiquitous language that is shared between business experts and software developers. [7]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;The core model is clean and aides in maintainability of the software [7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Code is test-friendly and goes hand-in-hand with TDD [7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Can be applied to different development languages or platforms [7]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Translations between domain model and infrastructure should not be done by hand and all languages do not have good tools to automate that process [7]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Should not be used on complex legacy systems [8]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again we go back to the banking example . . .  &lt;br /&gt;
&lt;br /&gt;
First, the development team would have conversations with the business experts seeking to fully understand the details of business processes and rules of the bank requesting the software.  Some such rules that may be discovered are as follows: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;A checking account cannot be created without first establishing a savings account.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;A savings account balance cannot ever go below $10.&amp;lt;/li&amp;gt;  &lt;br /&gt;
&amp;lt;li&amp;gt;A savings account withdrawal request would be denied if the balance after the withdrawal was less than $10.&amp;lt;/li&amp;gt;&amp;lt;ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Those domain details would be incorporated into the remaining design of the software system.  They would also drive how the system behaves and the responsibilities managed by each object produced.&lt;br /&gt;
&lt;br /&gt;
==Responsibility Driven Development==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Responsibility Driven Development (RDD) is the process of designing software by developing objects based on their roles and responsibilities in the system.  During the design phase of a system, candidate objects are identified by the concepts mentioned repeatedly.  Most often, those candidate objects will be passive.  Responsibilities are defined by making the candidate objects active. [1]&lt;br /&gt;
&lt;br /&gt;
[[Strengths]]&lt;br /&gt;
&amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Loose_coupling Loose or low coupling] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;[http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 High cohesion]&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Flexible applications that are easily changed when requirements change [2] &amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Intelligent objects that do more than hold data [2]&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Weaknesses]]&lt;br /&gt;
   &amp;lt;ul&amp;gt;&amp;lt;li&amp;gt;Code reuse is not as prevalent since roles and responsibilities are not typically shared among applications.  In contrast, some of the  collaboration objects may be readily reused.&amp;lt;/li&amp;gt;&amp;lt;/ul&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Example]]&lt;br /&gt;
Once again, we will use the example of the banking system.  This time, let’s look at the process of a withdrawal request.&lt;br /&gt;
During the design phase of the software lifecycle, the development team would find candidate objects used to implement a role within the banking application.  One such role would be a withdrawal procedure which could be implemented by the candidate object WithdrawalProcedure.  CRC (Class, Responsibility, Collaboration) cards are used to describe each of the candidates.  There are a few different ways those cards could be structured.  One way is to place the name of the candidate object at the top of the card with a list of responsibilities on the left and a list of collaboration objects on the right.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
**Image**&lt;br /&gt;
[[Image:Example.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once all candidates have been established, the code can be written to implement each candidate.  &lt;br /&gt;
&lt;br /&gt;
public class WithdrawalProcedure {&lt;br /&gt;
   private BankAccount account;&lt;br /&gt;
   ...&lt;br /&gt;
   public WithdrawalProcedure(BankAccount inAccount) {&lt;br /&gt;
        account = inAccount;&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
   public void start(Transaction transaction) {&lt;br /&gt;
	account.process(transaction);&lt;br /&gt;
   }&lt;br /&gt;
   ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== So now what? ==&lt;br /&gt;
--------------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Now that we have supplied an overview of each of the methodologies, we need to look at when it is appropriate to use them.  Test Driven Development can and should be used in combination with all of other the methodologies mentioned above.  It is a solid way of creating a software system that can be trusted once it is released into a production environment.  Domain Driven Development can also be used in combination with all of the other methodologies.  It is always beneficial to thoroughly understand the domain for a given system and then allow those details to drive the way that objects are defined whether that is focused on behavior, models, or responsibilities.  However, Domain Driven Development is not necessarily a good fit when a given system does not contain complex business logic. &lt;br /&gt;
The remaining methodologies do not necessarily have a given situation in which one should be used in place of another. The only methodology that has a situation that would make it less attractive to use is Model Driven Development.  Since MDD is focused on creating models that the end-user or business expert fully understands, it may not be useful to use Model Driven Development for projects where the business expert is not interested in being an intricate part of the development cycle.  Those situations are rare, but they do exist.&lt;br /&gt;
&lt;br /&gt;
Links&lt;br /&gt;
1) [http://www.methodsandtools.com/archive/archive.php?id=90 Responsibility Driven Design with Mock Objects]&lt;br /&gt;
2) [http://www.wirfs-brock.com/PDFs/A_Brief-Tour-of-RDD.pdf A Brief Tour of RDD]&lt;br /&gt;
3) [http://en.wikipedia.org/wiki/Behavior_Driven_Development Wikipedia – Behavior Driven Development]&lt;br /&gt;
4) [http://video.google.com/videoplay?docid=8135690990081075324# Beyond Test Driven Development – Behaviour Driven Development]&lt;br /&gt;
5) [http://www.code-magazine.com/article.aspx?quickid=0805061 Behavior Driven Development]&lt;br /&gt;
6) [http://en.wikipedia.org/wiki/Test_Driven_Development Wikipedia - Test Driven Development]&lt;br /&gt;
7) [http://www.infoq.com/interviews/jimmy-nilsson-domain-driven-design Jimmy Nillson on Domain Driven Design]&lt;br /&gt;
8) [http://www.infoq.com/interviews/eric-evans-ddd-interview Eric Evans on the State of DDD&lt;br /&gt;
9) [http://en.wikipedia.org/wiki/Model-driven_engineering Wikipedia – Model Driven Development]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18672</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18672"/>
		<updated>2009-09-08T12:48:05Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is one way to manage or control revisions of a software package.  Unlike the closely related [http://en.wikipedia.org/wiki/Version_control_system Version Control Systems] (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list below gives a few of those advantages, but is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and branches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as [http://en.wikipedia.org/wiki/Extreme_programming eXtreme] or [http://en.wikipedia.org/wiki/Pair_programming pair programming] can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive but does provide a few disadvantages.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller, disjointed working versions, but not a central one. [[http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ 4]]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products. [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18671</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18671"/>
		<updated>2009-09-08T12:47:52Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is one way to manage or control revisions of a software package.  Unlike the closely related[http://en.wikipedia.org/wiki/Version_control_system Version Control Systems] (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list below gives a few of those advantages, but is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and branches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as [http://en.wikipedia.org/wiki/Extreme_programming eXtreme] or [http://en.wikipedia.org/wiki/Pair_programming pair programming] can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive but does provide a few disadvantages.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller, disjointed working versions, but not a central one. [[http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ 4]]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products. [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18670</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18670"/>
		<updated>2009-09-08T12:46:44Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Advantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list below gives a few of those advantages, but is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and branches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as [http://en.wikipedia.org/wiki/Extreme_programming eXtreme] or [http://en.wikipedia.org/wiki/Pair_programming pair programming] can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive but does provide a few disadvantages.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller, disjointed working versions, but not a central one. [[http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ 4]]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products. [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18669</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18669"/>
		<updated>2009-09-08T12:45:04Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Disadvantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list below gives a few of those advantages, but is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and branches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive but does provide a few disadvantages.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller, disjointed working versions, but not a central one. [[http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ 4]]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products. [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18668</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18668"/>
		<updated>2009-09-08T12:41:19Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Advantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list below gives a few of those advantages, but is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and branches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[[http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ 4]]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18667</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=18667"/>
		<updated>2009-09-08T12:34:04Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[[http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ 4]]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17636</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17636"/>
		<updated>2009-09-05T19:31:46Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Disadvantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[[http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ 4]]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[[http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html 3]]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17635</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17635"/>
		<updated>2009-09-05T19:30:44Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Advantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[[http://en.wikipedia.org/wiki/Distributed_revision_control 1]]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[[http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php 5]]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[[http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf 6]]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17634</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17634"/>
		<updated>2009-09-05T19:27:39Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[[http://en.wikipedia.org/wiki/Revision_control 2]]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17633</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17633"/>
		<updated>2009-09-05T19:25:43Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[2]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17632</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17632"/>
		<updated>2009-09-05T19:25:20Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* External Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[2]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17631</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17631"/>
		<updated>2009-09-05T19:25:03Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Disadvantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[2]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17630</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17630"/>
		<updated>2009-09-05T19:24:54Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Advantages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[2]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17629</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17629"/>
		<updated>2009-09-05T19:24:42Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[2]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17628</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17628"/>
		<updated>2009-09-05T19:24:32Z</updated>

		<summary type="html">&lt;p&gt;Bryson: /* Distributed Version Control */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[2]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17627</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 1 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_1_aa&amp;diff=17627"/>
		<updated>2009-09-05T19:24:00Z</updated>

		<summary type="html">&lt;p&gt;Bryson: Distributed Version Control&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== Distributed Version Control ==&lt;br /&gt;
&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Distributed Version Control (DVC or DVCS) is a one way to manage or control revisions of a software package.  Unlike the closely related Version Control Systems (VCS), DVC utilizes a peer-to-peer approach rather than a client-server approach.[2]  When a developer checks out a project from the main repository, they will have their very own copy or clone of the repository.  This allows the developer to commit many revisions to their repository before committing to the main or centralized repository used by the entire development team.  &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== History ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Revision control is a vital part of software development.  The most widely-used revision control is Version Control Systems such as Subversion or CVS.  However, many developers have noticed inadequacies in current VCS tools.  Such inadequacies include a need to work disconnected or offline and a desire for increased administrative flexibility.  Distributed Version Control overcomes those shortfalls by implementing distributed repositories which are complete with revision history.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Advantages ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
DVC has several advantages over VCS.  This list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	Developers can work offline being able to view the complete revision history and braches.  Commits, rollbacks, and revision diffs are possible without being connected to a network.[5]&lt;br /&gt;
&lt;br /&gt;
2.	Individuals have autonomy as to which revisions are committed to their local repository.  The developers do not have to go through a central point of authority before making a change.[1]&lt;br /&gt;
&lt;br /&gt;
3.	At any time, a developer can get back to specific individual revisions.  This means that if code breaks once the individual revisions have been pushed to the base repository, there is a way to rollback to an individual revision that worked.  This is not typically possible when there is one centralized repository.&lt;br /&gt;
&lt;br /&gt;
4.	Less time is spent figuring out how to undo a merge that caused code to break.  Because of the previously listed advantage, developers can spend more time on functions that are really important rather than playing detective.[5]&lt;br /&gt;
&lt;br /&gt;
5.	The base repository remains more settled.  Again, because of the two previous advantages, the base repository does not get shaken up as often as a centralized repository in a VCS.[6]&lt;br /&gt;
&lt;br /&gt;
6.	Developers using such methods as eXtreme or pair programming can collaborate more freely.  It is easy for a small group of developers to pull revisions from others that is specific to one feature without having to get an entire team’s changes for the complete system.[6]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Disadvantages ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
&lt;br /&gt;
Just as there are several advantages to using Distributed Version Control, there are also disadvantages.  Again, this list is in no way comprehensive.&lt;br /&gt;
&lt;br /&gt;
1.	VCS provides one working version of the software even throughout a maintenance cycle.  DVC has many smaller working versions, but not a central one.[4]&lt;br /&gt;
&lt;br /&gt;
2.	DVC is immature.  Therefore, there are many different groups offering many options but with few standards in place.  [3]&lt;br /&gt;
&lt;br /&gt;
3.	Third party support is not readily available.  This is due to the lack of maturity and rapid changes that are currently happening with the DVC products.[3]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
-----------------------------------------------------------------------------------------------------------------------------------------------------&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Distributed_revision_control Wikipedia: Distributed Revision Control]&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Revision_control Wikipedia: Revision Control]&lt;br /&gt;
3. [http://jam-bazaar.blogspot.com/2007/10/bazaar-vs-subversion.html John Arbash Meinel's Bazaar Blog: Bazaar vs Subversion]&lt;br /&gt;
4. [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ Intro to Distributed Version Control (Illustrated)]&lt;br /&gt;
5. [http://wincent.com/a/about/wincent/weblog/archives/2007/10/why_distributed.php Wincent Colaiuta's weblog: Why distributed version control]&lt;br /&gt;
6. [http://ianclatworthy.files.wordpress.com/2007/10/dvcs-why-and-how3.pdf Distributed Version Control Systems - Why and How]&lt;/div&gt;</summary>
		<author><name>Bryson</name></author>
	</entry>
</feed>