<?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=Srstarr</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=Srstarr"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Srstarr"/>
	<updated>2026-06-05T05:47:23Z</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_2010/ch6_6e_sc&amp;diff=42753</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=42753"/>
		<updated>2010-11-27T01:53:41Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the [http://en.wikipedia.org/wiki/Extreme_programming_practices extreme programming (XP) twelve core practices]. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  &lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the [http://en.wikipedia.org/wiki/Software_development_process software development life cycle].  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
=== Good Example ===&lt;br /&gt;
A development team utilizes a source repository where all modified code is checked in as modules are written.  On check-in, an automated build process executes and then notifies the team of the status of the build by email.&lt;br /&gt;
&lt;br /&gt;
=== Bad Example ===&lt;br /&gt;
In my opinion, if you follow all the essential concepts of continuous integration as outlined above, you should not have a bad example.  Even if one person is doing all the development, by checking in the code often and running automated builds against that code, problems and errors will surface quickly.  Problems will arise when you have a rogue programmer who does not follow the integration rules or if you omit any of the essential concepts.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=42752</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=42752"/>
		<updated>2010-11-27T01:50:41Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the [http://en.wikipedia.org/wiki/Extreme_programming_practices extreme programming (XP) twelve core practices]. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  &lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the [http://en.wikipedia.org/wiki/Software_development_process software development life cycle].  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
=== Good Example ===&lt;br /&gt;
A development team utilizes a source repository where all modified code is checked in as modules are written.  On check-in, an automated build process executes and then notifies the team of the status of the build by email.&lt;br /&gt;
&lt;br /&gt;
=== Bad Example ===&lt;br /&gt;
In my opinion, if you follow all the essential concepts of continuous integration as outlined above, you should not have a bad example.  Even if one person is doing all the development, by checking in the code often and running automated builds against that code, problems and errors will surface quickly.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=42751</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=42751"/>
		<updated>2010-11-27T01:43:42Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the [http://en.wikipedia.org/wiki/Extreme_programming_practices extreme programming (XP) twelve core practices]. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  &lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the [http://en.wikipedia.org/wiki/Software_development_process software development life cycle].  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=42750</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=42750"/>
		<updated>2010-11-27T01:41:42Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  &lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
[http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the [http://en.wikipedia.org/wiki/Software_development_process software development life cycle].  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41845</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41845"/>
		<updated>2010-11-18T03:09:58Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the [http://en.wikipedia.org/wiki/Software_development_process software development life cycle].  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41844</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41844"/>
		<updated>2010-11-18T03:05:40Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the software development life cycle.  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41843</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41843"/>
		<updated>2010-11-18T03:03:35Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Pros and Cons ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the software development life cycle.  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41842</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41842"/>
		<updated>2010-11-18T03:02:12Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Popular vs. Cumbersome ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Popular Vs. Cumbersome ===&lt;br /&gt;
Continuous integration is a popular and important aspect of the Agile and XP methodologies.  Many shops are moving toward adopting these design principles and look at continuous integration as one of the most rewarding perks of the methodologies.  It can greatly increase time saving during all aspects of the software development life cycle.  From the initial requirements gathering to the final deployment of the completed project, continuous integration saves time which in turn saves money.  Projects can be completed in a more timely manner which also generates a saving in project budget.&lt;br /&gt;
&lt;br /&gt;
Continuous integration can become cumbersome in a large application project since you need to have multiple environments set up to mirror the production environment.  You can easily spend the savings you would gain from the shortened time frame on the infrastructure costs associated with the multiple clone environments.&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration Process Flow ===&lt;br /&gt;
Below is a diagram of the process flow when using continuous integration.  As discussed in the information above, each of the steps in the process flow should execute multiple times throughout the day.&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41839</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41839"/>
		<updated>2010-11-18T02:50:50Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Popular vs. Cumbersome ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
One popular CI rule states that programmers should integrate at the end of the day and never leave code unintegrated. The build should not be left in a broken state overnight. This rule demands a task planning discipline on the programming teams. If the team's rule is that whoever breaks the build has to fix the build, it will create natural incentive to check code in and build the code often during the day.  These rules help to ensure that CI is utilized to its fullest potential.[[#References|&amp;lt;sup&amp;gt;14&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Popular vs. Cumbersome ===&lt;br /&gt;
Continuous integration is most popular in the Agile and XP methodologies. &lt;br /&gt;
&lt;br /&gt;
=== Good Example ===&lt;br /&gt;
&lt;br /&gt;
=== Bad Example ===&lt;br /&gt;
&lt;br /&gt;
[[Image:CIDiagram.jpg]]&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;br /&gt;
#[http://www.versionone.com/Agile101/Continuous_Integration.asp Continuous Integration, VersionOne]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:CIDiagram.jpg&amp;diff=41836</id>
		<title>File:CIDiagram.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:CIDiagram.jpg&amp;diff=41836"/>
		<updated>2010-11-18T02:49:36Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: CI Diagram&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;CI Diagram&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41821</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41821"/>
		<updated>2010-11-18T02:14:52Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
== Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled &amp;lt;u&amp;gt;Extreme Programming Explained: Embrace Change&amp;lt;/u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition ===&lt;br /&gt;
When we talk about ownership, we are generally talking about the following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development guide, collective ownership doesn't deal with welfare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the responsibility for problems, flaws, or routine maintenance, but not saying things about welfare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Collective Ownership ===&lt;br /&gt;
The most feasible benefit of collective ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if a member of the development team gets hit by a truck. For example, the truck factor is one if there is only one person working on a sub-system. If this person were hit on the road, then the odds for the team to lose the knowledge of the sub-system - at least temporarily - is 100%. The truck factor is 0.5 if there are 2 people working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective ownership enables the knowledge of certain code to be shared within the development team and thus has a low truck factor. This will be very important for a volatile coding team with frequent developers moving in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
To avoid a very high truck factor, collective ownership is also believed to minimize the political turf in the developing team so that development can be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developers are doing a subsystem. Then different groups of people would build the obstacles between. To complete a certain function system wide, you would have to consult each of the development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential Concepts to Implement ===&lt;br /&gt;
As mentioned above, collective ownership is not simply an ownership concept in daily life, rather it emphasizes on code knowledge sharing. However, it is the way it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in of code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP, but only if the developer who is working on a specific code block is truly knowledgeable of code. A common bad practice is the subsystem is still worked out by one developer, while he 'tells' other developers what he did. This practice doesn't change much.  Pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the subsystem. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is extremely important to writing good quality code. So is it extremely important in CCO consideration. As different developers may have different view points on a certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain subsystems would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believed to help with building up CCO in development team. Actually, after looking into each of the principles, you will find the help is essentially coming from the two key practices which are coincidentally a part of these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Popular vs. Cumbersome ===&lt;br /&gt;
==== Limitation in Programming for the Large Team ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement the two practices required inherently in CCO that makes ownership sharing controversial. For a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company that has outsourcing or global development, there is almost no way to perform pair programming and even a simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, as in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. Even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Not Always the Most Efficient ====&lt;br /&gt;
XP practice is mostly focused on light weight but rapid code writing. Therefore it may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kinds of ownership at different development stages. In short, at the inception period, one or two product specialists collect the system requirements and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Conflicts with Other Programming Practice Guidelines ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer knows each part of the code well, he/she may easily get the idea to change other code implementation outside of his working subsystem. This is considered a bad practice in OOP. For a well designed system, one needs no knowledge of other parts of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into smaller ones, and each of the smaller ones don't need the knowledge of other parts.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Good CCO Example===&lt;br /&gt;
A team follows Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Bad CCO Example===&lt;br /&gt;
A team with no complete unit test framework and no submitter name in the source code repository. Someone gets furious because another incompetent developer is free to make stupid mistakes everyday and not be blamed. Obviously, they are not implementing a good pair programming scheme.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential concepts to Implement ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
=== Benefits of Continuous Integration ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41806</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41806"/>
		<updated>2010-11-18T01:44:17Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
==Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) twelve core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corporation's payroll application. Beck later spelled out the development methodology in a book titled Extreme &amp;lt;u&amp;gt;Programming Explained: Embrace Change&amp;lt;\u&amp;gt; (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition===&lt;br /&gt;
When we talk about ownership, we are generally talking about following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development practice guide, the collective code ownership doesn't deal with warefare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective code ownership means [http://industrialxp.org/collectiveOwnership.html &amp;quot;Anyone can change anything at anytime&amp;quot;][[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the Responsibility for problems, flaws, or routine maintenance, but not saying things about warefare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Benefits of Collective Code ownership ===&lt;br /&gt;
The most feasible benefit of collective code ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if one of the development team member gets hit by a truck. For example, the truck factor is one, if there is only one person working on a sub-system. As if this person got hit on the road, then the odds for the team to lose the knowledge of the sub-system at least temporarily is 100%. The truck factor is 0.5 if there are 2 person working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective code ownership enables the knowledge of certain code is shared within the development team and thus has a low truck factor. This will be very important for an volatile coding team with frequent developers move in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Except to avoid very high truck factor, collective code ownership is also believed to minimize the politics turf in the developing team, so that development could be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developer are doing a subsystem. Then different groups of people would build obstacles between. To complete certain function system wide, you have to consult each of these development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential concepts to put CCO in practice===&lt;br /&gt;
As mentioned above, collective code ownership is not simply ownership concept in daily life, rather it emphasizes on code knowledge sharing. But it is the way how it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Pair_programming Pair programming] is essential for code knowledge sharing in XP. Only if the person who is working on the code block could be said as truly know this code. Common bad practice is that the sub-system is still worked out be one person, while he 'tells' other what he does. This doesn't really make much changes. And pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the sub system. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete [http://en.wikipedia.org/wiki/Unit_testing unit test] is of the key importance to make a good quality code. So is it in CCO consideration. As different developer may have different view point on certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain sub-system would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles, (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believe to help with building up CCO in development team. Actually, after look into each of the principles, you will find the help is essentially coming from the two key practice which is coincidentally lying within these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where it is popular and where it is cumbersome ===&lt;br /&gt;
==== Limitation in programming for the large ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement these two practices required inherently in CCO that makes ownership sharing become a little bit controversial. Especially for a large development team, the overhead for sharing code knowledge could be unacceptably big. In the company doing outsourcing or global development, almost no way to do pair programming and even simple oral report for code change will be possible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large groups, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20 or less developers. If only 3 or 6 people are involved, in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. And even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Not always the most efficient ====&lt;br /&gt;
After all, XP practice is mostly focused on light weight but rapid code writing. Therefore may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kind of ownership at different development stage. For short, at the inception period, one or two product specialist collects the system requirement and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Conflicts with other programming practice guide ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming(OOP)] -- information hiding. If each programmer well knows each part of the code, he/she may easily get into the idea to change other code implementation out of his working sub-system. This is for sure bad practice considered in OOP, as for a well designed system, one needs no knowledge of other part of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into small ones, and each of the small one doesn't need the knowledge of other part.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The good CCO example===&lt;br /&gt;
A team follow Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The bad CCO example===&lt;br /&gt;
A team with not complete unit test framework and have no submitter's name in the source code repository. Some one gets furious because another incompetent developer is free to make stupid mistakes everyday and not being blamed. Obviously, they are not implementing a good pair programming scheme as well.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
=== Essential concepts to Put into Practice ===&lt;br /&gt;
CI requires the following concepts to implement:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
=== Benefits of CI ===&lt;br /&gt;
There are many benefits to using continuous integration.  The time savings of continuous integration instead of deferred integration can be exponential.  Continuous integration takes away that lag at the end of a project that occurs when the integration is deferred.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  When builds and/or tests fail, you have immediate notification of those failures which allows you to easily find and fix bugs as they occur instead of during the deferred integration period.  This allows you to quickly and efficiently resolve those bugs while the code they pertain to, which you have just recently written, is still fresh in your mind.  Building and testing in a clean environment that mirrors the production environment eliminates the inconsistency of individual developer and test environments.  This ensures that the system you are writing now is exactly what it will be when it is deployed.[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41742</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41742"/>
		<updated>2010-11-18T00:50:24Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
==Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) 12 core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corp.'s payroll application. Beck then spelled out the development methodology in a book titled Extreme Programming Explained: Embrace Change (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition===&lt;br /&gt;
When we talk about ownership, we are generally talking about following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development practice guide, the collective code ownership doesn't deal with warefare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective code ownership means &amp;quot;Anyone can change anything at anytime&amp;quot;[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the Responsibility for problems, flaws, or routine maintenance, but not saying things about warefare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Benefits of Collective Code ownership ===&lt;br /&gt;
The most feasible benefit of collective code ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if one of the development team member gets hit by a truck. For example, the truck factor is one, if there is only one person working on a sub-system. As if this person got hit on the road, then the odds for the team to lose the knowledge of the sub-system at least temporarily is 100%. The truck factor is 0.5 if there are 2 person working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective code ownership enables the knowledge of certain code is shared within the development team and thus has a low truck factor. This will be very important for an volatile coding team with frequent developers move in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Except to avoid very high truck factor, collective code ownership is also believed to minimize the politics turf in the developing team, so that development could be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developer are doing a subsystem. Then different groups of people would build obstacles between. To complete certain function system wide, you have to consult each of these development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential concepts to put CCO in practice===&lt;br /&gt;
As mentioned above, collective code ownership is not simply ownership concept in daily life, rather it emphasizes on code knowledge sharing. But it is the way how it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Pair programming is essential for code knowledge sharing in XP. Only if the person who is working on the code block could be said as truly know this code. Common bad practice is that the sub-system is still worked out be one person, while he 'tells' other what he does. This doesn't really make much changes. And pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the sub system. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete unit test is of the key importance to make a good quality code. So is it in CCO consideration. As different developer may have different view point on certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain sub-system would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles, (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believe to help with building up CCO in development team. Actually, after look into each of the principles, you will find the help is essentially coming from the two key practice which is coincidentally lying within these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where it is popular and where it is cumbersome ===&lt;br /&gt;
==== Limitation in programming for the large ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement these two practices required inherently in CCO that makes ownership sharing become a little bit controversial. Especially for a large development team, the overhead for sharing code knowledge could be unacceptable big. In the company doing out-sourcing or global development, almost no way to do pair programming and even simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large group, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20- develop. If only 3 or 6 people are involved, in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. And even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Not always the most efficient ====&lt;br /&gt;
After all, XP practice is mostly focused on light weight but rapid code writing. Therefore may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kind of ownership at different development stage. For short, at the inception period, one or two product specialist collects the system requirement and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Conflicts with other programming practice guide ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by Object Oriented Programming(OOP) -- information hiding. If each programmer well knows each part of the code, he/she may easily get into the idea to change other code implementation out of his working sub-system. This is for sure bad practice considered in OOP, as for a well designed system, one needs no knowledge of other part of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into small ones, and each of the small one doesn't need the knowledge of other part.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The good CCO example===&lt;br /&gt;
A team follow Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The bad CCO example===&lt;br /&gt;
A team with not complete unit test framework and have no submitter's name in the source code repository. Some one gets furious because another incompetent developer is free to make stupid mistakes everyday and not being blamed. Obviously, they are not implementing a good pair programming scheme as well.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
CI requires the following:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
=== Benefits of CI ===&lt;br /&gt;
There are many benefits to using continuous integration.&lt;br /&gt;
&lt;br /&gt;
More to come...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41741</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41741"/>
		<updated>2010-11-18T00:49:39Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
==Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) 12 core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corp.'s payroll application. Beck then spelled out the development methodology in a book titled Extreme Programming Explained: Embrace Change (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition===&lt;br /&gt;
When we talk about ownership, we are generally talking about following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development practice guide, the collective code ownership doesn't deal with warefare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective code ownership means &amp;quot;Anyone can change anything at anytime&amp;quot;[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the Responsibility for problems, flaws, or routine maintenance, but not saying things about warefare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Benefits of Collective Code ownership ===&lt;br /&gt;
The most feasible benefit of collective code ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if one of the development team member gets hit by a truck. For example, the truck factor is one, if there is only one person working on a sub-system. As if this person got hit on the road, then the odds for the team to lose the knowledge of the sub-system at least temporarily is 100%. The truck factor is 0.5 if there are 2 person working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective code ownership enables the knowledge of certain code is shared within the development team and thus has a low truck factor. This will be very important for an volatile coding team with frequent developers move in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Except to avoid very high truck factor, collective code ownership is also believed to minimize the politics turf in the developing team, so that development could be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developer are doing a subsystem. Then different groups of people would build obstacles between. To complete certain function system wide, you have to consult each of these development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential concepts to put CCO in practice===&lt;br /&gt;
As mentioned above, collective code ownership is not simply ownership concept in daily life, rather it emphasizes on code knowledge sharing. But it is the way how it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Pair programming is essential for code knowledge sharing in XP. Only if the person who is working on the code block could be said as truly know this code. Common bad practice is that the sub-system is still worked out be one person, while he 'tells' other what he does. This doesn't really make much changes. And pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the sub system. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete unit test is of the key importance to make a good quality code. So is it in CCO consideration. As different developer may have different view point on certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain sub-system would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles, (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believe to help with building up CCO in development team. Actually, after look into each of the principles, you will find the help is essentially coming from the two key practice which is coincidentally lying within these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where it is popular and where it is cumbersome ===&lt;br /&gt;
==== Limitation in programming for the large ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement these two practices required inherently in CCO that makes ownership sharing become a little bit controversial. Especially for a large development team, the overhead for sharing code knowledge could be unacceptable big. In the company doing out-sourcing or global development, almost no way to do pair programming and even simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large group, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20- develop. If only 3 or 6 people are involved, in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. And even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Not always the most efficient ====&lt;br /&gt;
After all, XP practice is mostly focused on light weight but rapid code writing. Therefore may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kind of ownership at different development stage. For short, at the inception period, one or two product specialist collects the system requirement and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Conflicts with other programming practice guide ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by Object Oriented Programming(OOP) -- information hiding. If each programmer well knows each part of the code, he/she may easily get into the idea to change other code implementation out of his working sub-system. This is for sure bad practice considered in OOP, as for a well designed system, one needs no knowledge of other part of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into small ones, and each of the small one doesn't need the knowledge of other part.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The good CCO example===&lt;br /&gt;
A team follow Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The bad CCO example===&lt;br /&gt;
A team with not complete unit test framework and have no submitter's name in the source code repository. Some one gets furious because another incompetent developer is free to make stupid mistakes everyday and not being blamed. Obviously, they are not implementing a good pair programming scheme as well.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Continuous Integration ==&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
CI requires the following:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
== Benefits of CI ==&lt;br /&gt;
There are many benefits to using continuous integration.&lt;br /&gt;
&lt;br /&gt;
More to come...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41739</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41739"/>
		<updated>2010-11-18T00:49:04Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
==Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) 12 core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corp.'s payroll application. Beck then spelled out the development methodology in a book titled Extreme Programming Explained: Embrace Change (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition===&lt;br /&gt;
When we talk about ownership, we are generally talking about following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development practice guide, the collective code ownership doesn't deal with warefare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective code ownership means &amp;quot;Anyone can change anything at anytime&amp;quot;[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the Responsibility for problems, flaws, or routine maintenance, but not saying things about warefare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Benefits of Collective Code ownership ===&lt;br /&gt;
The most feasible benefit of collective code ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if one of the development team member gets hit by a truck. For example, the truck factor is one, if there is only one person working on a sub-system. As if this person got hit on the road, then the odds for the team to lose the knowledge of the sub-system at least temporarily is 100%. The truck factor is 0.5 if there are 2 person working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective code ownership enables the knowledge of certain code is shared within the development team and thus has a low truck factor. This will be very important for an volatile coding team with frequent developers move in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Except to avoid very high truck factor, collective code ownership is also believed to minimize the politics turf in the developing team, so that development could be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developer are doing a subsystem. Then different groups of people would build obstacles between. To complete certain function system wide, you have to consult each of these development groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Essential concepts to put CCO in practice===&lt;br /&gt;
As mentioned above, collective code ownership is not simply ownership concept in daily life, rather it emphasizes on code knowledge sharing. But it is the way how it is practiced that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effective CCO, pair programming and complete unit test before check in code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Pair programming is essential for code knowledge sharing in XP. Only if the person who is working on the code block could be said as truly know this code. Common bad practice is that the sub-system is still worked out be one person, while he 'tells' other what he does. This doesn't really make much changes. And pair programming would require frequent partner changes. So in this scenario, each person has the experience of every part of the sub system. The knowledge of the code is truly shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete unit test is of the key importance to make a good quality code. So is it in CCO consideration. As different developer may have different view point on certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain sub-system would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practice principles, (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browsing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believe to help with building up CCO in development team. Actually, after look into each of the principles, you will find the help is essentially coming from the two key practice which is coincidentally lying within these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Where it is popular and where it is cumbersome ===&lt;br /&gt;
==== Limitation in programming for the large ====&lt;br /&gt;
In the real world, it is the lack of the ability to implement these two practices required inherently in CCO that makes ownership sharing become a little bit controversial. Especially for a large development team, the overhead for sharing code knowledge could be unacceptable big. In the company doing out-sourcing or global development, almost no way to do pair programming and even simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large group, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20- develop. If only 3 or 6 people are involved, in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. And even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Not always the most efficient ====&lt;br /&gt;
After all, XP practice is mostly focused on light weight but rapid code writing. Therefore may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kind of ownership at different development stage. For short, at the inception period, one or two product specialist collects the system requirement and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Conflicts with other programming practice guide ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by Object Oriented Programming(OOP) -- information hiding. If each programmer well knows each part of the code, he/she may easily get into the idea to change other code implementation out of his working sub-system. This is for sure bad practice considered in OOP, as for a well designed system, one needs no knowledge of other part of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practice and traditional design-first practice. The latter one tends to separate the whole project into small ones, and each of the small one doesn't need the knowledge of other part.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The good CCO example===&lt;br /&gt;
A team follow Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===The bad CCO example===&lt;br /&gt;
A team with not complete unit test framework and have no submitter's name in the source code repository. Some one gets furious because another incompetent developer is free to make stupid mistakes everyday and not being blamed. Obviously, they are not implementing a good pair programming scheme as well.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Continuous Integration =&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
CI requires the following:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
== Benefits of CI ==&lt;br /&gt;
There are many benefits to using continuous integration.&lt;br /&gt;
&lt;br /&gt;
More to come...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41004</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41004"/>
		<updated>2010-11-17T04:13:51Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
==Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) 12 core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corp.'s payroll application. Beck then spelled out the development methodology in a book titled Extreme Programming Explained: Embrace Change (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition===&lt;br /&gt;
When we talk about ownership, we are generally talking about following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development practice guide, the collective code ownership doesn't deal with warefare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective code ownership means &amp;quot;Anyone can change anything at anytime&amp;quot;[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the Responsibility for problems, flaws, or routine maintenance, but not saying things about warefare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Benefit from Collective Code ownership ===&lt;br /&gt;
The most feasible benefit of collective code ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if one of the development team member gets hit by a truck. For example, the truck factor is one, if there is only one person working on a sub-system. As if this person got hit on the road, then the odds for the team to lose the knowledge of the sub-system at least temparury is 100%. The truck factor is 0.5 if there are 2 person working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective code ownership enables the knowledge of certain code is shared within the development team and thus has a low truck factor. This will be very important for an volatile coding team with frequent developers move in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Except to avoid very high truck factor, collective code ownership is also believed to minimize the politics turf in the developing team, so that development could be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developer are doing a subsystem. Then different groups of people would build obstacle between. To complete certain function system wide, you have to concult each of these develop groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Essential concepts to put CCO in practice==&lt;br /&gt;
As mentioned above, collective code ownership is not simply ownership concept in daily life, rather it emphasizes on code knowledge sharing. But it is the way how it is practised that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effecitive CCO, pair programming and complete unit test before check in code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Pair programming is essential for code knowledge sharing in XP. Only if the person who is working on the code block could be said as truly know this code. Common bad practice is that the sub-system is still worked out be one person, while he 'tells' other what he does. This doesn't really make much changes. And pair programming would require frequent partner changes. So in this senario, each person has the experience of every part of the sub system. The knowledge of the code is truely shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete unit test is of the key importance to make a good quality code. So is it in CCO consideration. As different developer may have different view point on certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain sub-system would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practise principles, (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believe to help with building up CCO in development team. Actually, after look into each of the principles, you will find the help is essentially coming from the two key practise which is coincidently lying within these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where it is popular and where it is cumbersome ==&lt;br /&gt;
==== Limitation in programming for the large ====&lt;br /&gt;
In real world, it is the lack of the ability to implement these two practices required inherently in CCO that makes ownership sharing become a little bit controversial. Especially for a large development team, the overhead for sharing code knowledge could be unacceptable big. In the company doing out-sourcing or gloable developing, almost no way to do pair programming and even simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large group, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20- develop. If only 3 or 6 people are involved, in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. And even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Not always the most efficient ====&lt;br /&gt;
After all, XP practise is mostly focused on light weight but rapid code writing. Therefore may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kind of ownership at different development stage. For short, at the inception period, one or two product specialist collects the system requirement and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Conflicts with other programming practice guide ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by Object Oriented Programming(OOP) -- information hiding. If each programmer well knows each part of the code, he/she may easily get into the idea to change other code implementation out of his working sub-system. This is for sure bad practise considered in OOP, as for a well designed system, one needs no knowledge of other part of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practise and traditional design-first practice. The latter one tends to separate the whole project into small ones, and each of the small one doesn't need the knowledge of other part.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The good CCO example==&lt;br /&gt;
A team follow Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The bad CCO example==&lt;br /&gt;
A team with not complete unit test framework and have no submitter's name in the source code repository. Some one gets furious because another incompetent developer is free to make stupid mistakes everyday and not being blamed. Obviously, they are not implementing a good pair programming scheme as well.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Continuous Integration =&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
CI requires the following:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
=== Benefits of CI ===&lt;br /&gt;
There are many benefits to using continuous integration.&lt;br /&gt;
&lt;br /&gt;
More to come...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41002</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41002"/>
		<updated>2010-11-17T04:12:21Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
==Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) 12 core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corp.'s payroll application. Beck then spelled out the development methodology in a book titled Extreme Programming Explained: Embrace Change (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition===&lt;br /&gt;
When we talk about ownership, we are generally talking about following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development practice guide, the collective code ownership doesn't deal with warefare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective code ownership means &amp;quot;Anyone can change anything at anytime&amp;quot;[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the Responsibility for problems, flaws, or routine maintenance, but not saying things about warefare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Benefit from Collective Code ownership ===&lt;br /&gt;
The most feasible benefit of collective code ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if one of the development team member gets hit by a truck. For example, the truck factor is one, if there is only one person working on a sub-system. As if this person got hit on the road, then the odds for the team to lose the knowledge of the sub-system at least temparury is 100%. The truck factor is 0.5 if there are 2 person working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective code ownership enables the knowledge of certain code is shared within the development team and thus has a low truck factor. This will be very important for an volatile coding team with frequent developers move in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Except to avoid very high truck factor, collective code ownership is also believed to minimize the politics turf in the developing team, so that development could be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developer are doing a subsystem. Then different groups of people would build obstacle between. To complete certain function system wide, you have to concult each of these develop groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Essential concepts to put CCO in practice==&lt;br /&gt;
As mentioned above, collective code ownership is not simply ownership concept in daily life, rather it emphasizes on code knowledge sharing. But it is the way how it is practised that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effecitive CCO, pair programming and complete unit test before check in code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Pair programming is essential for code knowledge sharing in XP. Only if the person who is working on the code block could be said as truly know this code. Common bad practice is that the sub-system is still worked out be one person, while he 'tells' other what he does. This doesn't really make much changes. And pair programming would require frequent partner changes. So in this senario, each person has the experience of every part of the sub system. The knowledge of the code is truely shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete unit test is of the key importance to make a good quality code. So is it in CCO consideration. As different developer may have different view point on certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain sub-system would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practise principles, (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believe to help with building up CCO in development team. Actually, after look into each of the principles, you will find the help is essentially coming from the two key practise which is coincidently lying within these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where it is popular and where it is cumbersome ==&lt;br /&gt;
==== Limitation in programming for the large ====&lt;br /&gt;
In real world, it is the lack of the ability to implement these two practices required inherently in CCO that makes ownership sharing become a little bit controversial. Especially for a large development team, the overhead for sharing code knowledge could be unacceptable big. In the company doing out-sourcing or gloable developing, almost no way to do pair programming and even simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large group, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20- develop. If only 3 or 6 people are involved, in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. And even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Not always the most efficient ====&lt;br /&gt;
After all, XP practise is mostly focused on light weight but rapid code writing. Therefore may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kind of ownership at different development stage. For short, at the inception period, one or two product specialist collects the system requirement and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Conflicts with other programming practice guide ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by Object Oriented Programming(OOP) -- information hiding. If each programmer well knows each part of the code, he/she may easily get into the idea to change other code implementation out of his working sub-system. This is for sure bad practise considered in OOP, as for a well designed system, one needs no knowledge of other part of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practise and traditional design-first practice. The latter one tends to separate the whole project into small ones, and each of the small one doesn't need the knowledge of other part.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The good CCO example==&lt;br /&gt;
A team follow Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The bad CCO example==&lt;br /&gt;
A team with not complete unit test framework and have no submitter's name in the source code repository. Some one gets furious because another incompetent developer is free to make stupid mistakes everyday and not being blamed. Obviously, they are not implementing a good pair programming scheme as well.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Continuous Integration =&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
CI requires the following:[[#References|&amp;lt;sup&amp;gt;12, 13&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
=== Benefits of CI ===&lt;br /&gt;
There are many benefits to using continuous integration.&lt;br /&gt;
&lt;br /&gt;
More to come...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41000</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=41000"/>
		<updated>2010-11-17T04:11:21Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
= Collective Ownership and Continuous Integration =&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
==Collective Ownership ==&lt;br /&gt;
Collective ownership, or collective code ownership(CCO), is one of the extreme programming (XP) 12 core practices. Programmer [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck] developed extreme programming (XP) while serving as project leader on Chrysler Comprehensive Compensation (C3), a long-term project to rewrite Chrysler Corp.'s payroll application. Beck then spelled out the development methodology in a book titled Extreme Programming Explained: Embrace Change (Addison-Wesley, 1999)[[#References|&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;]].&lt;br /&gt;
&lt;br /&gt;
=== Best Definition===&lt;br /&gt;
When we talk about ownership, we are generally talking about following 5 factors [[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
*Direct benefit from increases in value or generated income&amp;lt;br/&amp;gt;&lt;br /&gt;
*Pride in appearance, achievement, and improvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Responsibility for problems, flaws, or routine maintenance&amp;lt;br/&amp;gt;&lt;br /&gt;
*Commitment to long-term involvement&amp;lt;br/&amp;gt;&lt;br /&gt;
*Potential for successful resale (reuse)&amp;lt;br/&amp;gt;&lt;br /&gt;
Regarding the XP practice as a development practice guide, the collective code ownership doesn't deal with warefare directly. It gets credit in the virtue of knowledge and development procedure. In the words of [http://en.wikipedia.org/wiki/Kent_Beck Kent Beck], collective code ownership means &amp;quot;Anyone can change anything at anytime&amp;quot;[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]], which works similarly to open source programming. This definition directly deal with the Responsibility for problems, flaws, or routine maintenance, but not saying things about warefare brought by the ownership.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Benefit from Collective Code ownership ===&lt;br /&gt;
The most feasible benefit of collective code ownership is to avoid [http://www.agileadvice.com/archives/2005/05/truck_factor.html truck factor][[#References|&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;]]. The truck factor is used to describe what would happen if one of the development team member gets hit by a truck. For example, the truck factor is one, if there is only one person working on a sub-system. As if this person got hit on the road, then the odds for the team to lose the knowledge of the sub-system at least temparury is 100%. The truck factor is 0.5 if there are 2 person working on the same project. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Collective code ownership enables the knowledge of certain code is shared within the development team and thus has a low truck factor. This will be very important for an volatile coding team with frequent developers move in and out.&amp;lt;br/&amp;gt; &lt;br /&gt;
&lt;br /&gt;
Except to avoid very high truck factor, collective code ownership is also believed to minimize the politics turf in the developing team, so that development could be more rapid.[[#References|&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;]] This is commonly seen when a developer or small group of developer are doing a subsystem. Then different groups of people would build obstacle between. To complete certain function system wide, you have to concult each of these develop groups or individuals one by one. This slows down the development. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Essential concepts to put CCO in practice==&lt;br /&gt;
As mentioned above, collective code ownership is not simply ownership concept in daily life, rather it emphasizes on code knowledge sharing. But it is the way how it is practised that makes it controversial. Typically it will have two other principles to serve as the most fundamental support to ensure an effecitive CCO, pair programming and complete unit test before check in code changes. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Pair programming is essential for code knowledge sharing in XP. Only if the person who is working on the code block could be said as truly know this code. Common bad practice is that the sub-system is still worked out be one person, while he 'tells' other what he does. This doesn't really make much changes. And pair programming would require frequent partner changes. So in this senario, each person has the experience of every part of the sub system. The knowledge of the code is truely shared by all the team members. [[#References|&amp;lt;sup&amp;gt;5, 6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Complete unit test is of the key importance to make a good quality code. So is it in CCO consideration. As different developer may have different view point on certain code segment, if there is no test framework to serve as a coding standard for each function, the behavior of certain sub-system would be totally unpredictable. This will only lead the CCO into no ownership chaos. [[#References|&amp;lt;sup&amp;gt;1, 3, 7&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As mentioned in many articles, except the two mention above, other practise principles, (including but not limited to continuous integration, code management tools like SVN, powerful refactoring and browing tools to check old methods)[[#References|&amp;lt;sup&amp;gt;3, 8&amp;lt;/sup&amp;gt;]] are believe to help with building up CCO in development team. Actually, after look into each of the principles, you will find the help is essentially coming from the two key practise which is coincidently lying within these other principles.&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Where it is popular and where it is cumbersome ==&lt;br /&gt;
==== Limitation in programming for the large ====&lt;br /&gt;
In real world, it is the lack of the ability to implement these two practices required inherently in CCO that makes ownership sharing become a little bit controversial. Especially for a large development team, the overhead for sharing code knowledge could be unacceptable big. In the company doing out-sourcing or gloable developing, almost no way to do pair programming and even simple oral report for code change will be impossible[[#References|&amp;lt;sup&amp;gt;9&amp;lt;/sup&amp;gt;]]. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Therefore, CCO is considered not good for very large group, such as 100+. In fact, most people would consider it is an effective coding practice if there are only 20- develop. If only 3 or 6 people are involved, in the most common cases, it will get the most positive comments. On the other hand, for a large number of developers, it will be hard to carry on a well focused system skeleton. And even on the contrary to the initial goodwill, it will be hard to establish the responsibility for tasks or problems.[[#References|&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Not always the most efficient ====&lt;br /&gt;
After all, XP practise is mostly focused on light weight but rapid code writing. Therefore may not have the best effect for use cases collection, architecture design or after production maintenance. This will give trouble to a whole project release period. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A more advanced idea on code ownership is dynamic code ownership. It focuses on the whole development period under the [http://en.wikipedia.org/wiki/Unified_Process unified software development process framework] and make use of different kind of ownership at different development stage. For short, at the inception period, one or two product specialist collects the system requirement and build up the documentation. Then several experienced chief architects make up the blue print for the whole project. Further increasing the development team, the project runs into code writing session and CCO is implemented. After production release, only a small portion of people is needed to do maintenance.[[#References|&amp;lt;sup&amp;gt;2, 10&amp;lt;/sup&amp;gt;]] &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====Conflicts with other programming practice guide ====&lt;br /&gt;
Except not very suitable for whole development period and large development teams, without careful training of each programmer, it can easily break the brief hold by Object Oriented Programming(OOP) -- information hiding. If each programmer well knows each part of the code, he/she may easily get into the idea to change other code implementation out of his working sub-system. This is for sure bad practise considered in OOP, as for a well designed system, one needs no knowledge of other part of code. &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This is the outcome of the root debate between agile practise and traditional design-first practice. The latter one tends to separate the whole project into small ones, and each of the small one doesn't need the knowledge of other part.  &amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The good CCO example==&lt;br /&gt;
A team follow Continuous Integration, Pairing, Story Test-Driven Development and Coding Standard. As programmers work in pairs, at any point, two people will know about a part of the system. Frequently rotating pairs helps diffuse knowledge across the team. After a point, it would be impossible to associate one programmer with any portion of the system, as everyone on the team has worked on it at some point. [[#References|&amp;lt;sup&amp;gt;6&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==The bad CCO example==&lt;br /&gt;
A team with not complete unit test framework and have no submitter's name in the source code repository. Some one gets furious because another incompetent developer is free to make stupid mistakes everyday and not being blamed. Obviously, they are not implementing a good pair programming scheme as well.[[#References|&amp;lt;sup&amp;gt;11&amp;lt;/sup&amp;gt;]]&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Continuous Integration =&lt;br /&gt;
Continuous Integration (CI) is another core practice of extreme programming.  CI is a process where an application undergoing development is rebuilt and tested automatically and frequently.  [http://en.wikipedia.org/wiki/Martin_Fowler Martin Fowler] explains it best:  &amp;quot;Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.&amp;quot;[[#References|&amp;lt;sup&amp;gt;9, 10&amp;lt;/sup&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
CI requires the following:&lt;br /&gt;
* A single repository -- A decent source code management system must contain all the code for the application and be used exclusively and correctly by the development team.&lt;br /&gt;
* Automated builds that test themselves -- An automated build process that builds the entire application and then performs Unit Tests and Performance Analysis&lt;br /&gt;
* Daily integration -- Developers should commit working code to the repository mainline at the very least every day.  This makes identifying and resolving code conflicts much easier and quicker.  You know that you only have to look at the latest code changes for bugs or errors.&lt;br /&gt;
* Every integration to the mainline builds the application on an integration machine -- Only after the mainline build is successful should a code integration be considered successful.&lt;br /&gt;
* Fast builds -- Rapid feedback is backbone of CI.  The XP guideline states ten minutes.&lt;br /&gt;
* Testing occurs in a clone of the production environment -- to identify the problems that will occur in production is the essence of testing.  Different environments allow for the possibility of different results.&lt;br /&gt;
* Latest executable is available for everyone -- Everyone involved with the development should have the ability to get and execute the the latest executable.&lt;br /&gt;
* Communicate what's happening -- Everyone should be able to easily see the state of the system, the changes made, and the state of the mainline build.&lt;br /&gt;
* Deployment automation -- Scripts should be used to deploy the system to the various environments.  This helps reduce errors and speed up the process of deployment.&lt;br /&gt;
&lt;br /&gt;
=== Benefits of CI ===&lt;br /&gt;
There are many benefits to using continuous integration.&lt;br /&gt;
&lt;br /&gt;
More to come...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Reference =&lt;br /&gt;
#[http://web.ebscohost.com.www.lib.ncsu.edu:2048/ehost/detail?vid=9&amp;amp;hid=104&amp;amp;sid=e34a3e29-ce87-4658-9f49-d5196bfc2504%40sessionmgr112&amp;amp;bdata=JnNpdGU9ZWhvc3QtbGl2ZSZzY29wZT1zaXRl#db=aph&amp;amp;AN=5696081 L. Copeland, Extreme Programming] Computerworld; 12/3/2001, Vol. 35 Issue 49, p48, 1p &lt;br /&gt;
#[http://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=01184163 M. Nordberg III, Managing Code Ownership]&lt;br /&gt;
#[http://industrialxp.org/collectiveOwnership.html Collective Ownership, industrial XP]&lt;br /&gt;
#[http://jamesshore.com/Agile-Book/collective_code_ownership.html The Art of Agile Development: Collective Code Ownership]&lt;br /&gt;
#[http://www.xpexchange.net/english/intro/collectiveCodeOwnership.html Collective Code Ownership, XPexchange.net]&lt;br /&gt;
#[http://www.markhneedham.com/blog/2009/02/17/collective-code-ownership-some-thoughts/ Mark Needham, Collective Code Ownership: Some Thoughts]&lt;br /&gt;
#[http://www.extremeprogramming.org/rules/collective.html Collective Ownership, extremeprogramming.org]&lt;br /&gt;
#[http://www.c2.com/cgi/wiki?CollectiveCodeOwnership Collective Code Ownership, Cunningham &amp;amp; Cunningham, Inc.]&lt;br /&gt;
#Lee Copeland, Developers Approach Extreme Programming With Caution. Computerworld, 00104841, 10/22/2001, Vol. 35, Issue 43&lt;br /&gt;
#[http://www.cmcrossroads.com/agile-scm/6757-situational-code-ownership-dynamically-balancing-individual-vs-collective-ownership Situational Code Ownership: Dynamically Balancing Individual -vs- Collective Ownership]&lt;br /&gt;
#[http://www.simonlin.ca/2007/07/17/collective-code-ownership-a-misused-agile-practice/ Collective Code Ownership – a misused Agile practice]&lt;br /&gt;
#&amp;quot;Continuous Integration &amp;amp; Performance Testing&amp;quot; Haines, Steven. Dr. Dobb's Journal, March 2008.&lt;br /&gt;
#[http://www.martinfowler.com/articles/continuousIntegration.html Continuous Integration, Martin Fowler]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=40672</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=40672"/>
		<updated>2010-11-16T02:25:47Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
== Collective Ownership and Continuous Integration ==&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
=== Collective Ownership ===&lt;br /&gt;
Chengbo's section...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration ===&lt;br /&gt;
Shannon's section...&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=40668</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=40668"/>
		<updated>2010-11-16T02:17:34Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: Introduction and section breakouts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;(THIS PARAGRAPH IS ONLY FOR OUR USE.  WILL BE DELETED BEFORE SUBMISSION.)&lt;br /&gt;
Two of the important Agile methodologies that we have not said much about in this course are collective ownership and continuous integration. What are the best definitions or examples you can find? Are these widely practiced? Are they controversial? Are there adherents of other design methodologies who consider them harmful? Investigate, through the Web and through the ACM DL. &lt;br /&gt;
&lt;br /&gt;
== Collective Ownership and Continuous Integration ==&lt;br /&gt;
In this chapter we will look into two important methodologies of Agile development:  collective ownership and continuous integration.  We will discuss what these methodologies are and provide examples.  We will discuss the practice and acceptance of these methodologies as well as any drawbacks they have.&lt;br /&gt;
&lt;br /&gt;
=== Collective Ownership ===&lt;br /&gt;
Chengbo's section...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Continuous Integration ===&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=40467</id>
		<title>CSC/ECE 517 Fall 2010/ch6 6e sc</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch6_6e_sc&amp;diff=40467"/>
		<updated>2010-11-15T02:00:28Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Collective Ownership and Continuous Integration ==&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=38001</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=38001"/>
		<updated>2010-10-15T01:42:21Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is one of the most common [http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29 design patterns].  Its main idea is to define algorithms into familial groupings.  The idea is to encapsulate each algorithm, then make those algorithms interchangeable.  The Strategy design pattern allows each of the algorithms to differ autonomously from the various clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  This allows those clients to be [http://en.wikipedia.org/wiki/Coupling_%28computer_science%29 coupled] to an interface not an implementation.  At any time, the system can be expanded to allow multiple client implementations without changing the interface.  As you can see in the diagram  below, the client communicates with the interface, which then chooses the implementation based upon its strategy.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:diagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
There are many real life examples of this design pattern in operation today.  One that comes to mind would be opening a file.  The interface is the Open command of some software.  The implementations would be each of the various file types supported by the software.  There would be an implementation for text file, an implementation for a comma delimited file, an implementation for a bitmap, and so on.&lt;br /&gt;
&lt;br /&gt;
In the following sections we will compare how the Strategy pattern can be implemented in [http://en.wikipedia.org/wiki/Type_system static and dynamic languages], and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// 1. Define the interface of the algorithm&lt;br /&gt;
interface Strategy { public void solve(); }          &lt;br /&gt;
&lt;br /&gt;
// 2. Bury implementation&lt;br /&gt;
abstract class TemplateMethod1 implements Strategy { // 3. Template Method &lt;br /&gt;
   public void solve() {&lt;br /&gt;
      start();&lt;br /&gt;
      while (nextTry() &amp;amp;&amp;amp; ! isSolution())&lt;br /&gt;
         ;&lt;br /&gt;
      stop();&lt;br /&gt;
   }&lt;br /&gt;
   protected abstract void    start();&lt;br /&gt;
   protected abstract boolean nextTry();&lt;br /&gt;
   protected abstract boolean isSolution();&lt;br /&gt;
   protected abstract void    stop();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Impl1 extends TemplateMethod1 {&lt;br /&gt;
   private int state = 1;&lt;br /&gt;
   protected void start() {&lt;br /&gt;
     System.out.print( &amp;quot;start  &amp;quot; );&lt;br /&gt;
   }&lt;br /&gt;
   protected void stop() {&lt;br /&gt;
     System.out.println( &amp;quot;stop&amp;quot; );&lt;br /&gt;
   }&lt;br /&gt;
   protected boolean nextTry() {&lt;br /&gt;
      System.out.print( &amp;quot;nextTry-&amp;quot; + state++ + &amp;quot;  &amp;quot; );&lt;br /&gt;
      return true;&lt;br /&gt;
   }&lt;br /&gt;
   protected boolean isSolution() {&lt;br /&gt;
      System.out.print( &amp;quot;isSolution-&amp;quot; + (state == 3) + &amp;quot;  &amp;quot; );&lt;br /&gt;
      return (state == 3);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// 2. Bury implementation&lt;br /&gt;
abstract class TemplateMethod2 implements Strategy { // 3. Template Method&lt;br /&gt;
   public void solve() {                             &lt;br /&gt;
      while (true) {&lt;br /&gt;
         preProcess();&lt;br /&gt;
         if (search()) break;&lt;br /&gt;
         postProcess();&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   protected abstract void preProcess();&lt;br /&gt;
   protected abstract boolean search();&lt;br /&gt;
   protected abstract void postProcess();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Impl2 extends TemplateMethod2 {&lt;br /&gt;
   private int state = 1;&lt;br /&gt;
   protected void    preProcess()  { System.out.print( &amp;quot;preProcess  &amp;quot; ); }&lt;br /&gt;
   protected void    postProcess() { System.out.print( &amp;quot;postProcess  &amp;quot; ); }&lt;br /&gt;
   protected boolean search() {&lt;br /&gt;
      System.out.print( &amp;quot;search-&amp;quot; + state++ + &amp;quot;  &amp;quot; );&lt;br /&gt;
      return state == 3 ? true : false;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// 4. Clients couple strictly to the interface&lt;br /&gt;
public class StrategyDemo {&lt;br /&gt;
   public static void clientCode( Strategy strat ) {&lt;br /&gt;
     strat.solve();&lt;br /&gt;
   }&lt;br /&gt;
   public static void main( String[] args ) {&lt;br /&gt;
      Strategy[] algorithms = { new Impl1(), new Impl2() };&lt;br /&gt;
      for (int i=0; i &amp;lt; algorithms.length; i++) {&lt;br /&gt;
         clientCode( algorithms[i] );&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code identifies an interface for the related algorithms as shown in section 1, defines classes to implement the individual algorithms as shown in section 2, and shows the client coupling to the interface as shown in section 4.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code snippet also makes use of the [http://en.wikipedia.org/wiki/Template_method_pattern Template method design pattern].&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class Strategy;&lt;br /&gt;
&lt;br /&gt;
class TestBed&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    enum StrategyType&lt;br /&gt;
    {&lt;br /&gt;
        Dummy, Left, Right, Center&lt;br /&gt;
    };&lt;br /&gt;
    TestBed()&lt;br /&gt;
    {&lt;br /&gt;
        strategy_ = NULL;&lt;br /&gt;
    }&lt;br /&gt;
    void setStrategy(int type, int width);&lt;br /&gt;
    void doIt();&lt;br /&gt;
  private:&lt;br /&gt;
    Strategy *strategy_;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    Strategy(int width): width_(width){}&lt;br /&gt;
    void format()&lt;br /&gt;
    {&lt;br /&gt;
        char line[80], word[30];&lt;br /&gt;
        ifstream inFile(&amp;quot;quote.txt&amp;quot;, ios::in);&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
&lt;br /&gt;
        inFile &amp;gt;&amp;gt; word;&lt;br /&gt;
        strcat(line, word);&lt;br /&gt;
        while (inFile &amp;gt;&amp;gt; word)&lt;br /&gt;
        {&lt;br /&gt;
            if (strlen(line) + strlen(word) + 1 &amp;gt; width_)&lt;br /&gt;
              justify(line);&lt;br /&gt;
            else&lt;br /&gt;
              strcat(line, &amp;quot; &amp;quot;);&lt;br /&gt;
            strcat(line, word);&lt;br /&gt;
        }&lt;br /&gt;
        justify(line);&lt;br /&gt;
    }&lt;br /&gt;
  protected:&lt;br /&gt;
    int width_;&lt;br /&gt;
  private:&lt;br /&gt;
    virtual void justify(char *line) = 0;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class LeftStrategy: public Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    LeftStrategy(int width): Strategy(width){}&lt;br /&gt;
  private:&lt;br /&gt;
     /* virtual */void justify(char *line)&lt;br /&gt;
    {&lt;br /&gt;
        cout &amp;lt;&amp;lt; line &amp;lt;&amp;lt; endl;&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class RightStrategy: public Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    RightStrategy(int width): Strategy(width){}&lt;br /&gt;
  private:&lt;br /&gt;
     /* virtual */void justify(char *line)&lt;br /&gt;
    {&lt;br /&gt;
        char buf[80];&lt;br /&gt;
        int offset = width_ - strlen(line);&lt;br /&gt;
        memset(buf, ' ', 80);&lt;br /&gt;
        strcpy(&amp;amp;(buf[offset]), line);&lt;br /&gt;
        cout &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class CenterStrategy: public Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    CenterStrategy(int width): Strategy(width){}&lt;br /&gt;
  private:&lt;br /&gt;
     /* virtual */void justify(char *line)&lt;br /&gt;
    {&lt;br /&gt;
        char buf[80];&lt;br /&gt;
        int offset = (width_ - strlen(line)) / 2;&lt;br /&gt;
        memset(buf, ' ', 80);&lt;br /&gt;
        strcpy(&amp;amp;(buf[offset]), line);&lt;br /&gt;
        cout &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void TestBed::setStrategy(int type, int width)&lt;br /&gt;
{&lt;br /&gt;
  delete strategy_;&lt;br /&gt;
  if (type == Left)&lt;br /&gt;
    strategy_ = new LeftStrategy(width);&lt;br /&gt;
  else if (type == Right)&lt;br /&gt;
    strategy_ = new RightStrategy(width);&lt;br /&gt;
  else if (type == Center)&lt;br /&gt;
    strategy_ = new CenterStrategy(width);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void TestBed::doIt()&lt;br /&gt;
{&lt;br /&gt;
  strategy_-&amp;gt;format();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
  TestBed test;&lt;br /&gt;
  int answer, width;&lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Exit(0) Left(1) Right(2) Center(3): &amp;quot;;&lt;br /&gt;
  cin &amp;gt;&amp;gt; answer;&lt;br /&gt;
  while (answer)&lt;br /&gt;
  {&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;Width: &amp;quot;;&lt;br /&gt;
    cin &amp;gt;&amp;gt; width;&lt;br /&gt;
    test.setStrategy(answer, width);&lt;br /&gt;
    test.doIt();&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;Exit(0) Left(1) Right(2) Center(3): &amp;quot;;&lt;br /&gt;
    cin &amp;gt;&amp;gt; answer;&lt;br /&gt;
  }&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above accepts input of how to justify the string and the width of the string.  It then calls the appropriate class based upon the justification input.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class StrategyContext {&lt;br /&gt;
    private $strategy = NULL; &lt;br /&gt;
    //bookList is not instantiated at construct time&lt;br /&gt;
    public function __construct($strategy_ind_id) {&lt;br /&gt;
        switch ($strategy_ind_id) {&lt;br /&gt;
            case &amp;quot;C&amp;quot;: &lt;br /&gt;
                $this-&amp;gt;strategy = new StrategyCaps();&lt;br /&gt;
            break;&lt;br /&gt;
            case &amp;quot;E&amp;quot;: &lt;br /&gt;
                $this-&amp;gt;strategy = new StrategyExclaim();&lt;br /&gt;
            break;&lt;br /&gt;
            case &amp;quot;S&amp;quot;: &lt;br /&gt;
                $this-&amp;gt;strategy = new StrategyStars();&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    public function showBookTitle($book) {&lt;br /&gt;
      return $this-&amp;gt;strategy-&amp;gt;showTitle($book);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
interface StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
class StrategyCaps implements StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in) {&lt;br /&gt;
        $title = $book_in-&amp;gt;getTitle();&lt;br /&gt;
        $this-&amp;gt;titleCount++;&lt;br /&gt;
        return strtoupper ($title);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class StrategyExclaim implements StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in) {&lt;br /&gt;
        $title = $book_in-&amp;gt;getTitle();&lt;br /&gt;
        $this-&amp;gt;titleCount++;&lt;br /&gt;
        return Str_replace(' ','!',$title);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class StrategyStars implements StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in) {&lt;br /&gt;
        $title = $book_in-&amp;gt;getTitle();&lt;br /&gt;
        $this-&amp;gt;titleCount++;&lt;br /&gt;
        return Str_replace(' ','*',$title);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Book {&lt;br /&gt;
    private $author;&lt;br /&gt;
    private $title;&lt;br /&gt;
    function __construct($title_in, $author_in) {&lt;br /&gt;
        $this-&amp;gt;author = $author_in;&lt;br /&gt;
        $this-&amp;gt;title  = $title_in;&lt;br /&gt;
    }&lt;br /&gt;
    function getAuthor() {&lt;br /&gt;
        return $this-&amp;gt;author;&lt;br /&gt;
    }&lt;br /&gt;
    function getTitle() {&lt;br /&gt;
        return $this-&amp;gt;title;&lt;br /&gt;
    }&lt;br /&gt;
    function getAuthorAndTitle() {&lt;br /&gt;
        return $this-&amp;gt;getTitle() . ' by ' . $this-&amp;gt;getAuthor();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  writeln('BEGIN TESTING STRATEGY PATTERN');&lt;br /&gt;
  writeln('');&lt;br /&gt;
&lt;br /&gt;
  $book = new Book('PHP for Cats','Larry Truett');&lt;br /&gt;
 &lt;br /&gt;
  $strategyContextC = new StrategyContext('C');&lt;br /&gt;
  $strategyContextE = new StrategyContext('E');&lt;br /&gt;
  $strategyContextS = new StrategyContext('S');&lt;br /&gt;
 &lt;br /&gt;
  writeln('test 1 - show name context C');&lt;br /&gt;
  writeln($strategyContextC-&amp;gt;showBookTitle($book));&lt;br /&gt;
  writeln('');&lt;br /&gt;
&lt;br /&gt;
  writeln('test 2 - show name context E');&lt;br /&gt;
  writeln($strategyContextE-&amp;gt;showBookTitle($book));&lt;br /&gt;
  writeln('');&lt;br /&gt;
 &lt;br /&gt;
  writeln('test 3 - show name context S');&lt;br /&gt;
  writeln($strategyContextS-&amp;gt;showBookTitle($book));&lt;br /&gt;
  writeln('');&lt;br /&gt;
&lt;br /&gt;
  writeln('END TESTING STRATEGY PATTERN');&lt;br /&gt;
&lt;br /&gt;
  function writeln($line_in) {&lt;br /&gt;
    echo $line_in.&amp;quot;&amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code replaces the spaces in a title with another character based upon the input received from the instantiation.&lt;br /&gt;
&lt;br /&gt;
This code uses a context class that will identify the strategy to be used based upon a parameter given at instantiation.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold:&lt;br /&gt;
&lt;br /&gt;
1.  Dynamic languages have a clear and distinct advantage over static languages in general.  There are are not as many language limitations, a smaller amount of bookkeeping of objects and classes is needed, and design is not class restricted.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.  Ruby specific features such as duck typing and code blocks.&lt;br /&gt;
&lt;br /&gt;
With both of these advantages, Ruby has the ability to utilize the Strategy Pattern quickly and cleanly.  Ruby has a distinct advantage because of its built in features and because it is dynamically typed.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
(1) Freeman, Eric &amp;amp; Freeman, Elisabeth. &amp;lt;i&amp;gt;Head First Design Patterns&amp;lt;/i&amp;gt;. O'Reilly, 2004.&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) Olsen, Russ. &amp;lt;i&amp;gt;Design Patterns in Ruby&amp;lt;/i&amp;gt;. Addison-Wesley Professional, 2007.&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37997</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37997"/>
		<updated>2010-10-15T01:29:04Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is one of the most common [http://en.wikipedia.org/wiki/Design_pattern_%28computer_science%29 design patterns].  Its main idea is to define algorithms into familial groupings.  The idea is to encapsulate each algorithm, then make those algorithms interchangeable.  The Strategy design pattern allows each of the algorithms to differ autonomously from the various clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  This allows those clients to be [http://en.wikipedia.org/wiki/Coupling_%28computer_science%29 coupled] to an interface not an implementation.  At any time, the system can be expanded to allow multiple client implementations without changing the interface.  As you can see in the diagram  below, the client communicates with the interface, which then chooses the implementation based upon its strategy.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:diagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
There are many real life examples of this design pattern in operation today.  One that comes to mind would be opening a file.  The interface is the Open command of some software.  The implementations would be each of the various file types supported by the software.  There would be an implementation for text file, an implementation for a comma delimited file, an implementation for a bitmap, and so on.&lt;br /&gt;
&lt;br /&gt;
In the following sections we will compare how the Strategy pattern can be implemented in [http://en.wikipedia.org/wiki/Type_system static and dynamic languages], and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// 1. Define the interface of the algorithm&lt;br /&gt;
interface Strategy { public void solve(); }          &lt;br /&gt;
&lt;br /&gt;
// 2. Bury implementation&lt;br /&gt;
abstract class TemplateMethod1 implements Strategy { // 3. Template Method &lt;br /&gt;
   public void solve() {&lt;br /&gt;
      start();&lt;br /&gt;
      while (nextTry() &amp;amp;&amp;amp; ! isSolution())&lt;br /&gt;
         ;&lt;br /&gt;
      stop();&lt;br /&gt;
   }&lt;br /&gt;
   protected abstract void    start();&lt;br /&gt;
   protected abstract boolean nextTry();&lt;br /&gt;
   protected abstract boolean isSolution();&lt;br /&gt;
   protected abstract void    stop();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Impl1 extends TemplateMethod1 {&lt;br /&gt;
   private int state = 1;&lt;br /&gt;
   protected void start() {&lt;br /&gt;
     System.out.print( &amp;quot;start  &amp;quot; );&lt;br /&gt;
   }&lt;br /&gt;
   protected void stop() {&lt;br /&gt;
     System.out.println( &amp;quot;stop&amp;quot; );&lt;br /&gt;
   }&lt;br /&gt;
   protected boolean nextTry() {&lt;br /&gt;
      System.out.print( &amp;quot;nextTry-&amp;quot; + state++ + &amp;quot;  &amp;quot; );&lt;br /&gt;
      return true;&lt;br /&gt;
   }&lt;br /&gt;
   protected boolean isSolution() {&lt;br /&gt;
      System.out.print( &amp;quot;isSolution-&amp;quot; + (state == 3) + &amp;quot;  &amp;quot; );&lt;br /&gt;
      return (state == 3);&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// 2. Bury implementation&lt;br /&gt;
abstract class TemplateMethod2 implements Strategy { // 3. Template Method&lt;br /&gt;
   public void solve() {                             &lt;br /&gt;
      while (true) {&lt;br /&gt;
         preProcess();&lt;br /&gt;
         if (search()) break;&lt;br /&gt;
         postProcess();&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
   protected abstract void preProcess();&lt;br /&gt;
   protected abstract boolean search();&lt;br /&gt;
   protected abstract void postProcess();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Impl2 extends TemplateMethod2 {&lt;br /&gt;
   private int state = 1;&lt;br /&gt;
   protected void    preProcess()  { System.out.print( &amp;quot;preProcess  &amp;quot; ); }&lt;br /&gt;
   protected void    postProcess() { System.out.print( &amp;quot;postProcess  &amp;quot; ); }&lt;br /&gt;
   protected boolean search() {&lt;br /&gt;
      System.out.print( &amp;quot;search-&amp;quot; + state++ + &amp;quot;  &amp;quot; );&lt;br /&gt;
      return state == 3 ? true : false;&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
// 4. Clients couple strictly to the interface&lt;br /&gt;
public class StrategyDemo {&lt;br /&gt;
   public static void clientCode( Strategy strat ) {&lt;br /&gt;
     strat.solve();&lt;br /&gt;
   }&lt;br /&gt;
   public static void main( String[] args ) {&lt;br /&gt;
      Strategy[] algorithms = { new Impl1(), new Impl2() };&lt;br /&gt;
      for (int i=0; i &amp;lt; algorithms.length; i++) {&lt;br /&gt;
         clientCode( algorithms[i] );&lt;br /&gt;
      }&lt;br /&gt;
   }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code identifies an interface for the related algorithms as shown in section 1, defines classes to implement the individual algorithms as shown in section 2, and shows the client coupling to the interface as shown in section 4.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;iostream.h&amp;gt;&lt;br /&gt;
#include &amp;lt;fstream.h&amp;gt;&lt;br /&gt;
#include &amp;lt;string.h&amp;gt;&lt;br /&gt;
&lt;br /&gt;
class Strategy;&lt;br /&gt;
&lt;br /&gt;
class TestBed&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    enum StrategyType&lt;br /&gt;
    {&lt;br /&gt;
        Dummy, Left, Right, Center&lt;br /&gt;
    };&lt;br /&gt;
    TestBed()&lt;br /&gt;
    {&lt;br /&gt;
        strategy_ = NULL;&lt;br /&gt;
    }&lt;br /&gt;
    void setStrategy(int type, int width);&lt;br /&gt;
    void doIt();&lt;br /&gt;
  private:&lt;br /&gt;
    Strategy *strategy_;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    Strategy(int width): width_(width){}&lt;br /&gt;
    void format()&lt;br /&gt;
    {&lt;br /&gt;
        char line[80], word[30];&lt;br /&gt;
        ifstream inFile(&amp;quot;quote.txt&amp;quot;, ios::in);&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
&lt;br /&gt;
        inFile &amp;gt;&amp;gt; word;&lt;br /&gt;
        strcat(line, word);&lt;br /&gt;
        while (inFile &amp;gt;&amp;gt; word)&lt;br /&gt;
        {&lt;br /&gt;
            if (strlen(line) + strlen(word) + 1 &amp;gt; width_)&lt;br /&gt;
              justify(line);&lt;br /&gt;
            else&lt;br /&gt;
              strcat(line, &amp;quot; &amp;quot;);&lt;br /&gt;
            strcat(line, word);&lt;br /&gt;
        }&lt;br /&gt;
        justify(line);&lt;br /&gt;
    }&lt;br /&gt;
  protected:&lt;br /&gt;
    int width_;&lt;br /&gt;
  private:&lt;br /&gt;
    virtual void justify(char *line) = 0;&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class LeftStrategy: public Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    LeftStrategy(int width): Strategy(width){}&lt;br /&gt;
  private:&lt;br /&gt;
     /* virtual */void justify(char *line)&lt;br /&gt;
    {&lt;br /&gt;
        cout &amp;lt;&amp;lt; line &amp;lt;&amp;lt; endl;&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class RightStrategy: public Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    RightStrategy(int width): Strategy(width){}&lt;br /&gt;
  private:&lt;br /&gt;
     /* virtual */void justify(char *line)&lt;br /&gt;
    {&lt;br /&gt;
        char buf[80];&lt;br /&gt;
        int offset = width_ - strlen(line);&lt;br /&gt;
        memset(buf, ' ', 80);&lt;br /&gt;
        strcpy(&amp;amp;(buf[offset]), line);&lt;br /&gt;
        cout &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
class CenterStrategy: public Strategy&lt;br /&gt;
{&lt;br /&gt;
  public:&lt;br /&gt;
    CenterStrategy(int width): Strategy(width){}&lt;br /&gt;
  private:&lt;br /&gt;
     /* virtual */void justify(char *line)&lt;br /&gt;
    {&lt;br /&gt;
        char buf[80];&lt;br /&gt;
        int offset = (width_ - strlen(line)) / 2;&lt;br /&gt;
        memset(buf, ' ', 80);&lt;br /&gt;
        strcpy(&amp;amp;(buf[offset]), line);&lt;br /&gt;
        cout &amp;lt;&amp;lt; buf &amp;lt;&amp;lt; endl;&lt;br /&gt;
        line[0] = '\0';&lt;br /&gt;
    }&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
void TestBed::setStrategy(int type, int width)&lt;br /&gt;
{&lt;br /&gt;
  delete strategy_;&lt;br /&gt;
  if (type == Left)&lt;br /&gt;
    strategy_ = new LeftStrategy(width);&lt;br /&gt;
  else if (type == Right)&lt;br /&gt;
    strategy_ = new RightStrategy(width);&lt;br /&gt;
  else if (type == Center)&lt;br /&gt;
    strategy_ = new CenterStrategy(width);&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
void TestBed::doIt()&lt;br /&gt;
{&lt;br /&gt;
  strategy_-&amp;gt;format();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
int main()&lt;br /&gt;
{&lt;br /&gt;
  TestBed test;&lt;br /&gt;
  int answer, width;&lt;br /&gt;
  cout &amp;lt;&amp;lt; &amp;quot;Exit(0) Left(1) Right(2) Center(3): &amp;quot;;&lt;br /&gt;
  cin &amp;gt;&amp;gt; answer;&lt;br /&gt;
  while (answer)&lt;br /&gt;
  {&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;Width: &amp;quot;;&lt;br /&gt;
    cin &amp;gt;&amp;gt; width;&lt;br /&gt;
    test.setStrategy(answer, width);&lt;br /&gt;
    test.doIt();&lt;br /&gt;
    cout &amp;lt;&amp;lt; &amp;quot;Exit(0) Left(1) Right(2) Center(3): &amp;quot;;&lt;br /&gt;
    cin &amp;gt;&amp;gt; answer;&lt;br /&gt;
  }&lt;br /&gt;
  return 0;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The code above accepts input of how to justify the string and the width of the string.  It then calls the appropriate class based upon the justification input.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example:]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class StrategyContext {&lt;br /&gt;
    private $strategy = NULL; &lt;br /&gt;
    //bookList is not instantiated at construct time&lt;br /&gt;
    public function __construct($strategy_ind_id) {&lt;br /&gt;
        switch ($strategy_ind_id) {&lt;br /&gt;
            case &amp;quot;C&amp;quot;: &lt;br /&gt;
                $this-&amp;gt;strategy = new StrategyCaps();&lt;br /&gt;
            break;&lt;br /&gt;
            case &amp;quot;E&amp;quot;: &lt;br /&gt;
                $this-&amp;gt;strategy = new StrategyExclaim();&lt;br /&gt;
            break;&lt;br /&gt;
            case &amp;quot;S&amp;quot;: &lt;br /&gt;
                $this-&amp;gt;strategy = new StrategyStars();&lt;br /&gt;
            break;&lt;br /&gt;
        }&lt;br /&gt;
    }&lt;br /&gt;
    public function showBookTitle($book) {&lt;br /&gt;
      return $this-&amp;gt;strategy-&amp;gt;showTitle($book);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
interface StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in);&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
class StrategyCaps implements StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in) {&lt;br /&gt;
        $title = $book_in-&amp;gt;getTitle();&lt;br /&gt;
        $this-&amp;gt;titleCount++;&lt;br /&gt;
        return strtoupper ($title);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class StrategyExclaim implements StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in) {&lt;br /&gt;
        $title = $book_in-&amp;gt;getTitle();&lt;br /&gt;
        $this-&amp;gt;titleCount++;&lt;br /&gt;
        return Str_replace(' ','!',$title);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class StrategyStars implements StrategyInterface {&lt;br /&gt;
    public function showTitle($book_in) {&lt;br /&gt;
        $title = $book_in-&amp;gt;getTitle();&lt;br /&gt;
        $this-&amp;gt;titleCount++;&lt;br /&gt;
        return Str_replace(' ','*',$title);&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class Book {&lt;br /&gt;
    private $author;&lt;br /&gt;
    private $title;&lt;br /&gt;
    function __construct($title_in, $author_in) {&lt;br /&gt;
        $this-&amp;gt;author = $author_in;&lt;br /&gt;
        $this-&amp;gt;title  = $title_in;&lt;br /&gt;
    }&lt;br /&gt;
    function getAuthor() {&lt;br /&gt;
        return $this-&amp;gt;author;&lt;br /&gt;
    }&lt;br /&gt;
    function getTitle() {&lt;br /&gt;
        return $this-&amp;gt;title;&lt;br /&gt;
    }&lt;br /&gt;
    function getAuthorAndTitle() {&lt;br /&gt;
        return $this-&amp;gt;getTitle() . ' by ' . $this-&amp;gt;getAuthor();&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
  writeln('BEGIN TESTING STRATEGY PATTERN');&lt;br /&gt;
  writeln('');&lt;br /&gt;
&lt;br /&gt;
  $book = new Book('PHP for Cats','Larry Truett');&lt;br /&gt;
 &lt;br /&gt;
  $strategyContextC = new StrategyContext('C');&lt;br /&gt;
  $strategyContextE = new StrategyContext('E');&lt;br /&gt;
  $strategyContextS = new StrategyContext('S');&lt;br /&gt;
 &lt;br /&gt;
  writeln('test 1 - show name context C');&lt;br /&gt;
  writeln($strategyContextC-&amp;gt;showBookTitle($book));&lt;br /&gt;
  writeln('');&lt;br /&gt;
&lt;br /&gt;
  writeln('test 2 - show name context E');&lt;br /&gt;
  writeln($strategyContextE-&amp;gt;showBookTitle($book));&lt;br /&gt;
  writeln('');&lt;br /&gt;
 &lt;br /&gt;
  writeln('test 3 - show name context S');&lt;br /&gt;
  writeln($strategyContextS-&amp;gt;showBookTitle($book));&lt;br /&gt;
  writeln('');&lt;br /&gt;
&lt;br /&gt;
  writeln('END TESTING STRATEGY PATTERN');&lt;br /&gt;
&lt;br /&gt;
  function writeln($line_in) {&lt;br /&gt;
    echo $line_in.&amp;quot;&amp;lt;br/&amp;gt;&amp;quot;;&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold:&lt;br /&gt;
&lt;br /&gt;
1.  Dynamic languages have a clear and distinct advantage over static languages in general.  There are are not as many language limitations, a smaller amount of bookkeeping of objects and classes is needed, and design is not class restricted.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.  Ruby specific features such as duck typing and code blocks.&lt;br /&gt;
&lt;br /&gt;
With both of these advantages, Ruby has the ability to utilize the Strategy Pattern quickly and cleanly.  Ruby has a distinct advantage because of its built in features and because it is dynamically typed.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
(1) Freeman, Eric &amp;amp; Freeman, Elisabeth. &amp;lt;i&amp;gt;Head First Design Patterns&amp;lt;/i&amp;gt;. O'Reilly, 2004.&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) Olsen, Russ. &amp;lt;i&amp;gt;Design Patterns in Ruby&amp;lt;/i&amp;gt;. Addison-Wesley Professional, 2007.&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37987</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37987"/>
		<updated>2010-10-15T00:32:30Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is one of the most common design patterns.  Its main idea is to define algorithms into familial groupings.  The idea is to encapsulate each algorithm, then make those algorithms interchangeable.  The Strategy design pattern allows each of the algorithms to differ autonomously from the various clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  This allows those clients to be coupled to an interface not an implementation.  At any time, the system can be expanded to allow multiple client implementations without changing the interface.  As you can see in the diagram  below, the client communicates with the interface, which then chooses the implementation based upon its strategy.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Image:diagram.jpg]]&lt;br /&gt;
&lt;br /&gt;
There are many real life examples of this design pattern being used.  One that comes to mind would be opening a file.  The interface is the Open command of some software.  The implementations would be each of the various file types supported by the software.  There would be an implementation for text file, an implementation for a comma delimited file, an implementation for a bitmap, and so on.&lt;br /&gt;
&lt;br /&gt;
In the following sections we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold:&lt;br /&gt;
&lt;br /&gt;
1.  Dynamic languages have a clear and distinct advantage over static languages in general.  There are are not as many language limitations, a smaller amount of bookkeeping of objects and classes is needed, and design is not class restricted.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.  Ruby specific features such as duck typing and code blocks.&lt;br /&gt;
&lt;br /&gt;
With both of these advantages, Ruby has the ability to utilize the Strategy Pattern quickly and cleanly.  Ruby has a distinct advantage because of its built in features and because it is dynamically typed.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
(1) Freeman, Eric &amp;amp; Freeman, Elisabeth. &amp;lt;i&amp;gt;Head First Design Patterns&amp;lt;/i&amp;gt;. O'Reilly, 2004.&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) Olsen, Russ. &amp;lt;i&amp;gt;Design Patterns in Ruby&amp;lt;/i&amp;gt;. Addison-Wesley Professional, 2007.&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Diagram.jpg&amp;diff=37986</id>
		<title>File:Diagram.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Diagram.jpg&amp;diff=37986"/>
		<updated>2010-10-15T00:16:05Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37644</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37644"/>
		<updated>2010-10-07T02:09:39Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  Here we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold:&lt;br /&gt;
&lt;br /&gt;
1.  Dynamic languages have a clear and distinct advantage over static languages in general.  There are are not as many language limitations, a smaller amount of bookkeeping of objects and classes is needed, and design is not class restricted.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.  Ruby specific features such as duck typing and code blocks.&lt;br /&gt;
&lt;br /&gt;
With both of these advantages, Ruby has the ability to utilize the Strategy Pattern quickly and cleanly.  Ruby has a distinct advantage because of its built in features and because it is dynamically typed.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
(1) Freeman, Eric &amp;amp; Freeman, Elisabeth. &amp;lt;i&amp;gt;Head First Design Patterns&amp;lt;/i&amp;gt;. O'Reilly, 2004.&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) Olsen, Russ. &amp;lt;i&amp;gt;Design Patterns in Ruby&amp;lt;/i&amp;gt;. Addison-Wesley Professional, 2007.&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37634</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37634"/>
		<updated>2010-10-07T02:01:32Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  Here we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold:&lt;br /&gt;
&lt;br /&gt;
1.  Dynamic languages have a clear and distinct advantage over static languages in general.  There are are not as many language limitations, a smaller amount of bookkeeping of objects and classes is needed, and design is not class restricted.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.  Ruby specific features such as duck typing and code blocks.&lt;br /&gt;
&lt;br /&gt;
With both of these advantages, Ruby has the ability to utilize the Strategy Pattern quickly and cleanly.  Ruby has a distinct advantage because of its built in features and because it is dynamically typed.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) &amp;lt;u&amp;gt;Design Patterns in Ruby&amp;lt;/u&amp;gt; Olsen&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37618</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37618"/>
		<updated>2010-10-07T01:57:23Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  Here we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold:&lt;br /&gt;
&lt;br /&gt;
1.  Dynamic languages have a clear and distinct advantage over static languages in general.  There are are not as many language limitations, a smaller amount of bookkeeping of objects and classes is needed, and design is not class restricted.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2.  Ruby specific features such as duck typing and code blocks.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) &amp;lt;u&amp;gt;Design Patterns in Ruby&amp;lt;/u&amp;gt; Olsen&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37616</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37616"/>
		<updated>2010-10-07T01:56:38Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  Here we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold.  &lt;br /&gt;
1.  Dynamic languages have a clear and distinct advantage over static languages in general.  There are are not as many language limitations, a smaller amount of bookkeeping of objects and classes is needed, and design is not class restricted.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;&lt;br /&gt;
2.  Ruby specific features such as duck typing and code blocks.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) &amp;lt;u&amp;gt;Design Patterns in Ruby&amp;lt;/u&amp;gt; Olsen&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37589</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37589"/>
		<updated>2010-10-07T01:47:16Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  Here we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
As in the PHP example, this code uses a context class that will identify the strategy based upon an input parameter.&lt;br /&gt;
&lt;br /&gt;
== What is Ruby's advantage? ==&lt;br /&gt;
Ruby's advantage with the Strategy pattern is two fold.  Dynamic languages have a clear and distinct advantage over static languages with regards to the Strategy pattern.  The ease of &lt;br /&gt;
== References ==&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) &amp;lt;u&amp;gt;Design Patterns in Ruby&amp;lt;/u&amp;gt; Olsen&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37555</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37555"/>
		<updated>2010-10-07T01:31:58Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  Here we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon an input parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages.&amp;lt;sup&amp;gt;3&amp;lt;/sup&amp;gt;  Each version of the algorithm is implemented as a different object which is then varied by supplying alternative strategy objects to the context.&amp;lt;sup&amp;gt;5&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ruby ===&lt;br /&gt;
&lt;br /&gt;
class Context&lt;br /&gt;
  def initialize(&amp;amp;strategy)&lt;br /&gt;
    @strategy = strategy&lt;br /&gt;
  end&lt;br /&gt;
 &lt;br /&gt;
  def execute&lt;br /&gt;
    @strategy.call&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
a = Context.new { puts 'One strategy for the context' }&lt;br /&gt;
a.execute&lt;br /&gt;
 &lt;br /&gt;
b = Context.new { puts 'Another strategy for the context' }&lt;br /&gt;
b.execute&lt;br /&gt;
 &lt;br /&gt;
c = Context.new { puts 'An additional strategy for the context' }&lt;br /&gt;
c.execute&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;br /&gt;
&lt;br /&gt;
(5) &amp;lt;u&amp;gt;Design Patterns in Ruby&amp;lt;/u&amp;gt; Olsen&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37430</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=37430"/>
		<updated>2010-10-07T00:11:06Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients that use them.&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;gt;  Here we will compare how the Strategy pattern can be implemented in static and dynamic languages, and then explore if Ruby has an advantage with this design pattern because of its dynamic nature or because of the features of Ruby.&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc.&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;  The code in the hyperlinks below show various languages implementing the Strategy design patterns.&lt;br /&gt;
&lt;br /&gt;
=== Java ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/java/1 Java Strategy design pattern example.]&lt;br /&gt;
This code identifies an interface for the related algorithms and shows the use of classes to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== C++ ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/cpp/1 C++ Strategy design pattern example.]&lt;br /&gt;
This code uses a base class as the interface and &amp;quot;subclasses&amp;quot; to implement the individual algorithms.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== PHP ===&lt;br /&gt;
[http://sourcemaking.com/design_patterns/strategy/php PHP Strategy design pattern example.]&lt;br /&gt;
This code uses a context class that will identify the strategy based upon a parameter.&amp;lt;sup&amp;gt;4&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages. &amp;lt;sup&amp;gt;(3)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;br /&gt;
&lt;br /&gt;
(4) [http://sourcemaking.com/design_patterns/strategy Strategy Design Patterns]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36888</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36888"/>
		<updated>2010-10-06T01:51:43Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Java Example:===&lt;br /&gt;
&lt;br /&gt;
===C++ Example:===&lt;br /&gt;
&lt;br /&gt;
===Python Example:===&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages. &amp;lt;sup&amp;gt;(3)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36887</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36887"/>
		<updated>2010-10-06T01:48:17Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
===Java Example:===&lt;br /&gt;
&lt;br /&gt;
===C++ Example:===&lt;br /&gt;
&lt;br /&gt;
===Python Example:===&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages. &amp;lt;sup&amp;gt;(3)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36885</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36885"/>
		<updated>2010-10-06T01:46:30Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
Java Example:&lt;br /&gt;
C++ Example:&lt;br /&gt;
Python Example:&lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages. &amp;lt;sup&amp;gt;(3)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36884</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36884"/>
		<updated>2010-10-06T01:45:07Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in dynamic languages requires a variable that has a function as the value.  Separate classes are not needed in dynamic languages. &amp;lt;sup&amp;gt;(3)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;br /&gt;
&lt;br /&gt;
(3) [http://norvig.com/design-patterns/ppframe.htm Design Patterns in Dynamic Programming]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36881</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36881"/>
		<updated>2010-10-06T01:41:14Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by extending classes, implementing interfaces, instantiating objects, invoking methods, etc. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36878</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36878"/>
		<updated>2010-10-06T01:35:37Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by ''uses'' and ''inherits'' statements. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ  OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36877</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36877"/>
		<updated>2010-10-06T01:33:18Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by ''uses'' and ''inherits'' statements. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ OBJECTED-ORIENTED DESIGN PATTERN DETECTION USING&lt;br /&gt;
STATIC AND DYNAMIC ANALYSIS IN JAVA SOFTWARE]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36876</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36876"/>
		<updated>2010-10-06T01:30:09Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. &amp;lt;sup&amp;gt;(1)&amp;lt;/sup&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Static Languages ==&lt;br /&gt;
&lt;br /&gt;
The use of the Strategy design pattern in static languages requires the relations between classes and interfaces to be referenced by ''uses'' and ''inherits'' statements. &amp;lt;sup&amp;gt;(2)&amp;lt;/sup&amp;gt;  &lt;br /&gt;
&lt;br /&gt;
== Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
(1) &amp;lt;u&amp;gt;Head First Design Patterns&amp;lt;/u&amp;gt; Freeman &amp;amp; Freeman&lt;br /&gt;
&lt;br /&gt;
(2) [http://www.google.com/url?sa=t&amp;amp;source=web&amp;amp;cd=6&amp;amp;ved=0CDMQFjAF&amp;amp;url=http%3A%2F%2Fmb-pde.googlecode.com%2Ffiles%2FMasterThesis.pdf&amp;amp;rct=j&amp;amp;q=strategy%20design%20pattern%20static&amp;amp;ei=4MirTMuIJ8L78Aah8rSFBw&amp;amp;usg=AFQjCNHmD-Y7ojHKraML4IO3khrRrv-Ljw&amp;amp;sig2=AratIpJa6hit5xsOs6MJRQ]&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36840</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36840"/>
		<updated>2010-10-06T00:20:01Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== The Strategy Pattern in Static and Dynamic Languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them. (1)&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36835</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36835"/>
		<updated>2010-10-06T00:17:04Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
== The Strategy pattern in static and dynamic languages ==&lt;br /&gt;
&lt;br /&gt;
The Strategy pattern is a common design pattern that defines algorithms into familial groupings.  It encapsulates the individual algorithms and makes those algorithms interchangeable.  Strategy allows the algorithms to differ autonomously from the clients who use them.&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36828</id>
		<title>CSC/ECE 517 Fall 2010/ch3 3h ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2010/ch3_3h_ss&amp;diff=36828"/>
		<updated>2010-10-06T00:06:15Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The Strategy pattern in static and dynamic languages&lt;br /&gt;
&lt;br /&gt;
The text book, Head First Design Patterns, gives the best definition of the Strategy design pattern:&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21894</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 9 ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21894"/>
		<updated>2009-09-25T19:41:37Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: /* [http://www.gaiaflashframework.com/ Gaia] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Scaffolding in Web application frameworks&lt;br /&gt;
&lt;br /&gt;
''Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?''&lt;br /&gt;
&lt;br /&gt;
=The concept of Scaffolding=&lt;br /&gt;
Scaffolding in a [http://en.wikipedia.org/wiki/Web_application_framework web application framework] allows a software developer to create data-driven web applications quickly by automating [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] architecture of the application.  The pages have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order  to achieve a final product. &lt;br /&gt;
&lt;br /&gt;
For the young developer, scaffolding has the advantage of quickly and easily building a functioning database-driven application. It also shows the developer what kind of methods and logic must be present within the application's controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications. &lt;br /&gt;
&lt;br /&gt;
For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this, the experienced developer can customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated &amp;quot;build as a rough draft&amp;quot; option from which they will write their own structure. &lt;br /&gt;
&lt;br /&gt;
Scaffolding has become very popular within the web development community and is showing up in several web frameworks. This is mostly because it increases work flow and allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, .NET, and Flash. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15], [http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 18]]&lt;br /&gt;
&lt;br /&gt;
==Dynamic Scaffolding==&lt;br /&gt;
Dynamic Scaffolding generates the data interfaces at run time. With very little written code and no necessary knowledge of the underpinning data interfaces, a developer could get a web application up and running in very little time and with little effort by using Dynamic Scaffolding. &lt;br /&gt;
&lt;br /&gt;
Young developers loved it because they could get a web application up and running without having to know the gory details, or having to know much about the framework they were working with. Many experienced developers also liked it because it allowed them to quickly prototype an application and wow clients as they saw the product come to life in a matter of minutes. &lt;br /&gt;
&lt;br /&gt;
However, there were issues with Dynamic Scaffolding. Dynamic Scaffolding creates the data interfaces at run time causing the interfaces to be hidden from the developer.  This left the developer clueless regarding the implementation. This lack of knowledge created problems. One problem was that the developer did not learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code created was hidden which maked it very difficult to access and work with. Because of these issues, many application development purists see Dynamic Scaffolding as doing more harm than good. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
==Scaffold Generation==&lt;br /&gt;
Scaffold Generation is another approach to scaffolding that generates the data interfaces for a developer, but it also gives them access to the generated code. This process is a bit less automated than Dynamic Scaffolding because changes to the model will not be automatically updated elsewhere in the application. What developers lose in automation, they gain in having a working site filled with examples from which to learn from. Developers also have immediate access to the data interfaces so they can make modifications quickly and efficiently. Furthermore, Scaffold Generation has the advantage of reducing the learning curve from a scaffold created controller to a custom one. Dynamic Scaffolding was easy for a developer to create a simple CRUD interface, but there was a large gap between that step and a custom interface to handle a specific job with specific needs. This gap is not nearly as wide now since the developer has access to the code created through Scaffold Generation and can use it as a foundation to branch out into custom interpretations of the simple CRUD scenario. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Ruby on Rails=&lt;br /&gt;
Scaffolding became popular in [http://rubyonrails.org/ Ruby on Rails] and has since moved on to several other frameworks. The first generation of Ruby on Rails supported Dynamic Scaffolding. Scaffold Generation was also supported, however books, demos, and tutorials based on the first generation of Ruby on Rails largely omitted this fact. Beginning with the second generation of Ruby on Rails, Dynamic Scaffolding was no longer supported and Scaffolding Generation took center stage.&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 1.x]==&lt;br /&gt;
In the first generation of Ruby on Rails a developer would generate a modal, then use a migrate file to create layout columns in the model's database table. After that they would generate a controller and add scaffolding. A scaffolding example in Ruby on Rails 1.x would look like the example below.[[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scaffold :modelname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 2.x]==&lt;br /&gt;
Ruby on Rails 2.x may have taken away Dynamic Scaffolding but it made Scaffold Generation simpler and involving less steps. This is due to being able to create your model, migrate file, and column layout all in one step. A scaffolding example in Ruby on Rails 2.x would look like the example below. [[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ./script/generate scaffold ModelName field1:type field2:type field3:type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this script is executed the generator will build 14 files in your application, along with some folders, and edit one more. &lt;br /&gt;
Here’s a quick overview of what it creates:&lt;br /&gt;
&lt;br /&gt;
*The model with the name you specified as ModelName&lt;br /&gt;
*Migration script to create the ModelNames table in your database&lt;br /&gt;
*A set of views for add, edit, display, and delete&lt;br /&gt;
*A view to control the overall look and feel of the views&lt;br /&gt;
*A cascading style sheet to make the scaffold views look better&lt;br /&gt;
*the ModalName controller&lt;br /&gt;
*Testing harness for the ModalName controller&lt;br /&gt;
*Helper functions&lt;br /&gt;
*Routing information&lt;br /&gt;
*Unit testing harness for ModalName&lt;br /&gt;
*Unit testing harness for ModalName helper&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Python=&lt;br /&gt;
==[http://www.djangoproject.com/ Django]==&lt;br /&gt;
Django is a high-level [http://www.python.org/ python] web framework that was written in a newsroom to provide as much automation as possible for web developers under heavy deadlines. In Django you find scaffolding in what it calls the ''admin interface''. The idea behind the ''admin interface'' is that user pages differ greatly from client to client, but administrative tools largely remain the same and can be very repetitive to develop over and over; therefore it makes since to create a tool that will create these types of applications for us. By hooking to the metadata in your model, a fully functional web application can immediately be used as an administration tool to help manage your site. The way the ''admin interface'' is implemented is: for each model you want to associate with the admin interface, you mark that model. Then in your url.py file you add the url for the ''admin interface''. This would look like the example below:[[http://www.djangobook.com/ 14]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 urlpatterns = patterns('',&lt;br /&gt;
    (r'^admin/', include('django.contrib.admin.urls')),&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of scaffolding in Django quickly and easily created an entire administration application.&lt;br /&gt;
&lt;br /&gt;
This is accomplished mainly in two files. They are called scaffold.py and meta_scaffold.py. The scaffold.py file is used to generate a particular model. The meta_scaffold.py file is used to generate a template for all of the models.[[http://code.djangoproject.com/wiki/Scaffolding 17]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in PHP= &lt;br /&gt;
==[http://cakephp.org/ CakePHP]==&lt;br /&gt;
When Ruby on Rails began to take off, many frameworks decided to model themselves after what Ruby on Rails was doing. CakePHP is a web development framework written in [http://www.php.net/ PHP] that has incorporated many of the same concepts and design principles as Ruby on Rails. Because of this CakePHP prides itself on supporting scaffolding.[[http://en.wikipedia.org/wiki/CakePHP 7]]&lt;br /&gt;
&lt;br /&gt;
CakePHP really has two types of scaffolding, one that it is actually called Scaffolding and another that is called Bake. What CakePHP calls Scaffolding is really like Dynamic Scaffolding. Here you have a model and then in your controller you declare a scaffold variable. CakePHP handles the rest behind the scenes. An example would look like the code below: [[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm 4], [http://book.cakephp.org/view/105/Scaffolding 5]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyController extends AppController {&lt;br /&gt;
    var $scaffold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Bake console with CakePHP generates code for the models, views, and controllers. Bake works like Scaffold Generation and creates a fully functional structure a developer can learn from or build upon. An example would look like the code below:[[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ 6]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cake bake model [model name]&lt;br /&gt;
cake bake controller [controller name]&lt;br /&gt;
cake bake view [view name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Java=&lt;br /&gt;
==[http://grails.org/ GRails]==&lt;br /&gt;
GRails is an open source framework that integrates with a programming environment called [http://groovy.codehaus.org/ Groovy].  Groovy is based on the [http://www.java.com/en/ Java] platform. GRails supports Dynamic Scaffolding, however, it does allow a developer to access the generated code if they want. If a developer tells GRails to install templates, the current scaffold code will be created in a template file that can be modified to fit specific needs. GRails supports other Java technologies such as Spring and Hibernate. An example snippet of scaffoldng in GRails would look like the example below:[[http://en.wikipedia.org/wiki/Grails_(framework) 9], [http://grails.org/Scaffolding 10]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class myController{&lt;br /&gt;
 def scaffold=true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to edit the templates generated by the Dynamic Scaffolding, you must install them. The installed templates would be stored in a new folder called 'templates' in the '/src' directory. An example would look like the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grails install-templates&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A popular tactic is to generate the templates of the scaffolding before letting the scaffold create the views. This will allow the developer to edit the templates to meet the layout requirements of the project. That way, when the scaffold generates the views, all the views will adhere to those layout requirements without having to modify each one. [[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates 16]]&lt;br /&gt;
&lt;br /&gt;
For a short video tutorial on scaffolding in GRails please visit the following link: [[http://www.youtube.com/watch?v=LWoCfTyWG_E 19]]&lt;br /&gt;
&lt;br /&gt;
==[http://appfuse.org/display/APF/Home Appfuse]==&lt;br /&gt;
Appfuse is an open source project and application. It uses open source tools built on the java platform to help a developer build web applications quickly. Appfuse is not actually a framework. Appfuse is more of a tool for code generation that can be used with other Java web frameworks. It can be integrated into other open source technolgies such as Spring, Hibernate, and Struts.[[http://en.wikipedia.org/wiki/AppFuse 8]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in .NET=&lt;br /&gt;
[http://www.microsoft.com/NET/ .NET] is a Microsoft framework that can be used to develop applications on machines running Microsoft software. In .NET Microsoft includes scaffolding as part of a broader structure it calls Dynamic Data. Dynamic Data uses LINQ to SQL for it's data access from which it builds corresponding controllers and views. Dynamic Data was originally part of a project called Blinq but that project was terminated and Dynamic Data became a part of .NET in its 3.5 extensions package. An example of setting up a scaffold in .NET would look like the example below.[[http://www.infoq.com/news/2007/12/aspnet-dynamic-data 11]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ScaffoldTable(true)&lt;br /&gt;
public partial class myClass{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Flash=&lt;br /&gt;
==[http://www.gaiaflashframework.com/ Gaia]==&lt;br /&gt;
Gaia is an open source front-end framework for the [http://www.adobe.com/products/flash/ Flash] programming environment. The term &amp;quot;front-end framework&amp;quot; means that no advanced knowledge of the Flash coding convention is required to use it allowing novice developers to use it. The fact that Gaia prides itself on requiring little to no code to get going is nothing new compared to other frameworks, however, what makes Gaia interesting is its support for [http://en.wikipedia.org/wiki/Search_engine_optimization SEO] (Search Engine Optimization) scaffolding. The way that SEO scaffolding works is it generates the XHTML pages for every SEO enabled page on the site. For each one of these XHTML pages, the copy for the developer's flash is included. This one file per page relationship makes it much easier for the developer to optimize his/her site for search engines. The scaffolding information is stored in a file called Scaffold.as. An example of accessing the scaffolding from a page would look like the example below:[[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ 12]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new Scaffold(this);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
1.[http://en.wikipedia.org/wiki/Scaffold_(programming) http://en.wikipedia.org/wiki/Scaffold_(programming)]&amp;lt;br/&amp;gt;&lt;br /&gt;
2.[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html]&amp;lt;br/&amp;gt;&lt;br /&gt;
3.[http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion]&amp;lt;br/&amp;gt;&lt;br /&gt;
4.[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm]&amp;lt;br/&amp;gt;&lt;br /&gt;
5.[http://book.cakephp.org/view/105/Scaffolding http://book.cakephp.org/view/105/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
6.[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/]&amp;lt;br/&amp;gt;&lt;br /&gt;
7.[http://en.wikipedia.org/wiki/CakePHP http://en.wikipedia.org/wiki/CakePHP]&amp;lt;br/&amp;gt;&lt;br /&gt;
8.[http://en.wikipedia.org/wiki/AppFuse http://en.wikipedia.org/wiki/AppFuse]&amp;lt;br/&amp;gt;&lt;br /&gt;
9.[http://en.wikipedia.org/wiki/Grails_(framework) http://en.wikipedia.org/wiki/Grails_(framework)]&amp;lt;br/&amp;gt;&lt;br /&gt;
10.[http://grails.org/Scaffolding http://grails.org/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
11.[http://www.infoq.com/news/2007/12/aspnet-dynamic-data http://www.infoq.com/news/2007/12/aspnet-dynamic-data]&amp;lt;br/&amp;gt;&lt;br /&gt;
12.[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/]&amp;lt;br/&amp;gt;&lt;br /&gt;
13.[http://en.wikipedia.org/wiki/Search_engine_optimization http://en.wikipedia.org/wiki/Search_engine_optimization]&amp;lt;br/&amp;gt;&lt;br /&gt;
14.[http://www.djangobook.com/ http://www.djangobook.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
15.[http://guides.rubyonrails.org/ http://guides.rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
16.[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates]&amp;lt;br/&amp;gt;&lt;br /&gt;
17.[http://code.djangoproject.com/wiki/Scaffolding http://code.djangoproject.com/wiki/Scaffolding]&lt;br /&gt;
&lt;br /&gt;
=Literature=&lt;br /&gt;
18.[http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 Agile Web Development with Rails]&lt;br /&gt;
&lt;br /&gt;
=Media=&lt;br /&gt;
19.[http://www.youtube.com/watch?v=LWoCfTyWG_E http://www.youtube.com/watch?v=LWoCfTyWG_E]&lt;br /&gt;
&lt;br /&gt;
=Official Sites=&lt;br /&gt;
[http://rubyonrails.org/ http://rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.djangoproject.com/ http://www.djangoproject.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://cakephp.org/ http://cakephp.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://appfuse.org/display/APF/Home http://appfuse.org/display/APF/Home]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://grails.org/ http://grails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/NET/ http://www.microsoft.com/NET/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.gaiaflashframework.com/ http://www.gaiaflashframework.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://groovy.codehaus.org/ http://groovy.codehaus.org/]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21893</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 9 ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21893"/>
		<updated>2009-09-25T19:39:16Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: /* Scaffolding in .NET */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Scaffolding in Web application frameworks&lt;br /&gt;
&lt;br /&gt;
''Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?''&lt;br /&gt;
&lt;br /&gt;
=The concept of Scaffolding=&lt;br /&gt;
Scaffolding in a [http://en.wikipedia.org/wiki/Web_application_framework web application framework] allows a software developer to create data-driven web applications quickly by automating [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] architecture of the application.  The pages have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order  to achieve a final product. &lt;br /&gt;
&lt;br /&gt;
For the young developer, scaffolding has the advantage of quickly and easily building a functioning database-driven application. It also shows the developer what kind of methods and logic must be present within the application's controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications. &lt;br /&gt;
&lt;br /&gt;
For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this, the experienced developer can customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated &amp;quot;build as a rough draft&amp;quot; option from which they will write their own structure. &lt;br /&gt;
&lt;br /&gt;
Scaffolding has become very popular within the web development community and is showing up in several web frameworks. This is mostly because it increases work flow and allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, .NET, and Flash. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15], [http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 18]]&lt;br /&gt;
&lt;br /&gt;
==Dynamic Scaffolding==&lt;br /&gt;
Dynamic Scaffolding generates the data interfaces at run time. With very little written code and no necessary knowledge of the underpinning data interfaces, a developer could get a web application up and running in very little time and with little effort by using Dynamic Scaffolding. &lt;br /&gt;
&lt;br /&gt;
Young developers loved it because they could get a web application up and running without having to know the gory details, or having to know much about the framework they were working with. Many experienced developers also liked it because it allowed them to quickly prototype an application and wow clients as they saw the product come to life in a matter of minutes. &lt;br /&gt;
&lt;br /&gt;
However, there were issues with Dynamic Scaffolding. Dynamic Scaffolding creates the data interfaces at run time causing the interfaces to be hidden from the developer.  This left the developer clueless regarding the implementation. This lack of knowledge created problems. One problem was that the developer did not learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code created was hidden which maked it very difficult to access and work with. Because of these issues, many application development purists see Dynamic Scaffolding as doing more harm than good. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
==Scaffold Generation==&lt;br /&gt;
Scaffold Generation is another approach to scaffolding that generates the data interfaces for a developer, but it also gives them access to the generated code. This process is a bit less automated than Dynamic Scaffolding because changes to the model will not be automatically updated elsewhere in the application. What developers lose in automation, they gain in having a working site filled with examples from which to learn from. Developers also have immediate access to the data interfaces so they can make modifications quickly and efficiently. Furthermore, Scaffold Generation has the advantage of reducing the learning curve from a scaffold created controller to a custom one. Dynamic Scaffolding was easy for a developer to create a simple CRUD interface, but there was a large gap between that step and a custom interface to handle a specific job with specific needs. This gap is not nearly as wide now since the developer has access to the code created through Scaffold Generation and can use it as a foundation to branch out into custom interpretations of the simple CRUD scenario. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Ruby on Rails=&lt;br /&gt;
Scaffolding became popular in [http://rubyonrails.org/ Ruby on Rails] and has since moved on to several other frameworks. The first generation of Ruby on Rails supported Dynamic Scaffolding. Scaffold Generation was also supported, however books, demos, and tutorials based on the first generation of Ruby on Rails largely omitted this fact. Beginning with the second generation of Ruby on Rails, Dynamic Scaffolding was no longer supported and Scaffolding Generation took center stage.&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 1.x]==&lt;br /&gt;
In the first generation of Ruby on Rails a developer would generate a modal, then use a migrate file to create layout columns in the model's database table. After that they would generate a controller and add scaffolding. A scaffolding example in Ruby on Rails 1.x would look like the example below.[[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scaffold :modelname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 2.x]==&lt;br /&gt;
Ruby on Rails 2.x may have taken away Dynamic Scaffolding but it made Scaffold Generation simpler and involving less steps. This is due to being able to create your model, migrate file, and column layout all in one step. A scaffolding example in Ruby on Rails 2.x would look like the example below. [[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ./script/generate scaffold ModelName field1:type field2:type field3:type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this script is executed the generator will build 14 files in your application, along with some folders, and edit one more. &lt;br /&gt;
Here’s a quick overview of what it creates:&lt;br /&gt;
&lt;br /&gt;
*The model with the name you specified as ModelName&lt;br /&gt;
*Migration script to create the ModelNames table in your database&lt;br /&gt;
*A set of views for add, edit, display, and delete&lt;br /&gt;
*A view to control the overall look and feel of the views&lt;br /&gt;
*A cascading style sheet to make the scaffold views look better&lt;br /&gt;
*the ModalName controller&lt;br /&gt;
*Testing harness for the ModalName controller&lt;br /&gt;
*Helper functions&lt;br /&gt;
*Routing information&lt;br /&gt;
*Unit testing harness for ModalName&lt;br /&gt;
*Unit testing harness for ModalName helper&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Python=&lt;br /&gt;
==[http://www.djangoproject.com/ Django]==&lt;br /&gt;
Django is a high-level [http://www.python.org/ python] web framework that was written in a newsroom to provide as much automation as possible for web developers under heavy deadlines. In Django you find scaffolding in what it calls the ''admin interface''. The idea behind the ''admin interface'' is that user pages differ greatly from client to client, but administrative tools largely remain the same and can be very repetitive to develop over and over; therefore it makes since to create a tool that will create these types of applications for us. By hooking to the metadata in your model, a fully functional web application can immediately be used as an administration tool to help manage your site. The way the ''admin interface'' is implemented is: for each model you want to associate with the admin interface, you mark that model. Then in your url.py file you add the url for the ''admin interface''. This would look like the example below:[[http://www.djangobook.com/ 14]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 urlpatterns = patterns('',&lt;br /&gt;
    (r'^admin/', include('django.contrib.admin.urls')),&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of scaffolding in Django quickly and easily created an entire administration application.&lt;br /&gt;
&lt;br /&gt;
This is accomplished mainly in two files. They are called scaffold.py and meta_scaffold.py. The scaffold.py file is used to generate a particular model. The meta_scaffold.py file is used to generate a template for all of the models.[[http://code.djangoproject.com/wiki/Scaffolding 17]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in PHP= &lt;br /&gt;
==[http://cakephp.org/ CakePHP]==&lt;br /&gt;
When Ruby on Rails began to take off, many frameworks decided to model themselves after what Ruby on Rails was doing. CakePHP is a web development framework written in [http://www.php.net/ PHP] that has incorporated many of the same concepts and design principles as Ruby on Rails. Because of this CakePHP prides itself on supporting scaffolding.[[http://en.wikipedia.org/wiki/CakePHP 7]]&lt;br /&gt;
&lt;br /&gt;
CakePHP really has two types of scaffolding, one that it is actually called Scaffolding and another that is called Bake. What CakePHP calls Scaffolding is really like Dynamic Scaffolding. Here you have a model and then in your controller you declare a scaffold variable. CakePHP handles the rest behind the scenes. An example would look like the code below: [[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm 4], [http://book.cakephp.org/view/105/Scaffolding 5]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyController extends AppController {&lt;br /&gt;
    var $scaffold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Bake console with CakePHP generates code for the models, views, and controllers. Bake works like Scaffold Generation and creates a fully functional structure a developer can learn from or build upon. An example would look like the code below:[[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ 6]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cake bake model [model name]&lt;br /&gt;
cake bake controller [controller name]&lt;br /&gt;
cake bake view [view name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Java=&lt;br /&gt;
==[http://grails.org/ GRails]==&lt;br /&gt;
GRails is an open source framework that integrates with a programming environment called [http://groovy.codehaus.org/ Groovy].  Groovy is based on the [http://www.java.com/en/ Java] platform. GRails supports Dynamic Scaffolding, however, it does allow a developer to access the generated code if they want. If a developer tells GRails to install templates, the current scaffold code will be created in a template file that can be modified to fit specific needs. GRails supports other Java technologies such as Spring and Hibernate. An example snippet of scaffoldng in GRails would look like the example below:[[http://en.wikipedia.org/wiki/Grails_(framework) 9], [http://grails.org/Scaffolding 10]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class myController{&lt;br /&gt;
 def scaffold=true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to edit the templates generated by the Dynamic Scaffolding, you must install them. The installed templates would be stored in a new folder called 'templates' in the '/src' directory. An example would look like the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grails install-templates&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A popular tactic is to generate the templates of the scaffolding before letting the scaffold create the views. This will allow the developer to edit the templates to meet the layout requirements of the project. That way, when the scaffold generates the views, all the views will adhere to those layout requirements without having to modify each one. [[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates 16]]&lt;br /&gt;
&lt;br /&gt;
For a short video tutorial on scaffolding in GRails please visit the following link: [[http://www.youtube.com/watch?v=LWoCfTyWG_E 19]]&lt;br /&gt;
&lt;br /&gt;
==[http://appfuse.org/display/APF/Home Appfuse]==&lt;br /&gt;
Appfuse is an open source project and application. It uses open source tools built on the java platform to help a developer build web applications quickly. Appfuse is not actually a framework. Appfuse is more of a tool for code generation that can be used with other Java web frameworks. It can be integrated into other open source technolgies such as Spring, Hibernate, and Struts.[[http://en.wikipedia.org/wiki/AppFuse 8]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in .NET=&lt;br /&gt;
[http://www.microsoft.com/NET/ .NET] is a Microsoft framework that can be used to develop applications on machines running Microsoft software. In .NET Microsoft includes scaffolding as part of a broader structure it calls Dynamic Data. Dynamic Data uses LINQ to SQL for it's data access from which it builds corresponding controllers and views. Dynamic Data was originally part of a project called Blinq but that project was terminated and Dynamic Data became a part of .NET in its 3.5 extensions package. An example of setting up a scaffold in .NET would look like the example below.[[http://www.infoq.com/news/2007/12/aspnet-dynamic-data 11]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ScaffoldTable(true)&lt;br /&gt;
public partial class myClass{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Flash=&lt;br /&gt;
==[http://www.gaiaflashframework.com/ Gaia]==&lt;br /&gt;
Gaia is an open source front-end framework for the [http://www.adobe.com/products/flash/ Flash] programming environment. The term front-end framework is meant to mean that no advanced knowledge of the Flash coding convention is required in order to get up and running and can be used by novice developers. The fact that Gaia prides itself on requiring little to no code to get going is nothing new compared to other frameworks, however, what makes Gaia interesting is its support for [http://en.wikipedia.org/wiki/Search_engine_optimization SEO] (Search Engine Optimization) scaffolding. The way that SEO scaffolding works is it generates the XHTML pages for every SEO enabled page on the site. For each one of these XHTML pages the copy for the developer's flash is included. This one file per page relationship makes it much easier for the developer to optimize his/her site for search engines. The scaffolding information is stored in a file called Scaffold.as. An example of accessing the scaffolding from a page would look like the example below.[[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ 12]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new Scaffold(this);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
1.[http://en.wikipedia.org/wiki/Scaffold_(programming) http://en.wikipedia.org/wiki/Scaffold_(programming)]&amp;lt;br/&amp;gt;&lt;br /&gt;
2.[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html]&amp;lt;br/&amp;gt;&lt;br /&gt;
3.[http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion]&amp;lt;br/&amp;gt;&lt;br /&gt;
4.[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm]&amp;lt;br/&amp;gt;&lt;br /&gt;
5.[http://book.cakephp.org/view/105/Scaffolding http://book.cakephp.org/view/105/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
6.[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/]&amp;lt;br/&amp;gt;&lt;br /&gt;
7.[http://en.wikipedia.org/wiki/CakePHP http://en.wikipedia.org/wiki/CakePHP]&amp;lt;br/&amp;gt;&lt;br /&gt;
8.[http://en.wikipedia.org/wiki/AppFuse http://en.wikipedia.org/wiki/AppFuse]&amp;lt;br/&amp;gt;&lt;br /&gt;
9.[http://en.wikipedia.org/wiki/Grails_(framework) http://en.wikipedia.org/wiki/Grails_(framework)]&amp;lt;br/&amp;gt;&lt;br /&gt;
10.[http://grails.org/Scaffolding http://grails.org/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
11.[http://www.infoq.com/news/2007/12/aspnet-dynamic-data http://www.infoq.com/news/2007/12/aspnet-dynamic-data]&amp;lt;br/&amp;gt;&lt;br /&gt;
12.[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/]&amp;lt;br/&amp;gt;&lt;br /&gt;
13.[http://en.wikipedia.org/wiki/Search_engine_optimization http://en.wikipedia.org/wiki/Search_engine_optimization]&amp;lt;br/&amp;gt;&lt;br /&gt;
14.[http://www.djangobook.com/ http://www.djangobook.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
15.[http://guides.rubyonrails.org/ http://guides.rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
16.[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates]&amp;lt;br/&amp;gt;&lt;br /&gt;
17.[http://code.djangoproject.com/wiki/Scaffolding http://code.djangoproject.com/wiki/Scaffolding]&lt;br /&gt;
&lt;br /&gt;
=Literature=&lt;br /&gt;
18.[http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 Agile Web Development with Rails]&lt;br /&gt;
&lt;br /&gt;
=Media=&lt;br /&gt;
19.[http://www.youtube.com/watch?v=LWoCfTyWG_E http://www.youtube.com/watch?v=LWoCfTyWG_E]&lt;br /&gt;
&lt;br /&gt;
=Official Sites=&lt;br /&gt;
[http://rubyonrails.org/ http://rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.djangoproject.com/ http://www.djangoproject.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://cakephp.org/ http://cakephp.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://appfuse.org/display/APF/Home http://appfuse.org/display/APF/Home]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://grails.org/ http://grails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/NET/ http://www.microsoft.com/NET/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.gaiaflashframework.com/ http://www.gaiaflashframework.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://groovy.codehaus.org/ http://groovy.codehaus.org/]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21892</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 9 ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21892"/>
		<updated>2009-09-25T19:38:58Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: /* [http://appfuse.org/display/APF/Home Appfuse] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Scaffolding in Web application frameworks&lt;br /&gt;
&lt;br /&gt;
''Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?''&lt;br /&gt;
&lt;br /&gt;
=The concept of Scaffolding=&lt;br /&gt;
Scaffolding in a [http://en.wikipedia.org/wiki/Web_application_framework web application framework] allows a software developer to create data-driven web applications quickly by automating [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] architecture of the application.  The pages have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order  to achieve a final product. &lt;br /&gt;
&lt;br /&gt;
For the young developer, scaffolding has the advantage of quickly and easily building a functioning database-driven application. It also shows the developer what kind of methods and logic must be present within the application's controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications. &lt;br /&gt;
&lt;br /&gt;
For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this, the experienced developer can customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated &amp;quot;build as a rough draft&amp;quot; option from which they will write their own structure. &lt;br /&gt;
&lt;br /&gt;
Scaffolding has become very popular within the web development community and is showing up in several web frameworks. This is mostly because it increases work flow and allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, .NET, and Flash. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15], [http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 18]]&lt;br /&gt;
&lt;br /&gt;
==Dynamic Scaffolding==&lt;br /&gt;
Dynamic Scaffolding generates the data interfaces at run time. With very little written code and no necessary knowledge of the underpinning data interfaces, a developer could get a web application up and running in very little time and with little effort by using Dynamic Scaffolding. &lt;br /&gt;
&lt;br /&gt;
Young developers loved it because they could get a web application up and running without having to know the gory details, or having to know much about the framework they were working with. Many experienced developers also liked it because it allowed them to quickly prototype an application and wow clients as they saw the product come to life in a matter of minutes. &lt;br /&gt;
&lt;br /&gt;
However, there were issues with Dynamic Scaffolding. Dynamic Scaffolding creates the data interfaces at run time causing the interfaces to be hidden from the developer.  This left the developer clueless regarding the implementation. This lack of knowledge created problems. One problem was that the developer did not learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code created was hidden which maked it very difficult to access and work with. Because of these issues, many application development purists see Dynamic Scaffolding as doing more harm than good. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
==Scaffold Generation==&lt;br /&gt;
Scaffold Generation is another approach to scaffolding that generates the data interfaces for a developer, but it also gives them access to the generated code. This process is a bit less automated than Dynamic Scaffolding because changes to the model will not be automatically updated elsewhere in the application. What developers lose in automation, they gain in having a working site filled with examples from which to learn from. Developers also have immediate access to the data interfaces so they can make modifications quickly and efficiently. Furthermore, Scaffold Generation has the advantage of reducing the learning curve from a scaffold created controller to a custom one. Dynamic Scaffolding was easy for a developer to create a simple CRUD interface, but there was a large gap between that step and a custom interface to handle a specific job with specific needs. This gap is not nearly as wide now since the developer has access to the code created through Scaffold Generation and can use it as a foundation to branch out into custom interpretations of the simple CRUD scenario. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Ruby on Rails=&lt;br /&gt;
Scaffolding became popular in [http://rubyonrails.org/ Ruby on Rails] and has since moved on to several other frameworks. The first generation of Ruby on Rails supported Dynamic Scaffolding. Scaffold Generation was also supported, however books, demos, and tutorials based on the first generation of Ruby on Rails largely omitted this fact. Beginning with the second generation of Ruby on Rails, Dynamic Scaffolding was no longer supported and Scaffolding Generation took center stage.&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 1.x]==&lt;br /&gt;
In the first generation of Ruby on Rails a developer would generate a modal, then use a migrate file to create layout columns in the model's database table. After that they would generate a controller and add scaffolding. A scaffolding example in Ruby on Rails 1.x would look like the example below.[[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scaffold :modelname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 2.x]==&lt;br /&gt;
Ruby on Rails 2.x may have taken away Dynamic Scaffolding but it made Scaffold Generation simpler and involving less steps. This is due to being able to create your model, migrate file, and column layout all in one step. A scaffolding example in Ruby on Rails 2.x would look like the example below. [[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ./script/generate scaffold ModelName field1:type field2:type field3:type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this script is executed the generator will build 14 files in your application, along with some folders, and edit one more. &lt;br /&gt;
Here’s a quick overview of what it creates:&lt;br /&gt;
&lt;br /&gt;
*The model with the name you specified as ModelName&lt;br /&gt;
*Migration script to create the ModelNames table in your database&lt;br /&gt;
*A set of views for add, edit, display, and delete&lt;br /&gt;
*A view to control the overall look and feel of the views&lt;br /&gt;
*A cascading style sheet to make the scaffold views look better&lt;br /&gt;
*the ModalName controller&lt;br /&gt;
*Testing harness for the ModalName controller&lt;br /&gt;
*Helper functions&lt;br /&gt;
*Routing information&lt;br /&gt;
*Unit testing harness for ModalName&lt;br /&gt;
*Unit testing harness for ModalName helper&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Python=&lt;br /&gt;
==[http://www.djangoproject.com/ Django]==&lt;br /&gt;
Django is a high-level [http://www.python.org/ python] web framework that was written in a newsroom to provide as much automation as possible for web developers under heavy deadlines. In Django you find scaffolding in what it calls the ''admin interface''. The idea behind the ''admin interface'' is that user pages differ greatly from client to client, but administrative tools largely remain the same and can be very repetitive to develop over and over; therefore it makes since to create a tool that will create these types of applications for us. By hooking to the metadata in your model, a fully functional web application can immediately be used as an administration tool to help manage your site. The way the ''admin interface'' is implemented is: for each model you want to associate with the admin interface, you mark that model. Then in your url.py file you add the url for the ''admin interface''. This would look like the example below:[[http://www.djangobook.com/ 14]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 urlpatterns = patterns('',&lt;br /&gt;
    (r'^admin/', include('django.contrib.admin.urls')),&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of scaffolding in Django quickly and easily created an entire administration application.&lt;br /&gt;
&lt;br /&gt;
This is accomplished mainly in two files. They are called scaffold.py and meta_scaffold.py. The scaffold.py file is used to generate a particular model. The meta_scaffold.py file is used to generate a template for all of the models.[[http://code.djangoproject.com/wiki/Scaffolding 17]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in PHP= &lt;br /&gt;
==[http://cakephp.org/ CakePHP]==&lt;br /&gt;
When Ruby on Rails began to take off, many frameworks decided to model themselves after what Ruby on Rails was doing. CakePHP is a web development framework written in [http://www.php.net/ PHP] that has incorporated many of the same concepts and design principles as Ruby on Rails. Because of this CakePHP prides itself on supporting scaffolding.[[http://en.wikipedia.org/wiki/CakePHP 7]]&lt;br /&gt;
&lt;br /&gt;
CakePHP really has two types of scaffolding, one that it is actually called Scaffolding and another that is called Bake. What CakePHP calls Scaffolding is really like Dynamic Scaffolding. Here you have a model and then in your controller you declare a scaffold variable. CakePHP handles the rest behind the scenes. An example would look like the code below: [[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm 4], [http://book.cakephp.org/view/105/Scaffolding 5]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyController extends AppController {&lt;br /&gt;
    var $scaffold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Bake console with CakePHP generates code for the models, views, and controllers. Bake works like Scaffold Generation and creates a fully functional structure a developer can learn from or build upon. An example would look like the code below:[[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ 6]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cake bake model [model name]&lt;br /&gt;
cake bake controller [controller name]&lt;br /&gt;
cake bake view [view name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Java=&lt;br /&gt;
==[http://grails.org/ GRails]==&lt;br /&gt;
GRails is an open source framework that integrates with a programming environment called [http://groovy.codehaus.org/ Groovy].  Groovy is based on the [http://www.java.com/en/ Java] platform. GRails supports Dynamic Scaffolding, however, it does allow a developer to access the generated code if they want. If a developer tells GRails to install templates, the current scaffold code will be created in a template file that can be modified to fit specific needs. GRails supports other Java technologies such as Spring and Hibernate. An example snippet of scaffoldng in GRails would look like the example below:[[http://en.wikipedia.org/wiki/Grails_(framework) 9], [http://grails.org/Scaffolding 10]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class myController{&lt;br /&gt;
 def scaffold=true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to edit the templates generated by the Dynamic Scaffolding, you must install them. The installed templates would be stored in a new folder called 'templates' in the '/src' directory. An example would look like the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grails install-templates&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A popular tactic is to generate the templates of the scaffolding before letting the scaffold create the views. This will allow the developer to edit the templates to meet the layout requirements of the project. That way, when the scaffold generates the views, all the views will adhere to those layout requirements without having to modify each one. [[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates 16]]&lt;br /&gt;
&lt;br /&gt;
For a short video tutorial on scaffolding in GRails please visit the following link: [[http://www.youtube.com/watch?v=LWoCfTyWG_E 19]]&lt;br /&gt;
&lt;br /&gt;
==[http://appfuse.org/display/APF/Home Appfuse]==&lt;br /&gt;
Appfuse is an open source project and application. It uses open source tools built on the java platform to help a developer build web applications quickly. Appfuse is not actually a framework. Appfuse is more of a tool for code generation that can be used with other Java web frameworks. It can be integrated into other open source technolgies such as Spring, Hibernate, and Struts.[[http://en.wikipedia.org/wiki/AppFuse 8]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in .NET=&lt;br /&gt;
[http://www.microsoft.com/NET/ .NET] is a Microsoft framework that can be used to develop applications on machines running Microsoft software. In .NET Microsoft includes scaffolding as part of a broader structure it calls Dynamic Data. Dynamic Data uses LINQ to SQL for it's data access from which it builds corresponding controllers and views. Dynamic Data was originally part of a project called Blinq but that project was terminated and Dynamic Data became a part of .NET in its 3.5 extensions package. An example of setting up a scaffold in .NET would look like the example below.[[http://www.infoq.com/news/2007/12/aspnet-dynamic-data 11]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ScaffoldTable(true)&lt;br /&gt;
public partial calss myClass{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Flash=&lt;br /&gt;
==[http://www.gaiaflashframework.com/ Gaia]==&lt;br /&gt;
Gaia is an open source front-end framework for the [http://www.adobe.com/products/flash/ Flash] programming environment. The term front-end framework is meant to mean that no advanced knowledge of the Flash coding convention is required in order to get up and running and can be used by novice developers. The fact that Gaia prides itself on requiring little to no code to get going is nothing new compared to other frameworks, however, what makes Gaia interesting is its support for [http://en.wikipedia.org/wiki/Search_engine_optimization SEO] (Search Engine Optimization) scaffolding. The way that SEO scaffolding works is it generates the XHTML pages for every SEO enabled page on the site. For each one of these XHTML pages the copy for the developer's flash is included. This one file per page relationship makes it much easier for the developer to optimize his/her site for search engines. The scaffolding information is stored in a file called Scaffold.as. An example of accessing the scaffolding from a page would look like the example below.[[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ 12]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new Scaffold(this);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
1.[http://en.wikipedia.org/wiki/Scaffold_(programming) http://en.wikipedia.org/wiki/Scaffold_(programming)]&amp;lt;br/&amp;gt;&lt;br /&gt;
2.[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html]&amp;lt;br/&amp;gt;&lt;br /&gt;
3.[http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion]&amp;lt;br/&amp;gt;&lt;br /&gt;
4.[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm]&amp;lt;br/&amp;gt;&lt;br /&gt;
5.[http://book.cakephp.org/view/105/Scaffolding http://book.cakephp.org/view/105/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
6.[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/]&amp;lt;br/&amp;gt;&lt;br /&gt;
7.[http://en.wikipedia.org/wiki/CakePHP http://en.wikipedia.org/wiki/CakePHP]&amp;lt;br/&amp;gt;&lt;br /&gt;
8.[http://en.wikipedia.org/wiki/AppFuse http://en.wikipedia.org/wiki/AppFuse]&amp;lt;br/&amp;gt;&lt;br /&gt;
9.[http://en.wikipedia.org/wiki/Grails_(framework) http://en.wikipedia.org/wiki/Grails_(framework)]&amp;lt;br/&amp;gt;&lt;br /&gt;
10.[http://grails.org/Scaffolding http://grails.org/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
11.[http://www.infoq.com/news/2007/12/aspnet-dynamic-data http://www.infoq.com/news/2007/12/aspnet-dynamic-data]&amp;lt;br/&amp;gt;&lt;br /&gt;
12.[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/]&amp;lt;br/&amp;gt;&lt;br /&gt;
13.[http://en.wikipedia.org/wiki/Search_engine_optimization http://en.wikipedia.org/wiki/Search_engine_optimization]&amp;lt;br/&amp;gt;&lt;br /&gt;
14.[http://www.djangobook.com/ http://www.djangobook.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
15.[http://guides.rubyonrails.org/ http://guides.rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
16.[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates]&amp;lt;br/&amp;gt;&lt;br /&gt;
17.[http://code.djangoproject.com/wiki/Scaffolding http://code.djangoproject.com/wiki/Scaffolding]&lt;br /&gt;
&lt;br /&gt;
=Literature=&lt;br /&gt;
18.[http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 Agile Web Development with Rails]&lt;br /&gt;
&lt;br /&gt;
=Media=&lt;br /&gt;
19.[http://www.youtube.com/watch?v=LWoCfTyWG_E http://www.youtube.com/watch?v=LWoCfTyWG_E]&lt;br /&gt;
&lt;br /&gt;
=Official Sites=&lt;br /&gt;
[http://rubyonrails.org/ http://rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.djangoproject.com/ http://www.djangoproject.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://cakephp.org/ http://cakephp.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://appfuse.org/display/APF/Home http://appfuse.org/display/APF/Home]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://grails.org/ http://grails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/NET/ http://www.microsoft.com/NET/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.gaiaflashframework.com/ http://www.gaiaflashframework.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://groovy.codehaus.org/ http://groovy.codehaus.org/]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21891</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 9 ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21891"/>
		<updated>2009-09-25T19:37:00Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: /* [http://grails.org/ GRails] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Scaffolding in Web application frameworks&lt;br /&gt;
&lt;br /&gt;
''Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?''&lt;br /&gt;
&lt;br /&gt;
=The concept of Scaffolding=&lt;br /&gt;
Scaffolding in a [http://en.wikipedia.org/wiki/Web_application_framework web application framework] allows a software developer to create data-driven web applications quickly by automating [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] architecture of the application.  The pages have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order  to achieve a final product. &lt;br /&gt;
&lt;br /&gt;
For the young developer, scaffolding has the advantage of quickly and easily building a functioning database-driven application. It also shows the developer what kind of methods and logic must be present within the application's controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications. &lt;br /&gt;
&lt;br /&gt;
For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this, the experienced developer can customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated &amp;quot;build as a rough draft&amp;quot; option from which they will write their own structure. &lt;br /&gt;
&lt;br /&gt;
Scaffolding has become very popular within the web development community and is showing up in several web frameworks. This is mostly because it increases work flow and allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, .NET, and Flash. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15], [http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 18]]&lt;br /&gt;
&lt;br /&gt;
==Dynamic Scaffolding==&lt;br /&gt;
Dynamic Scaffolding generates the data interfaces at run time. With very little written code and no necessary knowledge of the underpinning data interfaces, a developer could get a web application up and running in very little time and with little effort by using Dynamic Scaffolding. &lt;br /&gt;
&lt;br /&gt;
Young developers loved it because they could get a web application up and running without having to know the gory details, or having to know much about the framework they were working with. Many experienced developers also liked it because it allowed them to quickly prototype an application and wow clients as they saw the product come to life in a matter of minutes. &lt;br /&gt;
&lt;br /&gt;
However, there were issues with Dynamic Scaffolding. Dynamic Scaffolding creates the data interfaces at run time causing the interfaces to be hidden from the developer.  This left the developer clueless regarding the implementation. This lack of knowledge created problems. One problem was that the developer did not learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code created was hidden which maked it very difficult to access and work with. Because of these issues, many application development purists see Dynamic Scaffolding as doing more harm than good. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
==Scaffold Generation==&lt;br /&gt;
Scaffold Generation is another approach to scaffolding that generates the data interfaces for a developer, but it also gives them access to the generated code. This process is a bit less automated than Dynamic Scaffolding because changes to the model will not be automatically updated elsewhere in the application. What developers lose in automation, they gain in having a working site filled with examples from which to learn from. Developers also have immediate access to the data interfaces so they can make modifications quickly and efficiently. Furthermore, Scaffold Generation has the advantage of reducing the learning curve from a scaffold created controller to a custom one. Dynamic Scaffolding was easy for a developer to create a simple CRUD interface, but there was a large gap between that step and a custom interface to handle a specific job with specific needs. This gap is not nearly as wide now since the developer has access to the code created through Scaffold Generation and can use it as a foundation to branch out into custom interpretations of the simple CRUD scenario. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Ruby on Rails=&lt;br /&gt;
Scaffolding became popular in [http://rubyonrails.org/ Ruby on Rails] and has since moved on to several other frameworks. The first generation of Ruby on Rails supported Dynamic Scaffolding. Scaffold Generation was also supported, however books, demos, and tutorials based on the first generation of Ruby on Rails largely omitted this fact. Beginning with the second generation of Ruby on Rails, Dynamic Scaffolding was no longer supported and Scaffolding Generation took center stage.&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 1.x]==&lt;br /&gt;
In the first generation of Ruby on Rails a developer would generate a modal, then use a migrate file to create layout columns in the model's database table. After that they would generate a controller and add scaffolding. A scaffolding example in Ruby on Rails 1.x would look like the example below.[[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scaffold :modelname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 2.x]==&lt;br /&gt;
Ruby on Rails 2.x may have taken away Dynamic Scaffolding but it made Scaffold Generation simpler and involving less steps. This is due to being able to create your model, migrate file, and column layout all in one step. A scaffolding example in Ruby on Rails 2.x would look like the example below. [[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ./script/generate scaffold ModelName field1:type field2:type field3:type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this script is executed the generator will build 14 files in your application, along with some folders, and edit one more. &lt;br /&gt;
Here’s a quick overview of what it creates:&lt;br /&gt;
&lt;br /&gt;
*The model with the name you specified as ModelName&lt;br /&gt;
*Migration script to create the ModelNames table in your database&lt;br /&gt;
*A set of views for add, edit, display, and delete&lt;br /&gt;
*A view to control the overall look and feel of the views&lt;br /&gt;
*A cascading style sheet to make the scaffold views look better&lt;br /&gt;
*the ModalName controller&lt;br /&gt;
*Testing harness for the ModalName controller&lt;br /&gt;
*Helper functions&lt;br /&gt;
*Routing information&lt;br /&gt;
*Unit testing harness for ModalName&lt;br /&gt;
*Unit testing harness for ModalName helper&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Python=&lt;br /&gt;
==[http://www.djangoproject.com/ Django]==&lt;br /&gt;
Django is a high-level [http://www.python.org/ python] web framework that was written in a newsroom to provide as much automation as possible for web developers under heavy deadlines. In Django you find scaffolding in what it calls the ''admin interface''. The idea behind the ''admin interface'' is that user pages differ greatly from client to client, but administrative tools largely remain the same and can be very repetitive to develop over and over; therefore it makes since to create a tool that will create these types of applications for us. By hooking to the metadata in your model, a fully functional web application can immediately be used as an administration tool to help manage your site. The way the ''admin interface'' is implemented is: for each model you want to associate with the admin interface, you mark that model. Then in your url.py file you add the url for the ''admin interface''. This would look like the example below:[[http://www.djangobook.com/ 14]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 urlpatterns = patterns('',&lt;br /&gt;
    (r'^admin/', include('django.contrib.admin.urls')),&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of scaffolding in Django quickly and easily created an entire administration application.&lt;br /&gt;
&lt;br /&gt;
This is accomplished mainly in two files. They are called scaffold.py and meta_scaffold.py. The scaffold.py file is used to generate a particular model. The meta_scaffold.py file is used to generate a template for all of the models.[[http://code.djangoproject.com/wiki/Scaffolding 17]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in PHP= &lt;br /&gt;
==[http://cakephp.org/ CakePHP]==&lt;br /&gt;
When Ruby on Rails began to take off, many frameworks decided to model themselves after what Ruby on Rails was doing. CakePHP is a web development framework written in [http://www.php.net/ PHP] that has incorporated many of the same concepts and design principles as Ruby on Rails. Because of this CakePHP prides itself on supporting scaffolding.[[http://en.wikipedia.org/wiki/CakePHP 7]]&lt;br /&gt;
&lt;br /&gt;
CakePHP really has two types of scaffolding, one that it is actually called Scaffolding and another that is called Bake. What CakePHP calls Scaffolding is really like Dynamic Scaffolding. Here you have a model and then in your controller you declare a scaffold variable. CakePHP handles the rest behind the scenes. An example would look like the code below: [[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm 4], [http://book.cakephp.org/view/105/Scaffolding 5]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyController extends AppController {&lt;br /&gt;
    var $scaffold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Bake console with CakePHP generates code for the models, views, and controllers. Bake works like Scaffold Generation and creates a fully functional structure a developer can learn from or build upon. An example would look like the code below:[[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ 6]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cake bake model [model name]&lt;br /&gt;
cake bake controller [controller name]&lt;br /&gt;
cake bake view [view name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Java=&lt;br /&gt;
==[http://grails.org/ GRails]==&lt;br /&gt;
GRails is an open source framework that integrates with a programming environment called [http://groovy.codehaus.org/ Groovy].  Groovy is based on the [http://www.java.com/en/ Java] platform. GRails supports Dynamic Scaffolding, however, it does allow a developer to access the generated code if they want. If a developer tells GRails to install templates, the current scaffold code will be created in a template file that can be modified to fit specific needs. GRails supports other Java technologies such as Spring and Hibernate. An example snippet of scaffoldng in GRails would look like the example below:[[http://en.wikipedia.org/wiki/Grails_(framework) 9], [http://grails.org/Scaffolding 10]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class myController{&lt;br /&gt;
 def scaffold=true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to edit the templates generated by the Dynamic Scaffolding, you must install them. The installed templates would be stored in a new folder called 'templates' in the '/src' directory. An example would look like the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grails install-templates&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A popular tactic is to generate the templates of the scaffolding before letting the scaffold create the views. This will allow the developer to edit the templates to meet the layout requirements of the project. That way, when the scaffold generates the views, all the views will adhere to those layout requirements without having to modify each one. [[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates 16]]&lt;br /&gt;
&lt;br /&gt;
For a short video tutorial on scaffolding in GRails please visit the following link: [[http://www.youtube.com/watch?v=LWoCfTyWG_E 19]]&lt;br /&gt;
&lt;br /&gt;
==[http://appfuse.org/display/APF/Home Appfuse]==&lt;br /&gt;
Appfuse is an open source project and application that uses open source tools built on the java platform to help a developer build web applications quickly. Appfuse is not actually a framework. Appfuse is more of a tool for code generation that can be used with other Java web frameworks. It can be integrated into other open source technolgies such as Spring, Hibernate, and Struts.[[http://en.wikipedia.org/wiki/AppFuse 8]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in .NET=&lt;br /&gt;
[http://www.microsoft.com/NET/ .NET] is a Microsoft framework that can be used to develop applications on machines running Microsoft software. In .NET Microsoft includes scaffolding as part of a broader structure it calls Dynamic Data. Dynamic Data uses LINQ to SQL for it's data access from which it builds corresponding controllers and views. Dynamic Data was originally part of a project called Blinq but that project was terminated and Dynamic Data became a part of .NET in its 3.5 extensions package. An example of setting up a scaffold in .NET would look like the example below.[[http://www.infoq.com/news/2007/12/aspnet-dynamic-data 11]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ScaffoldTable(true)&lt;br /&gt;
public partial calss myClass{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Flash=&lt;br /&gt;
==[http://www.gaiaflashframework.com/ Gaia]==&lt;br /&gt;
Gaia is an open source front-end framework for the [http://www.adobe.com/products/flash/ Flash] programming environment. The term front-end framework is meant to mean that no advanced knowledge of the Flash coding convention is required in order to get up and running and can be used by novice developers. The fact that Gaia prides itself on requiring little to no code to get going is nothing new compared to other frameworks, however, what makes Gaia interesting is its support for [http://en.wikipedia.org/wiki/Search_engine_optimization SEO] (Search Engine Optimization) scaffolding. The way that SEO scaffolding works is it generates the XHTML pages for every SEO enabled page on the site. For each one of these XHTML pages the copy for the developer's flash is included. This one file per page relationship makes it much easier for the developer to optimize his/her site for search engines. The scaffolding information is stored in a file called Scaffold.as. An example of accessing the scaffolding from a page would look like the example below.[[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ 12]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new Scaffold(this);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
1.[http://en.wikipedia.org/wiki/Scaffold_(programming) http://en.wikipedia.org/wiki/Scaffold_(programming)]&amp;lt;br/&amp;gt;&lt;br /&gt;
2.[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html]&amp;lt;br/&amp;gt;&lt;br /&gt;
3.[http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion]&amp;lt;br/&amp;gt;&lt;br /&gt;
4.[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm]&amp;lt;br/&amp;gt;&lt;br /&gt;
5.[http://book.cakephp.org/view/105/Scaffolding http://book.cakephp.org/view/105/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
6.[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/]&amp;lt;br/&amp;gt;&lt;br /&gt;
7.[http://en.wikipedia.org/wiki/CakePHP http://en.wikipedia.org/wiki/CakePHP]&amp;lt;br/&amp;gt;&lt;br /&gt;
8.[http://en.wikipedia.org/wiki/AppFuse http://en.wikipedia.org/wiki/AppFuse]&amp;lt;br/&amp;gt;&lt;br /&gt;
9.[http://en.wikipedia.org/wiki/Grails_(framework) http://en.wikipedia.org/wiki/Grails_(framework)]&amp;lt;br/&amp;gt;&lt;br /&gt;
10.[http://grails.org/Scaffolding http://grails.org/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
11.[http://www.infoq.com/news/2007/12/aspnet-dynamic-data http://www.infoq.com/news/2007/12/aspnet-dynamic-data]&amp;lt;br/&amp;gt;&lt;br /&gt;
12.[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/]&amp;lt;br/&amp;gt;&lt;br /&gt;
13.[http://en.wikipedia.org/wiki/Search_engine_optimization http://en.wikipedia.org/wiki/Search_engine_optimization]&amp;lt;br/&amp;gt;&lt;br /&gt;
14.[http://www.djangobook.com/ http://www.djangobook.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
15.[http://guides.rubyonrails.org/ http://guides.rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
16.[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates]&amp;lt;br/&amp;gt;&lt;br /&gt;
17.[http://code.djangoproject.com/wiki/Scaffolding http://code.djangoproject.com/wiki/Scaffolding]&lt;br /&gt;
&lt;br /&gt;
=Literature=&lt;br /&gt;
18.[http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 Agile Web Development with Rails]&lt;br /&gt;
&lt;br /&gt;
=Media=&lt;br /&gt;
19.[http://www.youtube.com/watch?v=LWoCfTyWG_E http://www.youtube.com/watch?v=LWoCfTyWG_E]&lt;br /&gt;
&lt;br /&gt;
=Official Sites=&lt;br /&gt;
[http://rubyonrails.org/ http://rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.djangoproject.com/ http://www.djangoproject.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://cakephp.org/ http://cakephp.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://appfuse.org/display/APF/Home http://appfuse.org/display/APF/Home]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://grails.org/ http://grails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/NET/ http://www.microsoft.com/NET/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.gaiaflashframework.com/ http://www.gaiaflashframework.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://groovy.codehaus.org/ http://groovy.codehaus.org/]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21890</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 9 ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21890"/>
		<updated>2009-09-25T19:36:39Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: /* [http://grails.org/ GRails] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Scaffolding in Web application frameworks&lt;br /&gt;
&lt;br /&gt;
''Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?''&lt;br /&gt;
&lt;br /&gt;
=The concept of Scaffolding=&lt;br /&gt;
Scaffolding in a [http://en.wikipedia.org/wiki/Web_application_framework web application framework] allows a software developer to create data-driven web applications quickly by automating [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] architecture of the application.  The pages have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order  to achieve a final product. &lt;br /&gt;
&lt;br /&gt;
For the young developer, scaffolding has the advantage of quickly and easily building a functioning database-driven application. It also shows the developer what kind of methods and logic must be present within the application's controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications. &lt;br /&gt;
&lt;br /&gt;
For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this, the experienced developer can customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated &amp;quot;build as a rough draft&amp;quot; option from which they will write their own structure. &lt;br /&gt;
&lt;br /&gt;
Scaffolding has become very popular within the web development community and is showing up in several web frameworks. This is mostly because it increases work flow and allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, .NET, and Flash. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15], [http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 18]]&lt;br /&gt;
&lt;br /&gt;
==Dynamic Scaffolding==&lt;br /&gt;
Dynamic Scaffolding generates the data interfaces at run time. With very little written code and no necessary knowledge of the underpinning data interfaces, a developer could get a web application up and running in very little time and with little effort by using Dynamic Scaffolding. &lt;br /&gt;
&lt;br /&gt;
Young developers loved it because they could get a web application up and running without having to know the gory details, or having to know much about the framework they were working with. Many experienced developers also liked it because it allowed them to quickly prototype an application and wow clients as they saw the product come to life in a matter of minutes. &lt;br /&gt;
&lt;br /&gt;
However, there were issues with Dynamic Scaffolding. Dynamic Scaffolding creates the data interfaces at run time causing the interfaces to be hidden from the developer.  This left the developer clueless regarding the implementation. This lack of knowledge created problems. One problem was that the developer did not learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code created was hidden which maked it very difficult to access and work with. Because of these issues, many application development purists see Dynamic Scaffolding as doing more harm than good. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
==Scaffold Generation==&lt;br /&gt;
Scaffold Generation is another approach to scaffolding that generates the data interfaces for a developer, but it also gives them access to the generated code. This process is a bit less automated than Dynamic Scaffolding because changes to the model will not be automatically updated elsewhere in the application. What developers lose in automation, they gain in having a working site filled with examples from which to learn from. Developers also have immediate access to the data interfaces so they can make modifications quickly and efficiently. Furthermore, Scaffold Generation has the advantage of reducing the learning curve from a scaffold created controller to a custom one. Dynamic Scaffolding was easy for a developer to create a simple CRUD interface, but there was a large gap between that step and a custom interface to handle a specific job with specific needs. This gap is not nearly as wide now since the developer has access to the code created through Scaffold Generation and can use it as a foundation to branch out into custom interpretations of the simple CRUD scenario. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Ruby on Rails=&lt;br /&gt;
Scaffolding became popular in [http://rubyonrails.org/ Ruby on Rails] and has since moved on to several other frameworks. The first generation of Ruby on Rails supported Dynamic Scaffolding. Scaffold Generation was also supported, however books, demos, and tutorials based on the first generation of Ruby on Rails largely omitted this fact. Beginning with the second generation of Ruby on Rails, Dynamic Scaffolding was no longer supported and Scaffolding Generation took center stage.&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 1.x]==&lt;br /&gt;
In the first generation of Ruby on Rails a developer would generate a modal, then use a migrate file to create layout columns in the model's database table. After that they would generate a controller and add scaffolding. A scaffolding example in Ruby on Rails 1.x would look like the example below.[[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scaffold :modelname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 2.x]==&lt;br /&gt;
Ruby on Rails 2.x may have taken away Dynamic Scaffolding but it made Scaffold Generation simpler and involving less steps. This is due to being able to create your model, migrate file, and column layout all in one step. A scaffolding example in Ruby on Rails 2.x would look like the example below. [[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ./script/generate scaffold ModelName field1:type field2:type field3:type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this script is executed the generator will build 14 files in your application, along with some folders, and edit one more. &lt;br /&gt;
Here’s a quick overview of what it creates:&lt;br /&gt;
&lt;br /&gt;
*The model with the name you specified as ModelName&lt;br /&gt;
*Migration script to create the ModelNames table in your database&lt;br /&gt;
*A set of views for add, edit, display, and delete&lt;br /&gt;
*A view to control the overall look and feel of the views&lt;br /&gt;
*A cascading style sheet to make the scaffold views look better&lt;br /&gt;
*the ModalName controller&lt;br /&gt;
*Testing harness for the ModalName controller&lt;br /&gt;
*Helper functions&lt;br /&gt;
*Routing information&lt;br /&gt;
*Unit testing harness for ModalName&lt;br /&gt;
*Unit testing harness for ModalName helper&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Python=&lt;br /&gt;
==[http://www.djangoproject.com/ Django]==&lt;br /&gt;
Django is a high-level [http://www.python.org/ python] web framework that was written in a newsroom to provide as much automation as possible for web developers under heavy deadlines. In Django you find scaffolding in what it calls the ''admin interface''. The idea behind the ''admin interface'' is that user pages differ greatly from client to client, but administrative tools largely remain the same and can be very repetitive to develop over and over; therefore it makes since to create a tool that will create these types of applications for us. By hooking to the metadata in your model, a fully functional web application can immediately be used as an administration tool to help manage your site. The way the ''admin interface'' is implemented is: for each model you want to associate with the admin interface, you mark that model. Then in your url.py file you add the url for the ''admin interface''. This would look like the example below:[[http://www.djangobook.com/ 14]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 urlpatterns = patterns('',&lt;br /&gt;
    (r'^admin/', include('django.contrib.admin.urls')),&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of scaffolding in Django quickly and easily created an entire administration application.&lt;br /&gt;
&lt;br /&gt;
This is accomplished mainly in two files. They are called scaffold.py and meta_scaffold.py. The scaffold.py file is used to generate a particular model. The meta_scaffold.py file is used to generate a template for all of the models.[[http://code.djangoproject.com/wiki/Scaffolding 17]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in PHP= &lt;br /&gt;
==[http://cakephp.org/ CakePHP]==&lt;br /&gt;
When Ruby on Rails began to take off, many frameworks decided to model themselves after what Ruby on Rails was doing. CakePHP is a web development framework written in [http://www.php.net/ PHP] that has incorporated many of the same concepts and design principles as Ruby on Rails. Because of this CakePHP prides itself on supporting scaffolding.[[http://en.wikipedia.org/wiki/CakePHP 7]]&lt;br /&gt;
&lt;br /&gt;
CakePHP really has two types of scaffolding, one that it is actually called Scaffolding and another that is called Bake. What CakePHP calls Scaffolding is really like Dynamic Scaffolding. Here you have a model and then in your controller you declare a scaffold variable. CakePHP handles the rest behind the scenes. An example would look like the code below: [[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm 4], [http://book.cakephp.org/view/105/Scaffolding 5]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyController extends AppController {&lt;br /&gt;
    var $scaffold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Bake console with CakePHP generates code for the models, views, and controllers. Bake works like Scaffold Generation and creates a fully functional structure a developer can learn from or build upon. An example would look like the code below:[[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ 6]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cake bake model [model name]&lt;br /&gt;
cake bake controller [controller name]&lt;br /&gt;
cake bake view [view name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Java=&lt;br /&gt;
==[http://grails.org/ GRails]==&lt;br /&gt;
GRails is an open source framework that integrates with a programming environment called [http://groovy.codehaus.org/ Groovy].  Groovy is based on the [http://www.java.com/en/ Java] platform. GRails supports Dynamic Scaffolding, however, it does allow a developer to access the generated code if they want. If a developer tells GRails to install templates, the current scaffold code will be created in a template file that can be modified to fit specific needs. GRails supports other Java technologies such as Spring and Hibernate. An example snippet of scaffoldng in GRails would look like the example below:[[http://en.wikipedia.org/wiki/Grails_(framework) 9], [http://grails.org/Scaffolding 10]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class myController{&lt;br /&gt;
 def scaffold=true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to edit the templates generated by the Dynamic Scaffolding, you must install them. The installed templates would be stored in a new folder called 'templates' in the '/src' directory. An example would look like the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grails install-templates&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A popular tactic is to generate the templates of the scaffolding before letting the scaffold create the views. This will allow the developer to edit the templates to meet the layout requirements of the project. That way, when the scaffold generates the views, all the views will adhere to those layout requirements without having to modify each one. [[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates 16]]&lt;br /&gt;
&lt;br /&gt;
For a short video tutorial on scaffolding in GRails please visit the following link. [[http://www.youtube.com/watch?v=LWoCfTyWG_E 19]]&lt;br /&gt;
&lt;br /&gt;
==[http://appfuse.org/display/APF/Home Appfuse]==&lt;br /&gt;
Appfuse is an open source project and application that uses open source tools built on the java platform to help a developer build web applications quickly. Appfuse is not actually a framework. Appfuse is more of a tool for code generation that can be used with other Java web frameworks. It can be integrated into other open source technolgies such as Spring, Hibernate, and Struts.[[http://en.wikipedia.org/wiki/AppFuse 8]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in .NET=&lt;br /&gt;
[http://www.microsoft.com/NET/ .NET] is a Microsoft framework that can be used to develop applications on machines running Microsoft software. In .NET Microsoft includes scaffolding as part of a broader structure it calls Dynamic Data. Dynamic Data uses LINQ to SQL for it's data access from which it builds corresponding controllers and views. Dynamic Data was originally part of a project called Blinq but that project was terminated and Dynamic Data became a part of .NET in its 3.5 extensions package. An example of setting up a scaffold in .NET would look like the example below.[[http://www.infoq.com/news/2007/12/aspnet-dynamic-data 11]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ScaffoldTable(true)&lt;br /&gt;
public partial calss myClass{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Flash=&lt;br /&gt;
==[http://www.gaiaflashframework.com/ Gaia]==&lt;br /&gt;
Gaia is an open source front-end framework for the [http://www.adobe.com/products/flash/ Flash] programming environment. The term front-end framework is meant to mean that no advanced knowledge of the Flash coding convention is required in order to get up and running and can be used by novice developers. The fact that Gaia prides itself on requiring little to no code to get going is nothing new compared to other frameworks, however, what makes Gaia interesting is its support for [http://en.wikipedia.org/wiki/Search_engine_optimization SEO] (Search Engine Optimization) scaffolding. The way that SEO scaffolding works is it generates the XHTML pages for every SEO enabled page on the site. For each one of these XHTML pages the copy for the developer's flash is included. This one file per page relationship makes it much easier for the developer to optimize his/her site for search engines. The scaffolding information is stored in a file called Scaffold.as. An example of accessing the scaffolding from a page would look like the example below.[[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ 12]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new Scaffold(this);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
1.[http://en.wikipedia.org/wiki/Scaffold_(programming) http://en.wikipedia.org/wiki/Scaffold_(programming)]&amp;lt;br/&amp;gt;&lt;br /&gt;
2.[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html]&amp;lt;br/&amp;gt;&lt;br /&gt;
3.[http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion]&amp;lt;br/&amp;gt;&lt;br /&gt;
4.[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm]&amp;lt;br/&amp;gt;&lt;br /&gt;
5.[http://book.cakephp.org/view/105/Scaffolding http://book.cakephp.org/view/105/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
6.[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/]&amp;lt;br/&amp;gt;&lt;br /&gt;
7.[http://en.wikipedia.org/wiki/CakePHP http://en.wikipedia.org/wiki/CakePHP]&amp;lt;br/&amp;gt;&lt;br /&gt;
8.[http://en.wikipedia.org/wiki/AppFuse http://en.wikipedia.org/wiki/AppFuse]&amp;lt;br/&amp;gt;&lt;br /&gt;
9.[http://en.wikipedia.org/wiki/Grails_(framework) http://en.wikipedia.org/wiki/Grails_(framework)]&amp;lt;br/&amp;gt;&lt;br /&gt;
10.[http://grails.org/Scaffolding http://grails.org/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
11.[http://www.infoq.com/news/2007/12/aspnet-dynamic-data http://www.infoq.com/news/2007/12/aspnet-dynamic-data]&amp;lt;br/&amp;gt;&lt;br /&gt;
12.[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/]&amp;lt;br/&amp;gt;&lt;br /&gt;
13.[http://en.wikipedia.org/wiki/Search_engine_optimization http://en.wikipedia.org/wiki/Search_engine_optimization]&amp;lt;br/&amp;gt;&lt;br /&gt;
14.[http://www.djangobook.com/ http://www.djangobook.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
15.[http://guides.rubyonrails.org/ http://guides.rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
16.[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates]&amp;lt;br/&amp;gt;&lt;br /&gt;
17.[http://code.djangoproject.com/wiki/Scaffolding http://code.djangoproject.com/wiki/Scaffolding]&lt;br /&gt;
&lt;br /&gt;
=Literature=&lt;br /&gt;
18.[http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 Agile Web Development with Rails]&lt;br /&gt;
&lt;br /&gt;
=Media=&lt;br /&gt;
19.[http://www.youtube.com/watch?v=LWoCfTyWG_E http://www.youtube.com/watch?v=LWoCfTyWG_E]&lt;br /&gt;
&lt;br /&gt;
=Official Sites=&lt;br /&gt;
[http://rubyonrails.org/ http://rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.djangoproject.com/ http://www.djangoproject.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://cakephp.org/ http://cakephp.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://appfuse.org/display/APF/Home http://appfuse.org/display/APF/Home]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://grails.org/ http://grails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/NET/ http://www.microsoft.com/NET/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.gaiaflashframework.com/ http://www.gaiaflashframework.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://groovy.codehaus.org/ http://groovy.codehaus.org/]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21889</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 9 ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21889"/>
		<updated>2009-09-25T19:36:04Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: /* [http://grails.org/ GRails] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Scaffolding in Web application frameworks&lt;br /&gt;
&lt;br /&gt;
''Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?''&lt;br /&gt;
&lt;br /&gt;
=The concept of Scaffolding=&lt;br /&gt;
Scaffolding in a [http://en.wikipedia.org/wiki/Web_application_framework web application framework] allows a software developer to create data-driven web applications quickly by automating [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] architecture of the application.  The pages have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order  to achieve a final product. &lt;br /&gt;
&lt;br /&gt;
For the young developer, scaffolding has the advantage of quickly and easily building a functioning database-driven application. It also shows the developer what kind of methods and logic must be present within the application's controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications. &lt;br /&gt;
&lt;br /&gt;
For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this, the experienced developer can customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated &amp;quot;build as a rough draft&amp;quot; option from which they will write their own structure. &lt;br /&gt;
&lt;br /&gt;
Scaffolding has become very popular within the web development community and is showing up in several web frameworks. This is mostly because it increases work flow and allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, .NET, and Flash. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15], [http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 18]]&lt;br /&gt;
&lt;br /&gt;
==Dynamic Scaffolding==&lt;br /&gt;
Dynamic Scaffolding generates the data interfaces at run time. With very little written code and no necessary knowledge of the underpinning data interfaces, a developer could get a web application up and running in very little time and with little effort by using Dynamic Scaffolding. &lt;br /&gt;
&lt;br /&gt;
Young developers loved it because they could get a web application up and running without having to know the gory details, or having to know much about the framework they were working with. Many experienced developers also liked it because it allowed them to quickly prototype an application and wow clients as they saw the product come to life in a matter of minutes. &lt;br /&gt;
&lt;br /&gt;
However, there were issues with Dynamic Scaffolding. Dynamic Scaffolding creates the data interfaces at run time causing the interfaces to be hidden from the developer.  This left the developer clueless regarding the implementation. This lack of knowledge created problems. One problem was that the developer did not learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code created was hidden which maked it very difficult to access and work with. Because of these issues, many application development purists see Dynamic Scaffolding as doing more harm than good. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
==Scaffold Generation==&lt;br /&gt;
Scaffold Generation is another approach to scaffolding that generates the data interfaces for a developer, but it also gives them access to the generated code. This process is a bit less automated than Dynamic Scaffolding because changes to the model will not be automatically updated elsewhere in the application. What developers lose in automation, they gain in having a working site filled with examples from which to learn from. Developers also have immediate access to the data interfaces so they can make modifications quickly and efficiently. Furthermore, Scaffold Generation has the advantage of reducing the learning curve from a scaffold created controller to a custom one. Dynamic Scaffolding was easy for a developer to create a simple CRUD interface, but there was a large gap between that step and a custom interface to handle a specific job with specific needs. This gap is not nearly as wide now since the developer has access to the code created through Scaffold Generation and can use it as a foundation to branch out into custom interpretations of the simple CRUD scenario. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Ruby on Rails=&lt;br /&gt;
Scaffolding became popular in [http://rubyonrails.org/ Ruby on Rails] and has since moved on to several other frameworks. The first generation of Ruby on Rails supported Dynamic Scaffolding. Scaffold Generation was also supported, however books, demos, and tutorials based on the first generation of Ruby on Rails largely omitted this fact. Beginning with the second generation of Ruby on Rails, Dynamic Scaffolding was no longer supported and Scaffolding Generation took center stage.&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 1.x]==&lt;br /&gt;
In the first generation of Ruby on Rails a developer would generate a modal, then use a migrate file to create layout columns in the model's database table. After that they would generate a controller and add scaffolding. A scaffolding example in Ruby on Rails 1.x would look like the example below.[[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scaffold :modelname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 2.x]==&lt;br /&gt;
Ruby on Rails 2.x may have taken away Dynamic Scaffolding but it made Scaffold Generation simpler and involving less steps. This is due to being able to create your model, migrate file, and column layout all in one step. A scaffolding example in Ruby on Rails 2.x would look like the example below. [[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ./script/generate scaffold ModelName field1:type field2:type field3:type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this script is executed the generator will build 14 files in your application, along with some folders, and edit one more. &lt;br /&gt;
Here’s a quick overview of what it creates:&lt;br /&gt;
&lt;br /&gt;
*The model with the name you specified as ModelName&lt;br /&gt;
*Migration script to create the ModelNames table in your database&lt;br /&gt;
*A set of views for add, edit, display, and delete&lt;br /&gt;
*A view to control the overall look and feel of the views&lt;br /&gt;
*A cascading style sheet to make the scaffold views look better&lt;br /&gt;
*the ModalName controller&lt;br /&gt;
*Testing harness for the ModalName controller&lt;br /&gt;
*Helper functions&lt;br /&gt;
*Routing information&lt;br /&gt;
*Unit testing harness for ModalName&lt;br /&gt;
*Unit testing harness for ModalName helper&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Python=&lt;br /&gt;
==[http://www.djangoproject.com/ Django]==&lt;br /&gt;
Django is a high-level [http://www.python.org/ python] web framework that was written in a newsroom to provide as much automation as possible for web developers under heavy deadlines. In Django you find scaffolding in what it calls the ''admin interface''. The idea behind the ''admin interface'' is that user pages differ greatly from client to client, but administrative tools largely remain the same and can be very repetitive to develop over and over; therefore it makes since to create a tool that will create these types of applications for us. By hooking to the metadata in your model, a fully functional web application can immediately be used as an administration tool to help manage your site. The way the ''admin interface'' is implemented is: for each model you want to associate with the admin interface, you mark that model. Then in your url.py file you add the url for the ''admin interface''. This would look like the example below:[[http://www.djangobook.com/ 14]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 urlpatterns = patterns('',&lt;br /&gt;
    (r'^admin/', include('django.contrib.admin.urls')),&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of scaffolding in Django quickly and easily created an entire administration application.&lt;br /&gt;
&lt;br /&gt;
This is accomplished mainly in two files. They are called scaffold.py and meta_scaffold.py. The scaffold.py file is used to generate a particular model. The meta_scaffold.py file is used to generate a template for all of the models.[[http://code.djangoproject.com/wiki/Scaffolding 17]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in PHP= &lt;br /&gt;
==[http://cakephp.org/ CakePHP]==&lt;br /&gt;
When Ruby on Rails began to take off, many frameworks decided to model themselves after what Ruby on Rails was doing. CakePHP is a web development framework written in [http://www.php.net/ PHP] that has incorporated many of the same concepts and design principles as Ruby on Rails. Because of this CakePHP prides itself on supporting scaffolding.[[http://en.wikipedia.org/wiki/CakePHP 7]]&lt;br /&gt;
&lt;br /&gt;
CakePHP really has two types of scaffolding, one that it is actually called Scaffolding and another that is called Bake. What CakePHP calls Scaffolding is really like Dynamic Scaffolding. Here you have a model and then in your controller you declare a scaffold variable. CakePHP handles the rest behind the scenes. An example would look like the code below: [[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm 4], [http://book.cakephp.org/view/105/Scaffolding 5]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyController extends AppController {&lt;br /&gt;
    var $scaffold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Bake console with CakePHP generates code for the models, views, and controllers. Bake works like Scaffold Generation and creates a fully functional structure a developer can learn from or build upon. An example would look like the code below:[[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ 6]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cake bake model [model name]&lt;br /&gt;
cake bake controller [controller name]&lt;br /&gt;
cake bake view [view name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Java=&lt;br /&gt;
==[http://grails.org/ GRails]==&lt;br /&gt;
GRails is an open source framework that integrates with a programming environment called [http://groovy.codehaus.org/ Groovy].  Groovy is based on the [http://www.java.com/en/ Java] platform. GRails supports Dynamic Scaffolding, however, it does allow a developer to access the generated code if they want. If a developer tells GRails to install templates, the current scaffold code will be created in a template file that can be modified to fit specific needs. GRails supports other Java technologies such as Spring and Hibernate. An example snippet of scaffoldng in GRails would look like the example below:[[http://en.wikipedia.org/wiki/Grails_(framework) 9], [http://grails.org/Scaffolding 10]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class myController{&lt;br /&gt;
 def scaffold=true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to edit the templates generated by the Dynamic Scaffolding, you must install them. The installed templates would be stored in a new folder called 'templates' in the '/src' directory. An example would look like the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grails install-templates&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A popular tactic is to generate the templates of the scaffolding before letting the scaffold create the views. This will allow the developer to edit the templates to meet the layout requirements of the project. That way, when the scaffold generates the views, all the views will adhere to those layout requirements without having to modify each one. [[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates 16]]&lt;br /&gt;
&lt;br /&gt;
For a short video tutorial on scaffolding in GRails please visit [[http://www.youtube.com/watch?v=LWoCfTyWG_E 19]]&lt;br /&gt;
&lt;br /&gt;
==[http://appfuse.org/display/APF/Home Appfuse]==&lt;br /&gt;
Appfuse is an open source project and application that uses open source tools built on the java platform to help a developer build web applications quickly. Appfuse is not actually a framework. Appfuse is more of a tool for code generation that can be used with other Java web frameworks. It can be integrated into other open source technolgies such as Spring, Hibernate, and Struts.[[http://en.wikipedia.org/wiki/AppFuse 8]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in .NET=&lt;br /&gt;
[http://www.microsoft.com/NET/ .NET] is a Microsoft framework that can be used to develop applications on machines running Microsoft software. In .NET Microsoft includes scaffolding as part of a broader structure it calls Dynamic Data. Dynamic Data uses LINQ to SQL for it's data access from which it builds corresponding controllers and views. Dynamic Data was originally part of a project called Blinq but that project was terminated and Dynamic Data became a part of .NET in its 3.5 extensions package. An example of setting up a scaffold in .NET would look like the example below.[[http://www.infoq.com/news/2007/12/aspnet-dynamic-data 11]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ScaffoldTable(true)&lt;br /&gt;
public partial calss myClass{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Flash=&lt;br /&gt;
==[http://www.gaiaflashframework.com/ Gaia]==&lt;br /&gt;
Gaia is an open source front-end framework for the [http://www.adobe.com/products/flash/ Flash] programming environment. The term front-end framework is meant to mean that no advanced knowledge of the Flash coding convention is required in order to get up and running and can be used by novice developers. The fact that Gaia prides itself on requiring little to no code to get going is nothing new compared to other frameworks, however, what makes Gaia interesting is its support for [http://en.wikipedia.org/wiki/Search_engine_optimization SEO] (Search Engine Optimization) scaffolding. The way that SEO scaffolding works is it generates the XHTML pages for every SEO enabled page on the site. For each one of these XHTML pages the copy for the developer's flash is included. This one file per page relationship makes it much easier for the developer to optimize his/her site for search engines. The scaffolding information is stored in a file called Scaffold.as. An example of accessing the scaffolding from a page would look like the example below.[[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ 12]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new Scaffold(this);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
1.[http://en.wikipedia.org/wiki/Scaffold_(programming) http://en.wikipedia.org/wiki/Scaffold_(programming)]&amp;lt;br/&amp;gt;&lt;br /&gt;
2.[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html]&amp;lt;br/&amp;gt;&lt;br /&gt;
3.[http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion]&amp;lt;br/&amp;gt;&lt;br /&gt;
4.[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm]&amp;lt;br/&amp;gt;&lt;br /&gt;
5.[http://book.cakephp.org/view/105/Scaffolding http://book.cakephp.org/view/105/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
6.[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/]&amp;lt;br/&amp;gt;&lt;br /&gt;
7.[http://en.wikipedia.org/wiki/CakePHP http://en.wikipedia.org/wiki/CakePHP]&amp;lt;br/&amp;gt;&lt;br /&gt;
8.[http://en.wikipedia.org/wiki/AppFuse http://en.wikipedia.org/wiki/AppFuse]&amp;lt;br/&amp;gt;&lt;br /&gt;
9.[http://en.wikipedia.org/wiki/Grails_(framework) http://en.wikipedia.org/wiki/Grails_(framework)]&amp;lt;br/&amp;gt;&lt;br /&gt;
10.[http://grails.org/Scaffolding http://grails.org/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
11.[http://www.infoq.com/news/2007/12/aspnet-dynamic-data http://www.infoq.com/news/2007/12/aspnet-dynamic-data]&amp;lt;br/&amp;gt;&lt;br /&gt;
12.[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/]&amp;lt;br/&amp;gt;&lt;br /&gt;
13.[http://en.wikipedia.org/wiki/Search_engine_optimization http://en.wikipedia.org/wiki/Search_engine_optimization]&amp;lt;br/&amp;gt;&lt;br /&gt;
14.[http://www.djangobook.com/ http://www.djangobook.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
15.[http://guides.rubyonrails.org/ http://guides.rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
16.[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates]&amp;lt;br/&amp;gt;&lt;br /&gt;
17.[http://code.djangoproject.com/wiki/Scaffolding http://code.djangoproject.com/wiki/Scaffolding]&lt;br /&gt;
&lt;br /&gt;
=Literature=&lt;br /&gt;
18.[http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 Agile Web Development with Rails]&lt;br /&gt;
&lt;br /&gt;
=Media=&lt;br /&gt;
19.[http://www.youtube.com/watch?v=LWoCfTyWG_E http://www.youtube.com/watch?v=LWoCfTyWG_E]&lt;br /&gt;
&lt;br /&gt;
=Official Sites=&lt;br /&gt;
[http://rubyonrails.org/ http://rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.djangoproject.com/ http://www.djangoproject.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://cakephp.org/ http://cakephp.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://appfuse.org/display/APF/Home http://appfuse.org/display/APF/Home]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://grails.org/ http://grails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/NET/ http://www.microsoft.com/NET/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.gaiaflashframework.com/ http://www.gaiaflashframework.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://groovy.codehaus.org/ http://groovy.codehaus.org/]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21888</id>
		<title>CSC/ECE 517 Fall 2009/wiki1b 9 ss</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1b_9_ss&amp;diff=21888"/>
		<updated>2009-09-25T19:33:08Z</updated>

		<summary type="html">&lt;p&gt;Srstarr: /* [http://cakephp.org/ CakePHP] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Scaffolding in Web application frameworks&lt;br /&gt;
&lt;br /&gt;
''Topic :We have discussed scaffolds for Ruby on Rails. The dynamic scaffold of Rails 1.x was replaced in Rails 2 by a generator of scaffolds for specific tables. Why did this change take place? What are the pros and cons of dynamic scaffolds? Many languages other than Ruby (Java, Python, and PHP, for example) provide Web application frameworks. Do any of these languages have the equivalent of scaffolding? If so, how does it compare to Rails?''&lt;br /&gt;
&lt;br /&gt;
=The concept of Scaffolding=&lt;br /&gt;
Scaffolding in a [http://en.wikipedia.org/wiki/Web_application_framework web application framework] allows a software developer to create data-driven web applications quickly by automating [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete CRUD] (Create, Read, Update, Delete) data operations. It achieves this by generating pages for the models within the [http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] architecture of the application.  The pages have a working data form that can communicate with the database. This allows the developer to get an early look at the data presented in the application as a raw design from which they can build, modify, or rework the application in order  to achieve a final product. &lt;br /&gt;
&lt;br /&gt;
For the young developer, scaffolding has the advantage of quickly and easily building a functioning database-driven application. It also shows the developer what kind of methods and logic must be present within the application's controllers in order to produce a successful product. Scaffolding is a pragmatic tool to help young developers learn about creating web applications. &lt;br /&gt;
&lt;br /&gt;
For the experienced developer, scaffolding gives them fast access to viewing and editing pages. With this, the experienced developer can customize the application through the use of metadata, templates, overriding the scaffold actions with custom ones, or they may use the quickly generated &amp;quot;build as a rough draft&amp;quot; option from which they will write their own structure. &lt;br /&gt;
&lt;br /&gt;
Scaffolding has become very popular within the web development community and is showing up in several web frameworks. This is mostly because it increases work flow and allows web designers to spend more time designing instead of building interfaces to data. Scaffolding has become so wide spread that it can be found in such frameworks as Ruby on Rails, Python, PHP, Java, .NET, and Flash. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15], [http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 18]]&lt;br /&gt;
&lt;br /&gt;
==Dynamic Scaffolding==&lt;br /&gt;
Dynamic Scaffolding generates the data interfaces at run time. With very little written code and no necessary knowledge of the underpinning data interfaces, a developer could get a web application up and running in very little time and with little effort by using Dynamic Scaffolding. &lt;br /&gt;
&lt;br /&gt;
Young developers loved it because they could get a web application up and running without having to know the gory details, or having to know much about the framework they were working with. Many experienced developers also liked it because it allowed them to quickly prototype an application and wow clients as they saw the product come to life in a matter of minutes. &lt;br /&gt;
&lt;br /&gt;
However, there were issues with Dynamic Scaffolding. Dynamic Scaffolding creates the data interfaces at run time causing the interfaces to be hidden from the developer.  This left the developer clueless regarding the implementation. This lack of knowledge created problems. One problem was that the developer did not learn how to handle a typical CRUD scenario. Even if the developer did know how to build and customize their own CRUD scenario, the code created was hidden which maked it very difficult to access and work with. Because of these issues, many application development purists see Dynamic Scaffolding as doing more harm than good. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
==Scaffold Generation==&lt;br /&gt;
Scaffold Generation is another approach to scaffolding that generates the data interfaces for a developer, but it also gives them access to the generated code. This process is a bit less automated than Dynamic Scaffolding because changes to the model will not be automatically updated elsewhere in the application. What developers lose in automation, they gain in having a working site filled with examples from which to learn from. Developers also have immediate access to the data interfaces so they can make modifications quickly and efficiently. Furthermore, Scaffold Generation has the advantage of reducing the learning curve from a scaffold created controller to a custom one. Dynamic Scaffolding was easy for a developer to create a simple CRUD interface, but there was a large gap between that step and a custom interface to handle a specific job with specific needs. This gap is not nearly as wide now since the developer has access to the code created through Scaffold Generation and can use it as a foundation to branch out into custom interpretations of the simple CRUD scenario. [[http://en.wikipedia.org/wiki/Scaffold_(programming) 1], [http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://grails.org/Scaffolding 10], [http://www.djangobook.com/ 14], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Ruby on Rails=&lt;br /&gt;
Scaffolding became popular in [http://rubyonrails.org/ Ruby on Rails] and has since moved on to several other frameworks. The first generation of Ruby on Rails supported Dynamic Scaffolding. Scaffold Generation was also supported, however books, demos, and tutorials based on the first generation of Ruby on Rails largely omitted this fact. Beginning with the second generation of Ruby on Rails, Dynamic Scaffolding was no longer supported and Scaffolding Generation took center stage.&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 1.x]==&lt;br /&gt;
In the first generation of Ruby on Rails a developer would generate a modal, then use a migrate file to create layout columns in the model's database table. After that they would generate a controller and add scaffolding. A scaffolding example in Ruby on Rails 1.x would look like the example below.[[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
scaffold :modelname&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==[http://rubyonrails.org/ Ruby on Rails 2.x]==&lt;br /&gt;
Ruby on Rails 2.x may have taken away Dynamic Scaffolding but it made Scaffold Generation simpler and involving less steps. This is due to being able to create your model, migrate file, and column layout all in one step. A scaffolding example in Ruby on Rails 2.x would look like the example below. [[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html 2], [http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion 3], [http://guides.rubyonrails.org/ 15]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 ./script/generate scaffold ModelName field1:type field2:type field3:type&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once this script is executed the generator will build 14 files in your application, along with some folders, and edit one more. &lt;br /&gt;
Here’s a quick overview of what it creates:&lt;br /&gt;
&lt;br /&gt;
*The model with the name you specified as ModelName&lt;br /&gt;
*Migration script to create the ModelNames table in your database&lt;br /&gt;
*A set of views for add, edit, display, and delete&lt;br /&gt;
*A view to control the overall look and feel of the views&lt;br /&gt;
*A cascading style sheet to make the scaffold views look better&lt;br /&gt;
*the ModalName controller&lt;br /&gt;
*Testing harness for the ModalName controller&lt;br /&gt;
*Helper functions&lt;br /&gt;
*Routing information&lt;br /&gt;
*Unit testing harness for ModalName&lt;br /&gt;
*Unit testing harness for ModalName helper&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Python=&lt;br /&gt;
==[http://www.djangoproject.com/ Django]==&lt;br /&gt;
Django is a high-level [http://www.python.org/ python] web framework that was written in a newsroom to provide as much automation as possible for web developers under heavy deadlines. In Django you find scaffolding in what it calls the ''admin interface''. The idea behind the ''admin interface'' is that user pages differ greatly from client to client, but administrative tools largely remain the same and can be very repetitive to develop over and over; therefore it makes since to create a tool that will create these types of applications for us. By hooking to the metadata in your model, a fully functional web application can immediately be used as an administration tool to help manage your site. The way the ''admin interface'' is implemented is: for each model you want to associate with the admin interface, you mark that model. Then in your url.py file you add the url for the ''admin interface''. This would look like the example below:[[http://www.djangobook.com/ 14]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
 urlpatterns = patterns('',&lt;br /&gt;
    (r'^admin/', include('django.contrib.admin.urls')),&lt;br /&gt;
 )&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This use of scaffolding in Django quickly and easily created an entire administration application.&lt;br /&gt;
&lt;br /&gt;
This is accomplished mainly in two files. They are called scaffold.py and meta_scaffold.py. The scaffold.py file is used to generate a particular model. The meta_scaffold.py file is used to generate a template for all of the models.[[http://code.djangoproject.com/wiki/Scaffolding 17]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in PHP= &lt;br /&gt;
==[http://cakephp.org/ CakePHP]==&lt;br /&gt;
When Ruby on Rails began to take off, many frameworks decided to model themselves after what Ruby on Rails was doing. CakePHP is a web development framework written in [http://www.php.net/ PHP] that has incorporated many of the same concepts and design principles as Ruby on Rails. Because of this CakePHP prides itself on supporting scaffolding.[[http://en.wikipedia.org/wiki/CakePHP 7]]&lt;br /&gt;
&lt;br /&gt;
CakePHP really has two types of scaffolding, one that it is actually called Scaffolding and another that is called Bake. What CakePHP calls Scaffolding is really like Dynamic Scaffolding. Here you have a model and then in your controller you declare a scaffold variable. CakePHP handles the rest behind the scenes. An example would look like the code below: [[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm 4], [http://book.cakephp.org/view/105/Scaffolding 5]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;?php&lt;br /&gt;
&lt;br /&gt;
class MyController extends AppController {&lt;br /&gt;
    var $scaffold;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
?&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The Bake console with CakePHP generates code for the models, views, and controllers. Bake works like Scaffold Generation and creates a fully functional structure a developer can learn from or build upon. An example would look like the code below:[[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ 6]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
cake bake model [model name]&lt;br /&gt;
cake bake controller [controller name]&lt;br /&gt;
cake bake view [view name]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Java=&lt;br /&gt;
==[http://grails.org/ GRails]==&lt;br /&gt;
GRails is an open source framework that integrates with a programming environment called [http://groovy.codehaus.org/ Groovy] which is based on the [http://www.java.com/en/ Java] platform. GRails supports Dynamic scaffolding however it does allow a developer to access the generated code if they want it. If a developer tells GRails to install templates then the current scaffold code will be created in a template file that can be modified to fit specific needs. GRails supports other Java technologies such as Spring and Hibernate. An example snippet of scaffoldng in GRails would look like the example below.[[http://en.wikipedia.org/wiki/Grails_(framework) 9], [http://grails.org/Scaffolding 10]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class myController{&lt;br /&gt;
 def scaffold=true&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In order to edit the templates generated by the Dynamic Scaffolding you must install them. The installed templates would be put in a new folder called 'templates' in the '/src' directory. An example would look like the example below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
grails install-templates&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A popular tactic to use is to generate the templates of the scaffolding before letting the scaffold create the views. This will allow the developer to edit the templates to meet the layout requirements of the project. That way, when the scaffold generates the views they all adhere to those layout requirements without having to modify each one. [[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates 16]]&lt;br /&gt;
&lt;br /&gt;
For a short video tutorial on scaffolding in GRails please visit [[http://www.youtube.com/watch?v=LWoCfTyWG_E 19]]&lt;br /&gt;
&lt;br /&gt;
==[http://appfuse.org/display/APF/Home Appfuse]==&lt;br /&gt;
Appfuse is an open source project and application that uses open source tools built on the java platform to help a developer build web applications quickly. Appfuse is not actually a framework. Appfuse is more of a tool for code generation that can be used with other Java web frameworks. It can be integrated into other open source technolgies such as Spring, Hibernate, and Struts.[[http://en.wikipedia.org/wiki/AppFuse 8]]&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in .NET=&lt;br /&gt;
[http://www.microsoft.com/NET/ .NET] is a Microsoft framework that can be used to develop applications on machines running Microsoft software. In .NET Microsoft includes scaffolding as part of a broader structure it calls Dynamic Data. Dynamic Data uses LINQ to SQL for it's data access from which it builds corresponding controllers and views. Dynamic Data was originally part of a project called Blinq but that project was terminated and Dynamic Data became a part of .NET in its 3.5 extensions package. An example of setting up a scaffold in .NET would look like the example below.[[http://www.infoq.com/news/2007/12/aspnet-dynamic-data 11]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
ScaffoldTable(true)&lt;br /&gt;
public partial calss myClass{&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scaffolding in Flash=&lt;br /&gt;
==[http://www.gaiaflashframework.com/ Gaia]==&lt;br /&gt;
Gaia is an open source front-end framework for the [http://www.adobe.com/products/flash/ Flash] programming environment. The term front-end framework is meant to mean that no advanced knowledge of the Flash coding convention is required in order to get up and running and can be used by novice developers. The fact that Gaia prides itself on requiring little to no code to get going is nothing new compared to other frameworks, however, what makes Gaia interesting is its support for [http://en.wikipedia.org/wiki/Search_engine_optimization SEO] (Search Engine Optimization) scaffolding. The way that SEO scaffolding works is it generates the XHTML pages for every SEO enabled page on the site. For each one of these XHTML pages the copy for the developer's flash is included. This one file per page relationship makes it much easier for the developer to optimize his/her site for search engines. The scaffolding information is stored in a file called Scaffold.as. An example of accessing the scaffolding from a page would look like the example below.[[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ 12]]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
new Scaffold(this);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Resources=&lt;br /&gt;
1.[http://en.wikipedia.org/wiki/Scaffold_(programming) http://en.wikipedia.org/wiki/Scaffold_(programming)]&amp;lt;br/&amp;gt;&lt;br /&gt;
2.[http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html http://fairleads.blogspot.com/2007/12/rails-20-and-scaffolding-step-by-step.html]&amp;lt;br/&amp;gt;&lt;br /&gt;
3.[http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion http://www.packtpub.com/article/Working-with-Rails-ActiveRecord-Migrations-Models-Scaffolding-and-Database-Completion]&amp;lt;br/&amp;gt;&lt;br /&gt;
4.[http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm http://www.developer.com/lang/php/article.php/3636686/Scaffolding-with-CakePHP---Managing-Your-Fantasy-Football-Team.htm]&amp;lt;br/&amp;gt;&lt;br /&gt;
5.[http://book.cakephp.org/view/105/Scaffolding http://book.cakephp.org/view/105/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
6.[http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/ http://www.webdevelopment2.com/cakephp-bake-baking-models-controllers-views-cakephp-12/]&amp;lt;br/&amp;gt;&lt;br /&gt;
7.[http://en.wikipedia.org/wiki/CakePHP http://en.wikipedia.org/wiki/CakePHP]&amp;lt;br/&amp;gt;&lt;br /&gt;
8.[http://en.wikipedia.org/wiki/AppFuse http://en.wikipedia.org/wiki/AppFuse]&amp;lt;br/&amp;gt;&lt;br /&gt;
9.[http://en.wikipedia.org/wiki/Grails_(framework) http://en.wikipedia.org/wiki/Grails_(framework)]&amp;lt;br/&amp;gt;&lt;br /&gt;
10.[http://grails.org/Scaffolding http://grails.org/Scaffolding]&amp;lt;br/&amp;gt;&lt;br /&gt;
11.[http://www.infoq.com/news/2007/12/aspnet-dynamic-data http://www.infoq.com/news/2007/12/aspnet-dynamic-data]&amp;lt;br/&amp;gt;&lt;br /&gt;
12.[http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/ http://www.stevensacks.net/2008/04/16/gaia-flash-framework-21-seo-scaffolding/]&amp;lt;br/&amp;gt;&lt;br /&gt;
13.[http://en.wikipedia.org/wiki/Search_engine_optimization http://en.wikipedia.org/wiki/Search_engine_optimization]&amp;lt;br/&amp;gt;&lt;br /&gt;
14.[http://www.djangobook.com/ http://www.djangobook.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
15.[http://guides.rubyonrails.org/ http://guides.rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
16.[http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates http://docs.codehaus.org/display/GRAILS/Artifact+and+Scaffolding+Templates]&amp;lt;br/&amp;gt;&lt;br /&gt;
17.[http://code.djangoproject.com/wiki/Scaffolding http://code.djangoproject.com/wiki/Scaffolding]&lt;br /&gt;
&lt;br /&gt;
=Literature=&lt;br /&gt;
18.[http://www.amazon.com/gp/product/1934356166/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=486539851&amp;amp;pf_rd_s=lpo-top-stripe-1&amp;amp;pf_rd_t=201&amp;amp;pf_rd_i=097669400X&amp;amp;pf_rd_m=ATVPDKIKX0DER&amp;amp;pf_rd_r=0JWFRF8AMQGA8Z1X0YQ3 Agile Web Development with Rails]&lt;br /&gt;
&lt;br /&gt;
=Media=&lt;br /&gt;
19.[http://www.youtube.com/watch?v=LWoCfTyWG_E http://www.youtube.com/watch?v=LWoCfTyWG_E]&lt;br /&gt;
&lt;br /&gt;
=Official Sites=&lt;br /&gt;
[http://rubyonrails.org/ http://rubyonrails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.djangoproject.com/ http://www.djangoproject.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://cakephp.org/ http://cakephp.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://appfuse.org/display/APF/Home http://appfuse.org/display/APF/Home]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://grails.org/ http://grails.org/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.microsoft.com/NET/ http://www.microsoft.com/NET/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://www.gaiaflashframework.com/ http://www.gaiaflashframework.com/]&amp;lt;br/&amp;gt;&lt;br /&gt;
[http://groovy.codehaus.org/ http://groovy.codehaus.org/]&amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Srstarr</name></author>
	</entry>
</feed>