<?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=Vksingh</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=Vksingh"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Vksingh"/>
	<updated>2026-08-15T15:21:09Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28919</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28919"/>
		<updated>2009-11-19T00:09:41Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can [http://en.wikipedia.org/wiki/Agile_software_development Agile] complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design pattern] which give structure and name to commonly occuring problem, [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodology] or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_methodology Software development methodology] (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, [http://en.wikipedia.org/wiki/Software_design design], development, [http://en.wikipedia.org/wiki/Software_testing testing], documentation, [http://en.wikipedia.org/wiki/Computer_programming implementation] and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of [http://en.wikipedia.org/wiki/Software_development_process Software Development] requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is then, the software developers role to communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems,time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the phase where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A traceability matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] have evolved over the years.Each have its own recognized strengths and weakness. Each system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] are listed below.&lt;br /&gt;
&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_software_development Agile software development].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Waterfall_model Waterfall model].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Spiral_model Spiral model].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Test-driven_development Test-driven development (TDD)].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Design-driven_development Design-driven development (D3)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_process Software development process] goes through the phases of requirements, design, development, testing and maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : [http://en.wikipedia.org/wiki/Agile_software_development Agile Methodology]====&lt;br /&gt;
“[http://en.wikipedia.org/wiki/Agile_software_development Agile]” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA (Service Oriented Architecture ). [http://en.wikipedia.org/wiki/Agile_software_development Agile] programming breaks a project down into many mini-projects, instead of one huge &amp;quot;Big Bang&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The difference between [http://en.wikipedia.org/wiki/Agile_software_development Agile] development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Agile_software_development Agile development] focuses on user adoption and experience. Wikipedia describes Agile software development as &amp;quot;a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams. &amp;quot; [http://en.wikipedia.org/wiki/Agile_software_development Agile] encourages developers and end users to work closely with one another to ensure that unique user needs are met and that business activities are optimized.  This is accomplished by developing in short development bursts (1 - 2 week periods) and gaining feedback on the usefulness of the software application.  The feedback should come from the users that will actually be using the system.  The thinking behind this approach is that users are subject matter experts and are more likely to adopt the change because they took an active role in designing and testing the new changes to the work flow through the iterative software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the well-known [http://en.wikipedia.org/wiki/Agile_software_development agile] [http://en.wikipedia.org/wiki/Software_development_process software development] methods:&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_Modeling Agile Modeling]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_Unified_Process Agile Unified Process] (AUP)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_Data_Method Agile Data Method]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Extreme_programming Extreme programming] (XP)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Scrum_(development) Scrum]&lt;br /&gt;
&lt;br /&gt;
And some of the Agile practices&lt;br /&gt;
&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Test_Driven_Development Test Driven Development] (TDD)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Behavior_Driven_Development Behavior Driven Development] (BDD)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Continuous_Integration Continuous Integration]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Pair_Programming Pair Programming]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===The [http://en.wikipedia.org/wiki/Agile_software_development Agile] Advantage===&lt;br /&gt;
&lt;br /&gt;
An [http://en.wikipedia.org/wiki/Agile_software_development agile] methodology addresses risks earlier in the project, rather than later. It effectively manages user requirements and provides early value through executable software, instead of postponing the delivery of a working system until the final implementation. An [http://en.wikipedia.org/wiki/Agile_software_development agile] methodology flushes out and accommodates change early in the project life cycle and supplies an early architectural baseline. It also supports component-based systems development, facilitates team collaboration, and, most importantly, ensures quality. Following are some of the advantages of agile:&lt;br /&gt;
&lt;br /&gt;
1. Address risks : &lt;br /&gt;
Its emphasis on architecture helps to deliver a fully functional working architecture early in the project, mitigating the technology risks.&lt;br /&gt;
&lt;br /&gt;
2. Deliver early value:&lt;br /&gt;
An iterative approach enables a team to deliver functional solutions as soon as possible. Working prototypes demonstrate core functionality at the beginning of the project. An architectural baseline ensures that the technologies put into place will meet the fundamental requirements&lt;br /&gt;
&lt;br /&gt;
3. Accommodate change early:&lt;br /&gt;
Project change isn’t bad; it’s the timing and magnitude of the change that causes problems. Agile methodologies manage and promote the discovery of necessary changes early in a project.&lt;br /&gt;
&lt;br /&gt;
4. Facilitate team collaboration.&lt;br /&gt;
&lt;br /&gt;
5. Ensure quality early.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Agile_software_development Agile] has been successful in delivering quality product with lesser time.The most important gain of this methodology is that it almost removes the last minute surprises. Therefore the risk involved is very less. Below is the risk comparision between agile and [http://en.wikipedia.org/wiki/Waterfall_model waterfall model].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agileVsWaterfallRisk.gif|650px|thumb|center| agile Vs Waterfall Risk.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] http://en.wikipedia.org/wiki/Agile_software_development&lt;br /&gt;
&lt;br /&gt;
[2] http://en.wikipedia.org/wiki/List_of_software_development_philosophies&lt;br /&gt;
&lt;br /&gt;
[3] http://en.wikipedia.org/wiki/Waterfall_model&lt;br /&gt;
&lt;br /&gt;
[4] http://www.stsc.hill.af.mil/crosstalk/1995/01/comparis.asp&lt;br /&gt;
&lt;br /&gt;
[5] http://eggsonbread.com/2009/07/10/agile-development-in-a-nutshell/ &lt;br /&gt;
&lt;br /&gt;
[6] [http://3.bp.blogspot.com/_s0xJIGrbtjQ/SWNwAADda9I/AAAAAAAAAA8/oqJyRlzMVmU/s1600-h/agile+vs+waterfall.JPG agile waterfall]&lt;br /&gt;
&lt;br /&gt;
[7] http://sapnetweavermagazine.com/archive/Volume_04_%282008%29/Issue_01_%28Winter%29/v4i1a06.cfm?session=&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28913</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28913"/>
		<updated>2009-11-19T00:05:59Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can [http://en.wikipedia.org/wiki/Agile_software_development Agile] complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design pattern] which give structure and name to commonly occuring problem, [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodology] or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_methodology Software development methodology] (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, [http://en.wikipedia.org/wiki/Software_design design], development, [http://en.wikipedia.org/wiki/Software_testing testing], documentation, [http://en.wikipedia.org/wiki/Computer_programming implementation] and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of [http://en.wikipedia.org/wiki/Software_development_process Software Development] requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is then, the software developers role to communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems,time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the phase where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A traceability matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] have evolved over the years.Each have its own recognized strengths and weakness. Each system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] are listed below.&lt;br /&gt;
&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_software_development Agile software development].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Waterfall_model Waterfall model].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Spiral_model Spiral model].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Test-driven_development Test-driven development (TDD)].&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Design-driven_development Design-driven development (D3)].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_process Software development process] goes through the phases of requirements, design, development, testing and maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : [http://en.wikipedia.org/wiki/Agile_software_development Agile Methodology]====&lt;br /&gt;
“[http://en.wikipedia.org/wiki/Agile_software_development Agile]” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA (Service Oriented Architecture ). [http://en.wikipedia.org/wiki/Agile_software_development Agile] programming breaks a project down into many mini-projects, instead of one huge &amp;quot;Big Bang&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The difference between [http://en.wikipedia.org/wiki/Agile_software_development Agile] development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Agile_software_development Agile development] focuses on user adoption and experience. Wikipedia describes Agile software development as &amp;quot;a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams. &amp;quot; [http://en.wikipedia.org/wiki/Agile_software_development Agile] encourages developers and end users to work closely with one another to ensure that unique user needs are met and that business activities are optimized.  This is accomplished by developing in short development bursts (1 - 2 week periods) and gaining feedback on the usefulness of the software application.  The feedback should come from the users that will actually be using the system.  The thinking behind this approach is that users are subject matter experts and are more likely to adopt the change because they took an active role in designing and testing the new changes to the work flow through the iterative software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the well-known [http://en.wikipedia.org/wiki/Agile_software_development agile] [http://en.wikipedia.org/wiki/Software_development_process software development] methods:&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_Modeling Agile Modeling]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_Unified_Process Agile Unified Process] (AUP)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_Data_Method Agile Data Method]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Extreme_programming Extreme programming] (XP)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Scrum_(development) Scrum]&lt;br /&gt;
&lt;br /&gt;
And some of the Agile practices&lt;br /&gt;
&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Test_Driven_Development Test Driven Development] (TDD)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Behavior_Driven_Development Behavior Driven Development] (BDD)&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Continuous_Integration Continuous Integration]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Pair_Programming Pair Programming]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===The [http://en.wikipedia.org/wiki/Agile_software_development Agile] Advantage===&lt;br /&gt;
&lt;br /&gt;
An [http://en.wikipedia.org/wiki/Agile_software_development agile] methodology addresses risks earlier in the project, rather than later. It effectively manages user requirements and provides early value through executable software, instead of postponing the delivery of a working system until the final implementation. An [http://en.wikipedia.org/wiki/Agile_software_development agile] methodology flushes out and accommodates change early in the project life cycle and supplies an early architectural baseline. It also supports component-based systems development, facilitates team collaboration, and, most importantly, ensures quality. Following are some of the advantages of agile:&lt;br /&gt;
&lt;br /&gt;
1. Address risks : &lt;br /&gt;
Its emphasis on architecture helps to deliver a fully functional working architecture early in the project, mitigating the technology risks.&lt;br /&gt;
&lt;br /&gt;
2. Deliver early value:&lt;br /&gt;
An iterative approach enables a team to deliver functional solutions as soon as possible. Working prototypes demonstrate core functionality at the beginning of the project. An architectural baseline ensures that the technologies put into place will meet the fundamental requirements&lt;br /&gt;
&lt;br /&gt;
3. Accommodate change early:&lt;br /&gt;
Project change isn’t bad; it’s the timing and magnitude of the change that causes problems. Agile methodologies manage and promote the discovery of necessary changes early in a project.&lt;br /&gt;
&lt;br /&gt;
4. Facilitate team collaboration.&lt;br /&gt;
&lt;br /&gt;
5. Ensure quality early.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Agile_software_development Agile] has been successful in delivering quality product with lesser time.The most important gain of this methodology is that it almost removes the last minute surprises. Therefore the risk involved is very less. Below is the risk comparision between agile and [http://en.wikipedia.org/wiki/Waterfall_model waterfall model].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agileVsWaterfallRisk.gif|650px|thumb|center| agile Vs Waterfall Risk.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28897</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28897"/>
		<updated>2009-11-18T23:55:32Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can [http://en.wikipedia.org/wiki/Agile_software_development Agile] complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the [http://en.wikipedia.org/wiki/Design_pattern_(computer_science) design pattern] which give structure and name to commonly occuring problem, [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodology] or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_methodology Software development methodology] (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, [http://en.wikipedia.org/wiki/Software_design design], development, [http://en.wikipedia.org/wiki/Software_testing testing], documentation, [http://en.wikipedia.org/wiki/Computer_programming implementation] and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of [http://en.wikipedia.org/wiki/Software_development_process Software Development] requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is then, the software developers role to communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems,time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the phase where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A traceability matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] have evolved over the years.Each have its own recognized strengths and weakness. Each system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of [http://en.wikipedia.org/wiki/Software_development_methodology Software development methodologies] are listed below.&lt;br /&gt;
&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Agile_software_development Agile software development].&lt;br /&gt;
#Waterfall model.&lt;br /&gt;
#Spiral model.&lt;br /&gt;
#Test-driven development (TDD).&lt;br /&gt;
#Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Software_development_process Software development process] goes through the phases of requirements, design, development, testing and maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : [http://en.wikipedia.org/wiki/Agile_software_development Agile Methodology]====&lt;br /&gt;
“[http://en.wikipedia.org/wiki/Agile_software_development Agile]” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA (Service Oriented Architecture ). [http://en.wikipedia.org/wiki/Agile_software_development Agile] programming breaks a project down into many mini-projects, instead of one huge &amp;quot;Big Bang&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
The difference between [http://en.wikipedia.org/wiki/Agile_software_development Agile] development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Agile_software_development Agile development] focuses on user adoption and experience. Wikipedia describes Agile software development as &amp;quot;a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams. &amp;quot; [http://en.wikipedia.org/wiki/Agile_software_development Agile] encourages developers and end users to work closely with one another to ensure that unique user needs are met and that business activities are optimized.  This is accomplished by developing in short development bursts (1 - 2 week periods) and gaining feedback on the usefulness of the software application.  The feedback should come from the users that will actually be using the system.  The thinking behind this approach is that users are subject matter experts and are more likely to adopt the change because they took an active role in designing and testing the new changes to the work flow through the iterative software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the well-known [http://en.wikipedia.org/wiki/Agile_software_development agile] [http://en.wikipedia.org/wiki/Software_development_process software development] methods:&lt;br /&gt;
#Agile Modeling&lt;br /&gt;
#Agile Unified Process (AUP)&lt;br /&gt;
#Agile Data Method&lt;br /&gt;
#Extreme programming (XP)&lt;br /&gt;
#Scrum&lt;br /&gt;
&lt;br /&gt;
And some of the Agile practices&lt;br /&gt;
&lt;br /&gt;
#Test Driven Development (TDD)&lt;br /&gt;
#Behavior Driven Development (BDD)&lt;br /&gt;
#Continuous Integration&lt;br /&gt;
#Pair Programming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===The [http://en.wikipedia.org/wiki/Agile_software_development Agile] Advantage===&lt;br /&gt;
&lt;br /&gt;
An [http://en.wikipedia.org/wiki/Agile_software_development agile] methodology addresses risks earlier in the project, rather than later. It effectively manages user requirements and provides early value through executable software, instead of postponing the delivery of a working system until the final implementation. An [http://en.wikipedia.org/wiki/Agile_software_development agile] methodology flushes out and accommodates change early in the project life cycle and supplies an early architectural baseline. It also supports component-based systems development, facilitates team collaboration, and, most importantly, ensures quality. Following are some of the advantages of agile:&lt;br /&gt;
&lt;br /&gt;
1. Address risks : &lt;br /&gt;
Its emphasis on architecture helps to deliver a fully functional working architecture early in the project, mitigating the technology risks.&lt;br /&gt;
&lt;br /&gt;
2. Deliver early value:&lt;br /&gt;
An iterative approach enables a team to deliver functional solutions as soon as possible. Working prototypes demonstrate core functionality at the beginning of the project. An architectural baseline ensures that the technologies put into place will meet the fundamental requirements&lt;br /&gt;
&lt;br /&gt;
3. Accommodate change early:&lt;br /&gt;
Project change isn’t bad; it’s the timing and magnitude of the change that causes problems. Agile methodologies manage and promote the discovery of necessary changes early in a project.&lt;br /&gt;
&lt;br /&gt;
4. Facilitate team collaboration.&lt;br /&gt;
&lt;br /&gt;
5. Ensure quality early.&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Agile_software_development Agile] has been successful in delivering quality product with lesser time.The most important gain of this methodology is that it almost removes the last minute surprises. Therefore the risk involved is very less. Below is the risk comparision between agile and waterfall model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agileVsWaterfallRisk.gif|650px|thumb|center| agile Vs Waterfall Risk.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28186</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28186"/>
		<updated>2009-11-18T05:55:51Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can Agile complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
#Agile software development.&lt;br /&gt;
#Waterfall model.&lt;br /&gt;
#Spiral model.&lt;br /&gt;
#Test-driven development (TDD).&lt;br /&gt;
#Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : Agile Methodology====&lt;br /&gt;
“Agile” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA. Agile programming breaks a project down into many mini-projects, instead of one huge “Big Bang.&lt;br /&gt;
&lt;br /&gt;
The difference between Agile development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
Agile development focuses on user adoption and experience. Wikipedia describes Agile software development as &amp;quot;a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams. &amp;quot; Agile encourages developers and end users to work closely with one another to ensure that unique user needs are met and that business activities are optimized.  This is accomplished by developing in short development bursts (1 - 2 week periods) and gaining feedback on the usefulness of the software application.  The feedback should come from the users that will actually be using the system.  The thinking behind this approach is that users are subject matter experts and are more likely to adopt the change because they took an active role in designing and testing the new changes to the workflow through the iterative software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the well-known agile software development methods:&lt;br /&gt;
#Agile Modeling&lt;br /&gt;
#Agile Unified Process (AUP)&lt;br /&gt;
#Agile Data Method&lt;br /&gt;
#Extreme programming (XP)&lt;br /&gt;
#Scrum&lt;br /&gt;
&lt;br /&gt;
And some of the Agile practices&lt;br /&gt;
&lt;br /&gt;
#Test Driven Development (TDD)&lt;br /&gt;
#Behavior Driven Development (BDD)&lt;br /&gt;
#Continuous Integration&lt;br /&gt;
#Pair Programming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===The Agile Advantage===&lt;br /&gt;
&lt;br /&gt;
An agile methodology addresses risks earlier in the project, rather than later. It effectively manages user requirements and provides early value through executable software, instead of postponing the delivery of a working system until the final implementation. An agile methodology flushes out and accommodates change early in the project life cycle and supplies an early architectural baseline. It also supports component-based systems development, facilitates team collaboration, and, most importantly, ensures quality. Following are some of the advantages of agile:&lt;br /&gt;
&lt;br /&gt;
1. Address risks : &lt;br /&gt;
Its emphasis on architecture helps to deliver a fully functional working architecture early in the project, mitigating the technology risks.&lt;br /&gt;
&lt;br /&gt;
2. Deliver early value:&lt;br /&gt;
An iterative approach enables a team to deliver functional solutions as soon as possible. Working prototypes demonstrate core functionality at the beginning of the project. An architectural baseline ensures that the technologies put into place will meet the fundamental requirements&lt;br /&gt;
&lt;br /&gt;
3. Accommodate change early:&lt;br /&gt;
Project change isn’t bad; it’s the timing and magnitude of the change that causes problems. Agile methodologies manage and promote the discovery of necessary changes early in a project.&lt;br /&gt;
&lt;br /&gt;
4. Facilitate team collaboration.&lt;br /&gt;
&lt;br /&gt;
5. Ensure quality early.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
Agile has been successful in delivering quality product with lesser time.The most important gain of this methodology is that it almost removes the last minute surprises. Therefore the risk involved is very less. Below is the risk comparision between agile and waterfall model.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agileVsWaterfallRisk.gif|650px|thumb|center| agile Vs Waterfall Risk.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:AgileVsWaterfallRisk.gif&amp;diff=28184</id>
		<title>File:AgileVsWaterfallRisk.gif</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:AgileVsWaterfallRisk.gif&amp;diff=28184"/>
		<updated>2009-11-18T05:54:42Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28179</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28179"/>
		<updated>2009-11-18T05:49:42Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* '''Development methodologies''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can Agile complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
#Agile software development.&lt;br /&gt;
#Waterfall model.&lt;br /&gt;
#Spiral model.&lt;br /&gt;
#Test-driven development (TDD).&lt;br /&gt;
#Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : Agile Methodology====&lt;br /&gt;
“Agile” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA. Agile programming breaks a project down into many mini-projects, instead of one huge “Big Bang.&lt;br /&gt;
&lt;br /&gt;
The difference between Agile development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
Agile development focuses on user adoption and experience. Wikipedia describes Agile software development as &amp;quot;a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams. &amp;quot; Agile encourages developers and end users to work closely with one another to ensure that unique user needs are met and that business activities are optimized.  This is accomplished by developing in short development bursts (1 - 2 week periods) and gaining feedback on the usefulness of the software application.  The feedback should come from the users that will actually be using the system.  The thinking behind this approach is that users are subject matter experts and are more likely to adopt the change because they took an active role in designing and testing the new changes to the workflow through the iterative software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the well-known agile software development methods:&lt;br /&gt;
#Agile Modeling&lt;br /&gt;
#Agile Unified Process (AUP)&lt;br /&gt;
#Agile Data Method&lt;br /&gt;
#Extreme programming (XP)&lt;br /&gt;
#Scrum&lt;br /&gt;
&lt;br /&gt;
And some of the Agile practices&lt;br /&gt;
&lt;br /&gt;
#Test Driven Development (TDD)&lt;br /&gt;
#Behavior Driven Development (BDD)&lt;br /&gt;
#Continuous Integration&lt;br /&gt;
#Pair Programming&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===The Agile Advantage===&lt;br /&gt;
&lt;br /&gt;
An agile methodology addresses risks earlier in the project, rather than later. It effectively manages user requirements and provides early value through executable software, instead of postponing the delivery of a working system until the final implementation. An agile methodology flushes out and accommodates change early in the project life cycle and supplies an early architectural baseline. It also supports component-based systems development, facilitates team collaboration, and, most importantly, ensures quality. Following are some of the advantages of agile:&lt;br /&gt;
&lt;br /&gt;
1. Address risks : &lt;br /&gt;
Its emphasis on architecture helps to deliver a fully functional working architecture early in the project, mitigating the technology risks.&lt;br /&gt;
&lt;br /&gt;
2. Deliver early value:&lt;br /&gt;
An iterative approach enables a team to deliver functional solutions as soon as possible. Working prototypes demonstrate core functionality at the beginning of the project. An architectural baseline ensures that the technologies put into place will meet the fundamental requirements&lt;br /&gt;
&lt;br /&gt;
3. Accommodate change early:&lt;br /&gt;
Project change isn’t bad; it’s the timing and magnitude of the change that causes problems. Agile methodologies manage and promote the discovery of necessary changes early in a project.&lt;br /&gt;
&lt;br /&gt;
4. Facilitate team collaboration.&lt;br /&gt;
&lt;br /&gt;
5. Ensure quality early.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28157</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28157"/>
		<updated>2009-11-18T05:32:21Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Solution : Agile Methodology */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can Agile complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
#Agile software development.&lt;br /&gt;
#Waterfall model.&lt;br /&gt;
#Spiral model.&lt;br /&gt;
#Test-driven development (TDD).&lt;br /&gt;
#Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : Agile Methodology====&lt;br /&gt;
“Agile” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA. Agile programming breaks a project down into many mini-projects, instead of one huge “Big Bang.&lt;br /&gt;
&lt;br /&gt;
The difference between Agile development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
Agile development focuses on user adoption and experience. Wikipedia describes Agile software development as &amp;quot;a group of software development methodologies based on iterative development, where requirements and solutions evolve through collaboration between self-organizing cross-functional teams. &amp;quot; Agile encourages developers and end users to work closely with one another to ensure that unique user needs are met and that business activities are optimized.  This is accomplished by developing in short development bursts (1 - 2 week periods) and gaining feedback on the usefulness of the software application.  The feedback should come from the users that will actually be using the system.  The thinking behind this approach is that users are subject matter experts and are more likely to adopt the change because they took an active role in designing and testing the new changes to the workflow through the iterative software development process.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Some of the well-known agile software development methods:&lt;br /&gt;
#Agile Modeling&lt;br /&gt;
#Agile Unified Process (AUP)&lt;br /&gt;
#Agile Data Method&lt;br /&gt;
#Extreme programming (XP)&lt;br /&gt;
#Scrum&lt;br /&gt;
&lt;br /&gt;
And some of the Agile practices&lt;br /&gt;
&lt;br /&gt;
#Test Driven Development (TDD)&lt;br /&gt;
#Behavior Driven Development (BDD)&lt;br /&gt;
#Continuous Integration&lt;br /&gt;
#Pair Programming&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28122</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28122"/>
		<updated>2009-11-18T05:16:00Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can Agile complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
#Agile software development.&lt;br /&gt;
#Waterfall model.&lt;br /&gt;
#Spiral model.&lt;br /&gt;
#Test-driven development (TDD).&lt;br /&gt;
#Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : Agile Methodology====&lt;br /&gt;
“Agile” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA. Agile programming breaks a project down into many mini-projects, instead of one huge “Big Bang.&lt;br /&gt;
&lt;br /&gt;
The difference between Agile development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28117</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28117"/>
		<updated>2009-11-18T05:14:36Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can Agile complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology provides a framework which can be used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
1. Agile software development.&lt;br /&gt;
2. Waterfall model.&lt;br /&gt;
3. Spiral model.&lt;br /&gt;
4. Test-driven development (TDD).&lt;br /&gt;
5. Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : Agile Methodology====&lt;br /&gt;
“Agile” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA. Agile programming breaks a project down into many mini-projects, instead of one huge “Big Bang.&lt;br /&gt;
&lt;br /&gt;
The difference between Agile development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28115</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28115"/>
		<updated>2009-11-18T05:13:32Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''How can Agile complement other development methodologies'''&lt;br /&gt;
&lt;br /&gt;
Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology is a frame work which is used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
1. Agile software development.&lt;br /&gt;
2. Waterfall model.&lt;br /&gt;
3. Spiral model.&lt;br /&gt;
4. Test-driven development (TDD).&lt;br /&gt;
5. Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : Agile Methodology====&lt;br /&gt;
“Agile” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA. Agile programming breaks a project down into many mini-projects, instead of one huge “Big Bang.&lt;br /&gt;
&lt;br /&gt;
The difference between Agile development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28107</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28107"/>
		<updated>2009-11-18T05:11:23Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* '''Development methodologies''' */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology is a frame work which is used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
1. Agile software development.&lt;br /&gt;
2. Waterfall model.&lt;br /&gt;
3. Spiral model.&lt;br /&gt;
4. Test-driven development (TDD).&lt;br /&gt;
5. Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Solution : Agile Methodology====&lt;br /&gt;
“Agile” methodologies are a new way of developing the modular object-oriented software used for enterprise SOA. Agile programming breaks a project down into many mini-projects, instead of one huge “Big Bang.&lt;br /&gt;
&lt;br /&gt;
The difference between Agile development and rest of methodologies can be related to the difference between a modern missile and a medieval cannonball. With the right information and calculations, the target of a cannonball could be accurately plotted. But once fired, there was no way of altering its trajectory. If the calculations were wrong, or if the target moved, it would miss. By contrast the modern missile can follow a given target with a series of incremental changes to its direction. It can even be given alternative targets when in flight, if the original is no longer appropriate.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:agile_vs_waterfall.jpg|650px|thumb|center| agile_vs_waterfall.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===How can Agile complement other development methodologies===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Agile Vs waterFall===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Agile_vs_waterfall.jpg&amp;diff=28103</id>
		<title>File:Agile vs waterfall.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Agile_vs_waterfall.jpg&amp;diff=28103"/>
		<updated>2009-11-18T05:10:18Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28085</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28085"/>
		<updated>2009-11-18T04:58:10Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* General Problems faced during software development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology is a frame work which is used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
1. Agile software development.&lt;br /&gt;
2. Waterfall model.&lt;br /&gt;
3. Spiral model.&lt;br /&gt;
4. Test-driven development (TDD).&lt;br /&gt;
5. Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Software development cycle.]]&lt;br /&gt;
&lt;br /&gt;
====Waterfall model====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Prototyping====&lt;br /&gt;
====Incremental====&lt;br /&gt;
====Spiral====&lt;br /&gt;
====Rapid Application Development (RAD)====&lt;br /&gt;
====Agile====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===How can Agile complement other development methodologies===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Agile Vs waterFall===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28081</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=28081"/>
		<updated>2009-11-18T04:57:03Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* General Problems faced during software development */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology is a frame work which is used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
1. Agile software development.&lt;br /&gt;
2. Waterfall model.&lt;br /&gt;
3. Spiral model.&lt;br /&gt;
4. Test-driven development (TDD).&lt;br /&gt;
5. Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
Software development process goes through the phases of Requirements, Design, Development, Testing &amp;amp; Maintenance one after the other. It relies on the dream that once a step is 100% complete, it is also 100% right and it drives us to the delivery of a working software even the one the customer wants. But it doesn’t go that way in the software industry: customers don’t know what they need and use to ask many useless features, project leaders don’t succeed to write down the perfect requirements, analysts spend ages building up software architectures writing down pages of diagrams – software is definitely one of the most complex artifact humans can build up – and developers are human too, so they make mistakes too. It is often very hard to create exactly what the customer wants in software development. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:software_lyfCycle.png|650px|thumb|center| Milestone of version control development.]]&lt;br /&gt;
&lt;br /&gt;
====Waterfall model====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Prototyping====&lt;br /&gt;
====Incremental====&lt;br /&gt;
====Spiral====&lt;br /&gt;
====Rapid Application Development (RAD)====&lt;br /&gt;
====Agile====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===How can Agile complement other development methodologies===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Agile Vs waterFall===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Software_lyfCycle.png&amp;diff=28078</id>
		<title>File:Software lyfCycle.png</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Software_lyfCycle.png&amp;diff=28078"/>
		<updated>2009-11-18T04:56:33Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=27894</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=27894"/>
		<updated>2009-11-18T02:54:19Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology is a frame work which is used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve following four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A wide variety of Software Development Methodolgies have evolved over the years.Each have its own recognized strengths and weaknesses. One system development methodology is not necessarily suitable for use by all projects. Each of the available methodologies is best suited to specific kinds of projects, based on various technical, organizational, project and team considerations.&lt;br /&gt;
&lt;br /&gt;
Few of them are listed below.&lt;br /&gt;
&lt;br /&gt;
1. Agile software development.&lt;br /&gt;
2. Waterfall model.&lt;br /&gt;
3. Spiral model.&lt;br /&gt;
4. Test-driven development (TDD).&lt;br /&gt;
5. Design-driven development (D3).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====General Problems faced during software development====&lt;br /&gt;
&lt;br /&gt;
It is often very hard to create exactly what the customer wants in software development. Often the customer does not even knows what he wants, or it gets misinterpreted. With large software companies, the real ‘requirements’ can get mangled on so many levels. The below picture depicts it all:&lt;br /&gt;
&lt;br /&gt;
[[Image:software_development_parties.jpg|650px|thumb|center| Milestone of version control development.]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Waterfall model====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Prototyping====&lt;br /&gt;
====Incremental====&lt;br /&gt;
====Spiral====&lt;br /&gt;
====Rapid Application Development (RAD)====&lt;br /&gt;
====Agile====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===How can Agile complement other development methodologies===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Agile Vs waterFall===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Software_development_parties.jpg&amp;diff=27891</id>
		<title>File:Software development parties.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Software_development_parties.jpg&amp;diff=27891"/>
		<updated>2009-11-18T02:50:37Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=27852</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=27852"/>
		<updated>2009-11-18T02:18:42Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Similar to the design pattern which give structure and name to commonly occuring problem, Software development methodology or system development methodology is a frame work which is used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
Software Development Methodology (SDM) or Software Development Life Cycle (SDLC) is the documented collection of policies, processes and procedures used to conduct a Software Engineering project. Software Engineering project involves various stages viz. analysis, design, developement, testing, documentation, implementation and  evaluation.&lt;br /&gt;
&lt;br /&gt;
The art of Software Development requires a clear understanding of the project or business goals by both the customer commissioning the project and the technical team. It is the software devlopers role to then communicate with the project sponsor and translate a business concept into a working software system in a timely and effective manner.&lt;br /&gt;
&lt;br /&gt;
The use of systematic processes for the development of software reduces the risk that is inherent in any software project. These processes must be put in place in a careful manner to allow technical team members to solve problems in a creative and skillful manner.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Software Development Methodolgies involve four key steps&lt;br /&gt;
&lt;br /&gt;
1. Requirements&lt;br /&gt;
This is the phase where the Business Analyst or Project Manager works with the Customer to understand the project goals and translate this into a desired set of functional objectives.&lt;br /&gt;
&lt;br /&gt;
2. Design&lt;br /&gt;
In this phase a solution is mapped out with 'pen and paper'. The solution describes how the final software will operate and includes other practical components including the technologies to be used, hardware requirements, impact on other information systems and the time and resources required to implement the software.&lt;br /&gt;
&lt;br /&gt;
3. Implementation&lt;br /&gt;
This is the time where the agreed project plans are coded into a practical working system.&lt;br /&gt;
&lt;br /&gt;
4. Testing&lt;br /&gt;
Testing is performed on discrete units of the computer system as well as the solution as a whole. A tracibility matrix can be used to ensure that each functional objective set in the requirements phase has been solved. &lt;br /&gt;
&lt;br /&gt;
====Waterfall model====&lt;br /&gt;
====Prototyping====&lt;br /&gt;
====Incremental====&lt;br /&gt;
====Spiral====&lt;br /&gt;
====Rapid Application Development (RAD)====&lt;br /&gt;
====Agile====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How can Agile complement other development methodologies===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Agile Vs waterFall===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=27564</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 7 Agile</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_7_Agile&amp;diff=27564"/>
		<updated>2009-11-17T20:19:03Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;A software development methodology or system development methodology in software engineering is a framework that is used to structure, plan, and control the process of developing an information system.&lt;br /&gt;
== '''Development methodologies''' ==&lt;br /&gt;
 &lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
====Waterfall model====&lt;br /&gt;
====Prototyping====&lt;br /&gt;
====Incremental====&lt;br /&gt;
====Spiral====&lt;br /&gt;
====Rapid Application Development (RAD)====&lt;br /&gt;
====Agile====&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===How can Agile complement other development methodologies===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Agile Vs waterFall===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24703</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24703"/>
		<updated>2009-10-09T22:59:45Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Observer_pattern Observer pattern]===&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern](sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] is used when:&lt;br /&gt;
#An [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 abstraction] has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets us vary and reuse them independently.&amp;lt;br&amp;gt;&lt;br /&gt;
#A change to one object requires changing others, and we do not know how many objects need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
#An object should be able to notify other objects without making assumptions about who these objects are. In other words, we don't want these objects tightly coupled.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name&lt;br /&gt;
   attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
   def initialize( name, title, salary )&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
   # Give Jim a raise&lt;br /&gt;
   jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
   def update( changed_employee )&lt;br /&gt;
      puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
      puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name, :title&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary,payroll)&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
      @payroll = payroll&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      @payroll.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
   jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
   @name = name&lt;br /&gt;
   @title = title&lt;br /&gt;
   @salary = salary&lt;br /&gt;
   @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also we need  the following code to inform all of the observers that something has changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
   @salary = new_salary&lt;br /&gt;
   notify_observers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
def notify_observers&lt;br /&gt;
   @observers.each do |observer|&lt;br /&gt;
      observer.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The key moving part of notify_observers is '''''observer.update(self)'''''. This bit of code calls the update method on each observer, telling it that something (in this case, the salary) has changed on the Employee object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets us consider writing methods that add and delete observers from the Employee object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_observer(observer)&lt;br /&gt;
   @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
end&lt;br /&gt;
def delete_observer(observer)&lt;br /&gt;
   @observers.delete(observer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Putting all the pieces of the observer code discussed above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Subject&lt;br /&gt;
   def initialize&lt;br /&gt;
      @observers=[]&lt;br /&gt;
    end&lt;br /&gt;
   def add_observer(observer)&lt;br /&gt;
      @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
   end&lt;br /&gt;
   def delete_observer(observer)&lt;br /&gt;
      @observers.delete(observer)&lt;br /&gt;
   end&lt;br /&gt;
   def notify_observers&lt;br /&gt;
      @observers.each do |observer|&lt;br /&gt;
         observer.update(self)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And correspondingly the employee will inherit the subject as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee &amp;lt; Subject&lt;br /&gt;
   attr_reader :name, :address&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary)&lt;br /&gt;
      super()&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      notify_observers&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now any object that is interested in hearing about changes in Jim's salary can simply register as an observer on Jim's Employee object:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000.0)&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim.add_observer( payroll )&lt;br /&gt;
   jim.salary = 7000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hence by building this general mechanism, we have removed the implicit coupling between the Employee class and the Payroll object. Employee no longer cares which or how many other objects are interested in knowing about salary changes; it just forwards the news to any object that said that it was interested.&lt;br /&gt;
In addition, instances of the Employee class will be happy with no observers, one, or several observers.&lt;br /&gt;
&lt;br /&gt;
Now the payroll department will hear about it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 9000.0!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
Building patterns in Ruby is easier for a number of reasons:&lt;br /&gt;
#Ruby is dynamically typed. By dispensing with static typing, Ruby dramatically reduces the code overhead of building most programs, including those that implement patterns.&lt;br /&gt;
#Ruby has code closures. It allows us to pass around chunks of code and associated scope without having to laboriously construct entire classes and objects that do nothing else.&lt;br /&gt;
#Ruby classes are real objects. Because a class in Ruby is just another object, we can do any of the usual runtime things to a Ruby class that we can do to any other object: We can create totally new classes. We can modify existing classes by adding or deleting methods. We can even clone a class and change the copy, leaving the original alone.&lt;br /&gt;
#Ruby has an elegant system of code reuse. &lt;br /&gt;
&lt;br /&gt;
In addition to supporting garden-variety inheritance, Ruby allows us to define mixins, which are a simple but flexible way to write code that can be shared among several classes. All of this makes code in Ruby compressible. In Ruby, as in Java and C++, you can implement very sophisticated ideas, but with Ruby it becomes possible to hide the details of your implementations much more effectively.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
&lt;br /&gt;
[4] [http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
&lt;br /&gt;
[5] [http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
&lt;br /&gt;
[6] [http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
&lt;br /&gt;
[7] [http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
&lt;br /&gt;
[8] [http://en.wikipedia.org/wiki/Factory_method_pattern Factory]&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24695</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24695"/>
		<updated>2009-10-09T22:54:43Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Observer_pattern Observer pattern]===&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern](sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] is used when:&lt;br /&gt;
#An [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 abstraction] has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets us vary and reuse them independently.&amp;lt;br&amp;gt;&lt;br /&gt;
#A change to one object requires changing others, and we do not know how many objects need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
#An object should be able to notify other objects without making assumptions about who these objects are. In other words, we don't want these objects tightly coupled.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name&lt;br /&gt;
   attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
   def initialize( name, title, salary )&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
   # Give Jim a raise&lt;br /&gt;
   jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
   def update( changed_employee )&lt;br /&gt;
      puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
      puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name, :title&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary,payroll)&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
      @payroll = payroll&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      @payroll.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
   jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
   @name = name&lt;br /&gt;
   @title = title&lt;br /&gt;
   @salary = salary&lt;br /&gt;
   @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also we need  the following code to inform all of the observers that something has changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
   @salary = new_salary&lt;br /&gt;
   notify_observers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
def notify_observers&lt;br /&gt;
   @observers.each do |observer|&lt;br /&gt;
      observer.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The key moving part of notify_observers is '''''observer.update(self)'''''. This bit of code calls the update method on each observer, telling it that something (in this case, the salary) has changed on the Employee object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets us consider writing methods that add and delete observers from the Employee object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_observer(observer)&lt;br /&gt;
   @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
end&lt;br /&gt;
def delete_observer(observer)&lt;br /&gt;
   @observers.delete(observer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Putting all the pieces of the observer code discussed above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Subject&lt;br /&gt;
   def initialize&lt;br /&gt;
      @observers=[]&lt;br /&gt;
    end&lt;br /&gt;
   def add_observer(observer)&lt;br /&gt;
      @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
   end&lt;br /&gt;
   def delete_observer(observer)&lt;br /&gt;
      @observers.delete(observer)&lt;br /&gt;
   end&lt;br /&gt;
   def notify_observers&lt;br /&gt;
      @observers.each do |observer|&lt;br /&gt;
         observer.update(self)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And correspondingly the employee will inherit the subject as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee &amp;lt; Subject&lt;br /&gt;
   attr_reader :name, :address&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary)&lt;br /&gt;
      super()&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      notify_observers&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now any object that is interested in hearing about changes in Jim's salary can simply register as an observer on Jim's Employee object:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000.0)&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim.add_observer( payroll )&lt;br /&gt;
   jim.salary = 7000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hence by building this general mechanism, we have removed the implicit coupling between the Employee class and the Payroll object. Employee no longer cares which or how many other objects are interested in knowing about salary changes; it just forwards the news to any object that said that it was interested.&lt;br /&gt;
In addition, instances of the Employee class will be happy with no observers, one, or several observers.&lt;br /&gt;
&lt;br /&gt;
Now the payroll department will hear about it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 9000.0!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
&lt;br /&gt;
[4] [http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
&lt;br /&gt;
[5] [http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
&lt;br /&gt;
[6] [http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
&lt;br /&gt;
[7] [http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
&lt;br /&gt;
[8] [http://en.wikipedia.org/wiki/Factory_method_pattern Factory]&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24691</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24691"/>
		<updated>2009-10-09T22:50:41Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* See also */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Observer_pattern Observer pattern]===&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern](sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] is used when:&lt;br /&gt;
#An [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 abstraction] has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets us vary and reuse them independently.&amp;lt;br&amp;gt;&lt;br /&gt;
#A change to one object requires changing others, and we do not know how many objects need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
#An object should be able to notify other objects without making assumptions about who these objects are. In other words, we don't want these objects tightly coupled.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name&lt;br /&gt;
   attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
   def initialize( name, title, salary )&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
   # Give Jim a raise&lt;br /&gt;
   jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
   def update( changed_employee )&lt;br /&gt;
      puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
      puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name, :title&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary,payroll)&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
      @payroll = payroll&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      @payroll.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
   jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
   @name = name&lt;br /&gt;
   @title = title&lt;br /&gt;
   @salary = salary&lt;br /&gt;
   @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also we need  the following code to inform all of the observers that something has changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
   @salary = new_salary&lt;br /&gt;
   notify_observers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
def notify_observers&lt;br /&gt;
   @observers.each do |observer|&lt;br /&gt;
      observer.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The key moving part of notify_observers is '''''observer.update(self)'''''. This bit of code calls the update method on each observer, telling it that something (in this case, the salary) has changed on the Employee object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets us consider writing methods that add and delete observers from the Employee object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_observer(observer)&lt;br /&gt;
   @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
end&lt;br /&gt;
def delete_observer(observer)&lt;br /&gt;
   @observers.delete(observer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Putting all the pieces of the observer code discussed above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Subject&lt;br /&gt;
   def initialize&lt;br /&gt;
      @observers=[]&lt;br /&gt;
    end&lt;br /&gt;
   def add_observer(observer)&lt;br /&gt;
      @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
   end&lt;br /&gt;
   def delete_observer(observer)&lt;br /&gt;
      @observers.delete(observer)&lt;br /&gt;
   end&lt;br /&gt;
   def notify_observers&lt;br /&gt;
      @observers.each do |observer|&lt;br /&gt;
         observer.update(self)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And correspondingly the employee will inherit the subject as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee &amp;lt; Subject&lt;br /&gt;
   attr_reader :name, :address&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary)&lt;br /&gt;
      super()&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      notify_observers&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now any object that is interested in hearing about changes in Jim's salary can simply register as an observer on Jim's Employee object:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000.0)&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim.add_observer( payroll )&lt;br /&gt;
   jim.salary = 7000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hence by building this general mechanism, we have removed the implicit coupling between the Employee class and the Payroll object. Employee no longer cares which or how many other objects are interested in knowing about salary changes; it just forwards the news to any object that said that it was interested.&lt;br /&gt;
In addition, instances of the Employee class will be happy with no observers, one, or several observers.&lt;br /&gt;
&lt;br /&gt;
Now the payroll department will hear about it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 9000.0!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
&lt;br /&gt;
[4] [http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
&lt;br /&gt;
[5] [http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
&lt;br /&gt;
[6] [http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
&lt;br /&gt;
[7] [http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
&lt;br /&gt;
[8] http://en.wikipedia.org/wiki/Factory_method_pattern Factory]&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24687</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24687"/>
		<updated>2009-10-09T22:49:38Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Observer_pattern Observer pattern]===&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern](sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] is used when:&lt;br /&gt;
#An [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 abstraction] has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets us vary and reuse them independently.&amp;lt;br&amp;gt;&lt;br /&gt;
#A change to one object requires changing others, and we do not know how many objects need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
#An object should be able to notify other objects without making assumptions about who these objects are. In other words, we don't want these objects tightly coupled.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name&lt;br /&gt;
   attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
   def initialize( name, title, salary )&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
   # Give Jim a raise&lt;br /&gt;
   jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
   def update( changed_employee )&lt;br /&gt;
      puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
      puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name, :title&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary,payroll)&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
      @payroll = payroll&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      @payroll.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
   jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
   @name = name&lt;br /&gt;
   @title = title&lt;br /&gt;
   @salary = salary&lt;br /&gt;
   @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also we need  the following code to inform all of the observers that something has changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
   @salary = new_salary&lt;br /&gt;
   notify_observers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
def notify_observers&lt;br /&gt;
   @observers.each do |observer|&lt;br /&gt;
      observer.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The key moving part of notify_observers is '''''observer.update(self)'''''. This bit of code calls the update method on each observer, telling it that something (in this case, the salary) has changed on the Employee object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets us consider writing methods that add and delete observers from the Employee object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_observer(observer)&lt;br /&gt;
   @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
end&lt;br /&gt;
def delete_observer(observer)&lt;br /&gt;
   @observers.delete(observer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Putting all the pieces of the observer code discussed above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Subject&lt;br /&gt;
   def initialize&lt;br /&gt;
      @observers=[]&lt;br /&gt;
    end&lt;br /&gt;
   def add_observer(observer)&lt;br /&gt;
      @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
   end&lt;br /&gt;
   def delete_observer(observer)&lt;br /&gt;
      @observers.delete(observer)&lt;br /&gt;
   end&lt;br /&gt;
   def notify_observers&lt;br /&gt;
      @observers.each do |observer|&lt;br /&gt;
         observer.update(self)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And correspondingly the employee will inherit the subject as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee &amp;lt; Subject&lt;br /&gt;
   attr_reader :name, :address&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary)&lt;br /&gt;
      super()&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      notify_observers&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now any object that is interested in hearing about changes in Jim's salary can simply register as an observer on Jim's Employee object:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000.0)&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim.add_observer( payroll )&lt;br /&gt;
   jim.salary = 7000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hence by building this general mechanism, we have removed the implicit coupling between the Employee class and the Payroll object. Employee no longer cares which or how many other objects are interested in knowing about salary changes; it just forwards the news to any object that said that it was interested.&lt;br /&gt;
In addition, instances of the Employee class will be happy with no observers, one, or several observers.&lt;br /&gt;
&lt;br /&gt;
Now the payroll department will hear about it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 9000.0!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
&lt;br /&gt;
[4] [http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
&lt;br /&gt;
[5] [http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
&lt;br /&gt;
[6] [http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
&lt;br /&gt;
[7] [http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24683</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24683"/>
		<updated>2009-10-09T22:47:37Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Observer_pattern Observer pattern]===&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern](sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] is used when:&lt;br /&gt;
#An [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 abstraction] has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets us vary and reuse them independently.&amp;lt;br&amp;gt;&lt;br /&gt;
#A change to one object requires changing others, and we do not know how many objects need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
#An object should be able to notify other objects without making assumptions about who these objects are. In other words, we don't want these objects tightly coupled.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name&lt;br /&gt;
   attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
   def initialize( name, title, salary )&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
   # Give Jim a raise&lt;br /&gt;
   jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
   def update( changed_employee )&lt;br /&gt;
      puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
      puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name, :title&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary,payroll)&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
      @payroll = payroll&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      @payroll.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
   jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
   @name = name&lt;br /&gt;
   @title = title&lt;br /&gt;
   @salary = salary&lt;br /&gt;
   @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also we need  the following code to inform all of the observers that something has changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
   @salary = new_salary&lt;br /&gt;
   notify_observers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
def notify_observers&lt;br /&gt;
   @observers.each do |observer|&lt;br /&gt;
      observer.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The key moving part of notify_observers is '''''observer.update(self)'''''. This bit of code calls the update method on each observer, telling it that something (in this case, the salary) has changed on the Employee object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets us consider writing methods that add and delete observers from the Employee object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_observer(observer)&lt;br /&gt;
   @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
end&lt;br /&gt;
def delete_observer(observer)&lt;br /&gt;
   @observers.delete(observer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Putting all the pieces of the observer code discussed above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Subject&lt;br /&gt;
   def initialize&lt;br /&gt;
      @observers=[]&lt;br /&gt;
    end&lt;br /&gt;
   def add_observer(observer)&lt;br /&gt;
      @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
   end&lt;br /&gt;
   def delete_observer(observer)&lt;br /&gt;
      @observers.delete(observer)&lt;br /&gt;
   end&lt;br /&gt;
   def notify_observers&lt;br /&gt;
      @observers.each do |observer|&lt;br /&gt;
         observer.update(self)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And correspondingly the employee will inherit the subject as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee &amp;lt; Subject&lt;br /&gt;
   attr_reader :name, :address&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary)&lt;br /&gt;
      super()&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      notify_observers&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now any object that is interested in hearing about changes in Jim's salary can simply register as an observer on Jim's Employee object:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000.0)&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim.add_observer( payroll )&lt;br /&gt;
   jim.salary = 7000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hence by building this general mechanism, we have removed the implicit coupling between the Employee class and the Payroll object. Employee no longer cares which or how many other objects are interested in knowing about salary changes; it just forwards the news to any object that said that it was interested.&lt;br /&gt;
In addition, instances of the Employee class will be happy with no observers, one, or several observers.&lt;br /&gt;
&lt;br /&gt;
Now the payroll department will hear about it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 9000.0!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24673</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24673"/>
		<updated>2009-10-09T22:44:57Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Observer_pattern Observer pattern]===&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern](sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] is used when:&lt;br /&gt;
#An [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 abstraction] has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets us vary and reuse them independently.&amp;lt;br&amp;gt;&lt;br /&gt;
#A change to one object requires changing others, and we do not know how many objects need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
#An object should be able to notify other objects without making assumptions about who these objects are. In other words, we don't want these objects tightly coupled.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name&lt;br /&gt;
   attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
   def initialize( name, title, salary )&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
   # Give Jim a raise&lt;br /&gt;
   jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
   def update( changed_employee )&lt;br /&gt;
      puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
      puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
   attr_reader :name, :title&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary,payroll)&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
      @payroll = payroll&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      @payroll.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
   jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
   @name = name&lt;br /&gt;
   @title = title&lt;br /&gt;
   @salary = salary&lt;br /&gt;
   @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also we need  the following code to inform all of the observers that something has changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
   @salary = new_salary&lt;br /&gt;
   notify_observers&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
def notify_observers&lt;br /&gt;
   @observers.each do |observer|&lt;br /&gt;
      observer.update(self)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The key moving part of notify_observers is '''''observer.update(self)'''''. This bit of code calls the update method on each observer, telling it that something (in this case, the salary) has changed on the Employee object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets us consider writing methods that add and delete observers from the Employee object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_observer(observer)&lt;br /&gt;
   @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
end&lt;br /&gt;
def delete_observer(observer)&lt;br /&gt;
   @observers.delete(observer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Putting all the pieces of the observer code discussed above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Subject&lt;br /&gt;
   def initialize&lt;br /&gt;
      @observers=[]&lt;br /&gt;
    end&lt;br /&gt;
   def add_observer(observer)&lt;br /&gt;
      @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
   end&lt;br /&gt;
   def delete_observer(observer)&lt;br /&gt;
      @observers.delete(observer)&lt;br /&gt;
   end&lt;br /&gt;
   def notify_observers&lt;br /&gt;
      @observers.each do |observer|&lt;br /&gt;
         observer.update(self)&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And correspondingly the employee will inherit the subject as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee &amp;lt; Subject&lt;br /&gt;
   attr_reader :name, :address&lt;br /&gt;
   attr_reader :salary&lt;br /&gt;
   def initialize( name, title, salary)&lt;br /&gt;
      super()&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
   end&lt;br /&gt;
   def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      notify_observers&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now any object that is interested in hearing about changes in Jim's salary can simply register as an observer on Jim's Employee object:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   jim = Employee.new('Jim', 'Crane Operator', 5000.0)&lt;br /&gt;
   payroll = Payroll.new&lt;br /&gt;
   jim.add_observer( payroll )&lt;br /&gt;
   jim.salary = 7000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hence by building this general mechanism, we have removed the implicit coupling between the Employee class and the Payroll object. Employee no longer cares which or how many other objects are interested in knowing about salary changes; it just forwards the news to any object that said that it was interested.&lt;br /&gt;
In addition, instances of the Employee class will be happy with no observers, one, or several observers.&lt;br /&gt;
&lt;br /&gt;
Now the payroll department will hear about it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
   Cut a new check for Jim!&lt;br /&gt;
   His salary is now 9000.0!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The GoF called this idea of building a clean interface between the source of the&lt;br /&gt;
news that some object has changed and the consumers of that news as &amp;quot;'''''the Observer pattern'''''&amp;quot;&lt;br /&gt;
(Refer above Figure).&lt;br /&gt;
The GoF called the class with the news as the '''''subject class'''''. In our example,&lt;br /&gt;
the subject class is the '''''Employee''''' class.&amp;lt;br&amp;gt; '''''The observers''''' are the objects that are interested&lt;br /&gt;
in getting the news. In the above example, we have two observers which are '''''Payroll''''' '''''and'''''&lt;br /&gt;
'''''TaxMan'''''. Hence, when an object is interested in being informed of the state of the subject, it registers as an observer on that subject.&lt;br /&gt;
&lt;br /&gt;
===Implementing the Observer pattern in Ruby===&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24655</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=24655"/>
		<updated>2009-10-09T22:39:22Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Observer_pattern Observer pattern]===&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern](sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Observer_pattern Observer pattern] is used when:&lt;br /&gt;
#An [http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 abstraction] has two aspects, one dependent on the other. Encapsulating these aspects in separate objects lets us vary and reuse them independently.&amp;lt;br&amp;gt;&lt;br /&gt;
#A change to one object requires changing others, and we do not know how many objects need to be changed.&amp;lt;br&amp;gt;&lt;br /&gt;
#An object should be able to notify other objects without making assumptions about who these objects are. In other words, we don't want these objects tightly coupled.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
    attr_reader :name&lt;br /&gt;
    attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
    def initialize( name, title, salary )&lt;br /&gt;
       @name = name&lt;br /&gt;
       @title = title&lt;br /&gt;
       @salary = salary&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
  # Give Jim a raise&lt;br /&gt;
  jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
    def update( changed_employee )&lt;br /&gt;
      puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
      puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
    attr_reader :name, :title&lt;br /&gt;
    attr_reader :salary&lt;br /&gt;
    def initialize( name, title, salary,payroll)&lt;br /&gt;
      @name = name&lt;br /&gt;
      @title = title&lt;br /&gt;
      @salary = salary&lt;br /&gt;
      @payroll = payroll&lt;br /&gt;
    end&lt;br /&gt;
    def salary=(new_salary)&lt;br /&gt;
      @salary = new_salary&lt;br /&gt;
      @payroll.update(self)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  payroll = Payroll.new&lt;br /&gt;
  jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
  jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cut a new check for Jim!&lt;br /&gt;
His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code:&amp;lt;/b&amp;gt;&amp;amp;nbsp;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
    @name = name&lt;br /&gt;
    @title = title&lt;br /&gt;
    @salary = salary&lt;br /&gt;
    @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Also we need  the following code to inform all of the observers that something has changed:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
    @salary = new_salary&lt;br /&gt;
     notify_observers&lt;br /&gt;
end&lt;br /&gt;
def notify_observers&lt;br /&gt;
    @observers.each do |observer|&lt;br /&gt;
         observer.update(self)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The key moving part of notify_observers is '''''observer.update(self)'''''. This bit of code calls the update method on each observer, telling it that something (in this case, the salary) has changed on the Employee object.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now lets us consider writing methods that add and delete observers from the Employee object:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def add_observer(observer)&lt;br /&gt;
    @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
end&lt;br /&gt;
def delete_observer(observer)&lt;br /&gt;
    @observers.delete(observer)&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Putting all the pieces of the observer code discussed above :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Subject&lt;br /&gt;
    def initialize&lt;br /&gt;
        @observers=[]&lt;br /&gt;
    end&lt;br /&gt;
    def add_observer(observer)&lt;br /&gt;
        @observers &amp;lt;&amp;lt; observer&lt;br /&gt;
    end&lt;br /&gt;
    def delete_observer(observer)&lt;br /&gt;
        @observers.delete(observer)&lt;br /&gt;
    end&lt;br /&gt;
    def notify_observers&lt;br /&gt;
        @observers.each do |observer|&lt;br /&gt;
            observer.update(self)&lt;br /&gt;
        end&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And correspondingly the employee will inherit the subject as below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee &amp;lt; Subject&lt;br /&gt;
    attr_reader :name, :address&lt;br /&gt;
    attr_reader :salary&lt;br /&gt;
    def initialize( name, title, salary)&lt;br /&gt;
        super()&lt;br /&gt;
        @name = name&lt;br /&gt;
        @title = title&lt;br /&gt;
        @salary = salary&lt;br /&gt;
    end&lt;br /&gt;
    def salary=(new_salary)&lt;br /&gt;
        @salary = new_salary&lt;br /&gt;
        notify_observers&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Now any object that is interested in hearing about changes in Jim's salary can simply register as an observer on Jim's Employee object:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  jim = Employee.new('Jim', 'Crane Operator', 5000.0)&lt;br /&gt;
  payroll = Payroll.new&lt;br /&gt;
  jim.add_observer( payroll )&lt;br /&gt;
  jim.salary = 7000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Hence by building this general mechanism, we have removed the implicit coupling between the Employee class and the Payroll object. Employee no longer cares which or how many other objects are interested in knowing about salary changes; it just forwards the news to any object that said that it was interested.&lt;br /&gt;
In addition, instances of the Employee class will be happy with no observers, one, or several observers.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--figure--&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Now the payroll department will hear about it:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cut a new check for Jim!&lt;br /&gt;
His salary is now 9000.0!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The GoF called this idea of building a clean interface between the source of the&lt;br /&gt;
news that some object has changed and the consumers of that news as &amp;quot;'''''the Observer pattern'''''&amp;quot;&lt;br /&gt;
(Refer above Figure).&lt;br /&gt;
The GoF called the class with the news as the '''''subject class'''''. In our example,&lt;br /&gt;
the subject class is the '''''Employee''''' class.&amp;lt;br&amp;gt; '''''The observers''''' are the objects that are interested&lt;br /&gt;
in getting the news. In the above example, we have two observers which are '''''Payroll''''' '''''and'''''&lt;br /&gt;
'''''TaxMan'''''. Hence, when an object is interested in being informed of the state of the subject, it registers as an observer on that subject.&lt;br /&gt;
&lt;br /&gt;
===Implementing the Observer pattern in Ruby===&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===See also===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
[http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23493</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23493"/>
		<updated>2009-10-09T03:52:30Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Observer===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The observer pattern (sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
    attr_reader :name&lt;br /&gt;
    attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
    def initialize( name, title, salary )&lt;br /&gt;
       @name = name&lt;br /&gt;
       @title = title&lt;br /&gt;
       @salary = salary&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
# Give Jim a raise&lt;br /&gt;
jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
def update( changed_employee )&lt;br /&gt;
puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
attr_reader :name, :title&lt;br /&gt;
attr_reader :salary&lt;br /&gt;
def initialize( name, title, salary,payroll)&lt;br /&gt;
@name = name&lt;br /&gt;
@title = title&lt;br /&gt;
@salary = salary&lt;br /&gt;
@payroll = payroll&lt;br /&gt;
end&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
@salary = new_salary&lt;br /&gt;
@payroll.update(self)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
payroll = Payroll.new&lt;br /&gt;
jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Cut a new check for Jim!&lt;br /&gt;
His salary is now 8000!&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;b&amp;gt;Improvising the above code&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The trouble with the above code is that it is hard-wired to inform the payroll department alone about salary changes.&lt;br /&gt;
This does not help in the situations where some other classes for e.g.,accounting-related classes needs to be informed about&lt;br /&gt;
Jim's financial state. In such situation modifying employee class does not work out as nothing in the Employee class is really changing.&lt;br /&gt;
The general way to solve this problem is to separate out the thing that is changing. We can set up an array for list of objects(in the initialize method) that are interested in hearing about the latest news from the Employee object.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
    @name = name&lt;br /&gt;
    @title = title&lt;br /&gt;
    @salary = salary&lt;br /&gt;
    @observers = []&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 Gang of Four]&lt;br /&gt;
&lt;br /&gt;
[2] [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
[3] [http://en.wikipedia.org/wiki/Observer_pattern Observer Design pattern]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23484</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23484"/>
		<updated>2009-10-09T03:49:23Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Factory pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern]===&lt;br /&gt;
&lt;br /&gt;
The essence of the [http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_method_pattern Factory pattern] is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand [http://en.wikipedia.org/wiki/Factory_method_pattern Factory] design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Observer===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The observer pattern (sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
    attr_reader :name&lt;br /&gt;
    attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
    def initialize( name, title, salary )&lt;br /&gt;
       @name = name&lt;br /&gt;
       @title = title&lt;br /&gt;
       @salary = salary&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
# Give Jim a raise&lt;br /&gt;
jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
def update( changed_employee )&lt;br /&gt;
puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
attr_reader :name, :title&lt;br /&gt;
attr_reader :salary&lt;br /&gt;
def initialize( name, title, salary,payroll)&lt;br /&gt;
@name = name&lt;br /&gt;
@title = title&lt;br /&gt;
@salary = salary&lt;br /&gt;
@payroll = payroll&lt;br /&gt;
end&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
@salary = new_salary&lt;br /&gt;
@payroll.update(self)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
payroll = Payroll.new&lt;br /&gt;
jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Cut a new check for Jim!&lt;br /&gt;
His salary is now 8000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
[3]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23477</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23477"/>
		<updated>2009-10-09T03:44:58Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===Factory pattern===&lt;br /&gt;
&lt;br /&gt;
The essence of the Factory Pattern is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand factory design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Observer===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The observer pattern (sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
    attr_reader :name&lt;br /&gt;
    attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
    def initialize( name, title, salary )&lt;br /&gt;
       @name = name&lt;br /&gt;
       @title = title&lt;br /&gt;
       @salary = salary&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
# Give Jim a raise&lt;br /&gt;
jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
def update( changed_employee )&lt;br /&gt;
puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
attr_reader :name, :title&lt;br /&gt;
attr_reader :salary&lt;br /&gt;
def initialize( name, title, salary,payroll)&lt;br /&gt;
@name = name&lt;br /&gt;
@title = title&lt;br /&gt;
@salary = salary&lt;br /&gt;
@payroll = payroll&lt;br /&gt;
end&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
@salary = new_salary&lt;br /&gt;
@payroll.update(self)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
payroll = Payroll.new&lt;br /&gt;
jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Cut a new check for Jim!&lt;br /&gt;
His salary is now 8000!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
[3]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23459</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23459"/>
		<updated>2009-10-09T03:21:12Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Factory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===Factory pattern===&lt;br /&gt;
&lt;br /&gt;
The essence of the Factory Pattern is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand factory design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Observer===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The observer pattern (sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
    attr_reader :name&lt;br /&gt;
    attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
    def initialize( name, title, salary )&lt;br /&gt;
       @name = name&lt;br /&gt;
       @title = title&lt;br /&gt;
       @salary = salary&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
# Give Jim a raise&lt;br /&gt;
jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
def update( changed_employee )&lt;br /&gt;
puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
attr_reader :name, :title&lt;br /&gt;
attr_reader :salary&lt;br /&gt;
def initialize( name, title, salary,payroll)&lt;br /&gt;
@name = name&lt;br /&gt;
@title = title&lt;br /&gt;
@salary = salary&lt;br /&gt;
@payroll = payroll&lt;br /&gt;
end&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
@salary = new_salary&lt;br /&gt;
@payroll.update(self)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
payroll = Payroll.new&lt;br /&gt;
jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Cut a new check for Jim!&lt;br /&gt;
His salary is now 8000!&lt;br /&gt;
&lt;br /&gt;
===Strategy===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
 [3] &lt;br /&gt;
 &lt;br /&gt;
[4]&lt;br /&gt;
 &lt;br /&gt;
[5] &lt;br /&gt;
&lt;br /&gt;
[6] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
[3]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23452</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23452"/>
		<updated>2009-10-09T03:18:16Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Factory */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===Factory===&lt;br /&gt;
&lt;br /&gt;
The essence of the Factory Pattern is to &amp;quot;Define an interface for creating an object, but let the subclasses decide which class to instantiate. The Factory method lets a class defer instantiation to subclasses.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Factory Method pattern is used when&lt;br /&gt;
&lt;br /&gt;
#a class can't anticipate the class of objects it must create.&lt;br /&gt;
#a class wants its subclasses to specify the objects it creates.&lt;br /&gt;
#classes delegate responsibility to one of several helper subclasses, and you want to localize the knowledge of which helper subclass is the delegate. [1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Will try to understand factory design pattern with the help of a real world problem. Imagine that we are asked to build a simulation of life in a pond. In particular, we need to model the comings and goings of the ducks. So we sit down and write a class to model the ducks:&lt;br /&gt;
&lt;br /&gt;
Adapted from the class notes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Duck&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Duck #{@name} says Quack!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
But ducks also need a place to live(Which we didn't implemented in class), and for that we build a Pond class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_ducks)&lt;br /&gt;
      @ducks = []&lt;br /&gt;
      number_ducks.times do |i|&lt;br /&gt;
         duck = Duck.new(&amp;quot;Duck#{i}&amp;quot;)&lt;br /&gt;
         @ducks &amp;lt;&amp;lt; duck&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @ducks.each {|duck| duck.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Life on the pond continues idyllically until one dark day when we get a request to model a different denizen of the puddle: the frog. Now it is easy enough to create a Frog class that sports exactly the same interface as the ducks:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Frog&lt;br /&gt;
   def initialize(name)&lt;br /&gt;
      @name = name&lt;br /&gt;
   end&lt;br /&gt;
&lt;br /&gt;
   def speak&lt;br /&gt;
      puts(&amp;quot;Frog #{@name} says Crooooaaaak!&amp;quot;)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
But there is a problem with the Pond class—right there in the initialize method we are explicitly creating '''ducks'''. And now we have exactly understood the problem which factory method solves.&lt;br /&gt;
&lt;br /&gt;
Rewriting the factory adopted version of the Pound class.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Pond&lt;br /&gt;
   def initialize(number_animals)&lt;br /&gt;
      @animals = []&lt;br /&gt;
      number_animals.times do |i|&lt;br /&gt;
         animal = new_animal(&amp;quot;Animal#{i}&amp;quot;)&lt;br /&gt;
         @animals &amp;lt;&amp;lt; animal&lt;br /&gt;
      end&lt;br /&gt;
   end&lt;br /&gt;
   &lt;br /&gt;
   def simulate_one_day&lt;br /&gt;
      @animals.each {|animal| animal.speak}&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next we can build two subclasses of Pond—one for a pond full of ducks and the other for a pond hopping with frogs:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class DuckPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Duck.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
class FrogPond &amp;lt; Pond&lt;br /&gt;
   def new_animal(name)&lt;br /&gt;
      Frog.new(name)&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
And can happily use them  as below&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
pond = FrogPond.new(3)&lt;br /&gt;
pond.simulate_one_day&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Observer===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
The observer pattern (sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
    attr_reader :name&lt;br /&gt;
    attr_accessor :title, :salary&lt;br /&gt;
&lt;br /&gt;
    def initialize( name, title, salary )&lt;br /&gt;
       @name = name&lt;br /&gt;
       @title = title&lt;br /&gt;
       @salary = salary&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
# Give Jim a raise&lt;br /&gt;
jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
def update( changed_employee )&lt;br /&gt;
puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
attr_reader :name, :title&lt;br /&gt;
attr_reader :salary&lt;br /&gt;
def initialize( name, title, salary,payroll)&lt;br /&gt;
@name = name&lt;br /&gt;
@title = title&lt;br /&gt;
@salary = salary&lt;br /&gt;
@payroll = payroll&lt;br /&gt;
end&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
@salary = new_salary&lt;br /&gt;
@payroll.update(self)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
We can now change Jim's wages as follows:&amp;lt;br&amp;gt; &lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
payroll = Payroll.new&lt;br /&gt;
jim = Employee.new('Jim', 'Crane Operator', 5000, payroll)&lt;br /&gt;
jim.salary = 8000&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
And the payroll department will know about these changes. The output of the above code is:&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
Cut a new check for Jim!&lt;br /&gt;
His salary is now 8000!&lt;br /&gt;
&lt;br /&gt;
===Strategy===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
 [3] &lt;br /&gt;
 &lt;br /&gt;
[4]&lt;br /&gt;
 &lt;br /&gt;
[5] &lt;br /&gt;
&lt;br /&gt;
[6] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
[3]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23362</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23362"/>
		<updated>2009-10-09T02:25:25Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science. Christopher Alexander says, &amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;. Even though Alexander was talking about patterns in buildings and towns, what he says is true about object-oriented design patterns. Our solutions are expressed in terms of objects and interfaces instead of walls and doors, but at the core of both kinds of patterns is a solution to a problem in a context [1].&lt;br /&gt;
&lt;br /&gt;
In general, a pattern has four essential elements:&lt;br /&gt;
&lt;br /&gt;
#The '''pattern name''' is a handle used to describe a design problem, its solutions, and consequences in a word or two. &lt;br /&gt;
#The '''problem''' explains the problem and its context and also describes when to apply the pattern.&lt;br /&gt;
#The '''solution''' describes the elements that make up the design, their relationships, responsibilities, and collaborations.the pattern provides an abstract description of a design problem and how a general arrangement of elements solves it.&lt;br /&gt;
#The '''consequences''' are the results and trade-offs of applying the pattern. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===Factory===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Observer===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
===Introduction:===&lt;br /&gt;
The observer pattern (sometimes known as publish/subscribe) is a software design pattern in which an object, called the 'subject', maintains a list of its dependents, called 'observers', and notifies them automatically of any state changes, usually by calling one of their methods. It is mainly used to implement distributed event handling systems.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Example Scenario where Observer Pattern is Used:&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider a personnel system where an employee's salary changes and the payroll department needs to know when these changes take place. Here, How can one make the Employee object spread the news about salary changes without tangling it up with the payroll system?&lt;br /&gt;
In such a situation, Observer pattern is used. Initially, an object is created that is interested in the state of a person's(any employee's) finances. This object then needs to simply register with that person's 'Employee Object' ahead of time. Once registered, that object would receive timely updates about the ups and downs of the person's paycheck.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Here is a basic version of an Employee object that tracks an employee. It does not have any code that tells about any salary updates.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
attr_reader :name&lt;br /&gt;
attr_accessor :title, :salary&lt;br /&gt;
def initialize( name, title, salary )&lt;br /&gt;
@name = name&lt;br /&gt;
@title = title&lt;br /&gt;
@salary = salary&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;The employees can get raises because we made the salary field accessible with attr_accessor.&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
jim = Employee.new(&amp;quot;Jim Flintstone&amp;quot;, &amp;quot;Crane Operator&amp;quot;, 5000.0)&lt;br /&gt;
# Give Jim a raise&lt;br /&gt;
jim.salary=8000.0&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;Now, adding some code to keep the payroll department informed of pay changes:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Payroll&lt;br /&gt;
def update( changed_employee )&lt;br /&gt;
puts(&amp;quot;Cut a new check for #{changed_employee.name}!&amp;quot;)&lt;br /&gt;
puts(&amp;quot;His salary is now #{changed_employee.salary}!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class Employee&lt;br /&gt;
attr_reader :name, :title&lt;br /&gt;
attr_reader :salary&lt;br /&gt;
def initialize( name, title, salary,payroll)&lt;br /&gt;
@name = name&lt;br /&gt;
@title = title&lt;br /&gt;
@salary = salary&lt;br /&gt;
@payroll = payroll&lt;br /&gt;
end&lt;br /&gt;
def salary=(new_salary)&lt;br /&gt;
@salary = new_salary&lt;br /&gt;
@payroll.update(self)&lt;br /&gt;
end&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Strategy===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
 [3] &lt;br /&gt;
 &lt;br /&gt;
[4]&lt;br /&gt;
 &lt;br /&gt;
[5] &lt;br /&gt;
&lt;br /&gt;
[6] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
[3]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23331</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23331"/>
		<updated>2009-10-09T02:03:21Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science.&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
e.g. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;We can find some common steps or building blocks in any process. Suppose we have to build a home. Then high level of disign &lt;br /&gt;
will be based on how many rooms do we wish to have on each floor. once we are done with this then its just the matter of &lt;br /&gt;
duplicating it for the other floors. This is very common and basic design for construction.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
===Factory===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Observer===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Strategy===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
 [3] &lt;br /&gt;
 &lt;br /&gt;
[4]&lt;br /&gt;
 &lt;br /&gt;
[5] &lt;br /&gt;
&lt;br /&gt;
[6] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
[3]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23303</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23303"/>
		<updated>2009-10-09T01:05:33Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science.&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
e.g. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;We can find some common steps or building blocks in any process. Suppose we have to build a home. Then high level of disign &lt;br /&gt;
will be based on how many rooms do we wish to have on each floor. once we are done with this then its just the matter of &lt;br /&gt;
duplicating it for the other floors. This is very common and basic design for construction.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
 [3] &lt;br /&gt;
 &lt;br /&gt;
[4]&lt;br /&gt;
 &lt;br /&gt;
[5] &lt;br /&gt;
&lt;br /&gt;
[6] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] &lt;br /&gt;
&lt;br /&gt;
[2] &lt;br /&gt;
&lt;br /&gt;
[3]    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23299</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=23299"/>
		<updated>2009-10-09T01:01:21Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Design patterns''' ==&lt;br /&gt;
&lt;br /&gt;
The idea of design pattern was first introduced by the architect [http://en.wikipedia.org/wiki/Christopher_Alexander Christopher Alexander] in the field of architecture. Later it has been adapted for various other disciplines, including computer science.&lt;br /&gt;
&lt;br /&gt;
A design pattern is a formal way of documenting a solution to a design problem in a particular field of expertise. In software engineering, a design pattern is a solution to a general and commonly occurring problem in software design. A design pattern is not a finished design that can be transformed directly into code. But it is a description or template for how to solve a problem that can be used in many different situations.&lt;br /&gt;
&lt;br /&gt;
e.g. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;We can find some common steps or building blocks in any process. Suppose we have to build a home. Then high level of disign &lt;br /&gt;
will be based on how many rooms do we wish to have on each floor. once we are done with this then its just the matter of &lt;br /&gt;
duplicating it for the other floors. This is very common and basic design for construction.&lt;br /&gt;
&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Design patterns in ruby===&lt;br /&gt;
Almost every design patterns of ruby are borrowed from the [http://en.wikipedia.org/wiki/Gang_of_Four_%28software%29 GOF] book. Following is the list of common pattern used in ruby. &lt;br /&gt;
&lt;br /&gt;
#Template&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Strategy_pattern Strategy]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Observer_pattern Observer]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Composite_pattern Composite]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Iterator_pattern Iterator]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Command_pattern Commands]&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Adapter_pattern Adapter]&lt;br /&gt;
#Proxy&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Decorator_pattern Decorator]&lt;br /&gt;
#Singleton&lt;br /&gt;
#Factory&lt;br /&gt;
#Builder&lt;br /&gt;
#[http://en.wikipedia.org/wiki/Interpreter_pattern Interpreter]&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=22837</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=22837"/>
		<updated>2009-10-08T02:39:23Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Other design patterns in Ruby!&lt;br /&gt;
&lt;br /&gt;
===Problem Statement===&lt;br /&gt;
What facilities does Ruby offer that makes it easier to realize other GoF (and other) patterns that we did not cover in class? The key idea here is to explore how Ruby can implement these patterns more efficiently or transparently than static (or other dynamic) o-o languages.&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=22830</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 11 sv</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_11_sv&amp;diff=22830"/>
		<updated>2009-10-08T02:30:40Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Hello world&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=19597</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=19597"/>
		<updated>2009-09-17T03:00:30Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''History of version control''' ==&lt;br /&gt;
 &lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage data, especially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since most of time they need to add, modify or fix a small portion of the code (also known as creating new version). Version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control] is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management  SCM]. Also  known  as  ''revision  control'', it acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allows multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to team  projects,   thereby enabling a  better  working  environment.  Keeping  records  of  all  changes  done to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, he  can  ''checkout'' the  corresponding file  from  the  system,  thus getting access to  the  most  up‐to‐date  version  of  it.  Once  the  file  has  been  amended,  the  user  can  then  commit and  re‐submit the  file,  updating  the  copy  in  the  repository , ready  for  use by other users.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and  &lt;br /&gt;
 checking-out.Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file&lt;br /&gt;
 revision from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
The basic purpose of a Version Control System was to maintain different versions of a file.&lt;br /&gt;
&lt;br /&gt;
Following are some issues requiring a Version Control System:&lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''' : The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''' : The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
[[Image:History.jpg|650px|thumb|center| Milestone of version control development.]]&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when [http://en.wikipedia.org/wiki/Software_configuration_management Software  Configuration  Management SCM] became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions.In forward deltas the origin version is stored, all subsequent versions are stored as sets of changes or deltas where as in backword deltas, the most recent version is stored, all previous versions are stored as set [http://www.cs.colorado.edu/~kena/classes/3308/f03/lectures/lecture12.pdf &amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;] Logically similar to [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS],it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site[http://catb.org/esr/writings/taoup/html/ch15s05.html &amp;lt;sup&amp;gt;|2|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to [http://en.wikipedia.org/wiki/Concurrent_Versions_System  CVS]  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by [http://en.wikipedia.org/wiki/CollabNet CollabNet Inc.] Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more. Distributed revision control took a peer-to-peer approach, as opposed to the client-server approach of centralized systems. The repository was split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  could  be  stored  on  servers  or  local  machines.This enabled every developer to edit his local sharable copy without having to connect to any network connection.Synchronization was conducted by exchanging patches (change-sets) from peer to peer.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here].&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized[http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/ &amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems, to being a part of Wiki too. Whether a waterfall, spiral, iterative, agile or open source approach is used, improvements to VCS technology have a direct impact on collaboration effectiveness. Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
&lt;br /&gt;
[6] Ian Clatworthy, Distributed Version Control Systems – Why and How, [http://people.canonical.com/~ianc/papers/dvcs-why-and-how.xhtml Distributed Version Control System]&lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] http://www.cs.colorado.edu/~kena/classes/3308/f03/lectures/lecture12.pdf&lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=19085</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=19085"/>
		<updated>2009-09-12T11:49:26Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control] is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management  SCM], also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and  &lt;br /&gt;
 checking-out.Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file&lt;br /&gt;
 revision from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
The basic purpose of a Version Control System was to maintain different versions of a file.&lt;br /&gt;
&lt;br /&gt;
Following are some issues requiring a Version Control System:&lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''' : The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''' : The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
[[Image:History.jpg|650px|thumb|center| Milestone of version control development.]]&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management SCM] became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions.In forward deltas the origin version is stored, all subsequent versions are stored as sets of changes or deltas where as in backword deltas, the most recent version is stored, all previous versions are stored as set [http://www.cs.colorado.edu/~kena/classes/3308/f03/lectures/lecture12.pdf &amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;] Logically similar to [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS],it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site[http://catb.org/esr/writings/taoup/html/ch15s05.html &amp;lt;sup&amp;gt;|2|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to [http://en.wikipedia.org/wiki/Concurrent_Versions_System  CVS]  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by [http://en.wikipedia.org/wiki/CollabNet CollabNet Inc.] Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository was split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  could  be  stored  on  servers  or  local  machines.This enabled every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized[http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/ &amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems, to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] http://www.cs.colorado.edu/~kena/classes/3308/f03/lectures/lecture12.pdf&lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=19084</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=19084"/>
		<updated>2009-09-12T11:49:10Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control] is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management  SCM], also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and  &lt;br /&gt;
 checking-out.Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file&lt;br /&gt;
 revision from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
The basic purpose of a Version Control System was to maintain different versions of a file.&lt;br /&gt;
&lt;br /&gt;
Following are some issues requiring a Version Control System:&lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''' : The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''' : The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
[[Image:History.jpg|650px|thumb|center| Milestone of version control development.]]&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management SCM] became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions.In forward deltas the origin version is stored, all subsequent versions are stored as sets of changes or deltas where as in backword deltas, the most recent version is stored, all previous versions are stored as set [http://www.cs.colorado.edu/~kena/classes/3308/f03/lectures/lecture12.pdf &amp;lt;sup&amp;gt;|1|&amp;lt;/sup&amp;gt;] Logically similar to [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS],it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site[http://catb.org/esr/writings/taoup/html/ch15s05.html &amp;lt;sup&amp;gt;|2|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to [http://en.wikipedia.org/wiki/Concurrent_Versions_System  CVS]  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by [http://en.wikipedia.org/wiki/CollabNet CollabNet Inc.] Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository was split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  could  be  stored  on  servers  or  local  machines.This enabled every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized[http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/ &amp;lt;sup&amp;gt;|3|&amp;lt;/sup&amp;gt;].&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems, to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===References===&lt;br /&gt;
&lt;br /&gt;
[1] http://www.cs.colorado.edu/~kena/classes/3308/f03/lectures/lecture12.pdf&lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/    &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18944</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18944"/>
		<updated>2009-09-09T01:47:30Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control] is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management  SCM], also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. &lt;br /&gt;
Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
The basic purpose of a Version Control System was to maintain different versions of a file.&lt;br /&gt;
&lt;br /&gt;
Following are some issues requiring a Version Control System:&lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''' : The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''' : The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
[[Image:History.jpg|650px|thumb|center| Milestone of version control development.]]&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management SCM] became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS],it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to [http://en.wikipedia.org/wiki/Concurrent_Versions_System  CVS]  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by [http://en.wikipedia.org/wiki/CollabNet CollabNet Inc.] Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository was split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  could  be  stored  on  servers  or  local  machines.This enabled every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems, to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===See Also===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18932</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18932"/>
		<updated>2009-09-09T01:11:24Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* History */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM), also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. &lt;br /&gt;
Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
The basic purpose of a Version Control System was to maintain different versions of a file.&lt;br /&gt;
&lt;br /&gt;
Following are some issues requiring a Version Control System:&lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
[[Image:History.jpg|650px|thumb|center| Milestone of version control development.]]&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS],it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to [ http://en.wikipedia.org/wiki/Concurrent_Versions_System  CVS]  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository was split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  could  be  stored  on  servers  or  local  machines.This enabled every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18929</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18929"/>
		<updated>2009-09-09T01:02:05Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Change and Configuration Control (CCC) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM), also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. &lt;br /&gt;
Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
The basic purpose of a Version Control System was to maintain different versions of a file.&lt;br /&gt;
&lt;br /&gt;
Following are some issues requiring a Version Control System:&lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS],it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to [ http://en.wikipedia.org/wiki/Concurrent_Versions_System  CVS]  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository was split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  could  be  stored  on  servers  or  local  machines.This enabled every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18921</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18921"/>
		<updated>2009-09-09T00:41:09Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM), also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. &lt;br /&gt;
Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
&lt;br /&gt;
Following were some of reasons version control was developed to address . &lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when Software Configuration Management(SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to SCCS,it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to  CVS  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository is split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  can  be  stored  on  servers  or  local  machines.This enables every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18920</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18920"/>
		<updated>2009-09-09T00:40:40Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM), also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision&lt;br /&gt;
 from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
&lt;br /&gt;
Following were some of reasons version control was developed to address . &lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when Software Configuration Management(SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System(SCCS)====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model where in only one person could check out and edit a file at one time.This led to serialized development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to SCCS,it has a cleaner command interface and good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to  CVS  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository is split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  can  be  stored  on  servers  or  local  machines.This enables every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18913</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18913"/>
		<updated>2009-09-09T00:34:00Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM), also  known  as  ''revision  control'' and acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While [http://en.wikipedia.org/wiki/File_system file systems] provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision&lt;br /&gt;
 from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
&lt;br /&gt;
Following were some of reasons version control was developed to address . &lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when Software Configuration Management(SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System([http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS])====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model to serialize development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to SCCS,it has a cleaner command interface good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to  CVS  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository is split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  can  be  stored  on  servers  or  local  machines.This enables every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18911</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18911"/>
		<updated>2009-09-09T00:30:28Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM), also  known  as  ''revision  control''. It acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While [http://en.wikipedia.org/wiki/File_system file systems] provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision&lt;br /&gt;
 from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
&lt;br /&gt;
Following were some of reasons version control was developed to address . &lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when Software Configuration Management(SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System([http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS])====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model to serialize development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to SCCS,it has a cleaner command interface good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to  CVS  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository is split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  can  be  stored  on  servers  or  local  machines.This enables every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
[5] Marc J. Rochkind, IEEE Transactions on Software Engineering December 1975, [http://basepath.com/aup/talks/SCCS-Slideshow.pdf The Source Code Control System]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18899</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18899"/>
		<updated>2009-09-09T00:20:50Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM).It is also  known  as  ''revision  control'',  and  acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While [http://en.wikipedia.org/wiki/File_system file systems] provide operations like open, save, rename and delete, version control systems provide checking-in and checking-out. Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision&lt;br /&gt;
 from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
&lt;br /&gt;
Following were some of reasons version control was developed to address . &lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep track of what changes are made in the code, why they are made and who made them. A VCS enables change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': The ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': The ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when Software Configuration Management(SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System([http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS])====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model to serialize development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It worked  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a [http://en.wikipedia.org/wiki/Patch_(Unix) diff] or a [http://en.wikipedia.org/wiki/Patch_(Unix) patchfile].&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to SCCS,it has a cleaner command interface good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to  CVS  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository is split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  can  be  stored  on  servers  or  local  machines.This enables every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18893</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18893"/>
		<updated>2009-09-09T00:10:36Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Issues Version Control addressed */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM).It is also  known  as  ''revision  control'',  and  acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and&lt;br /&gt;
 checking-out. Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision&lt;br /&gt;
 from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
&lt;br /&gt;
Following were some of reasons version control was developed to address . &lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep a track of what changes are made in the code, why they are made and who made them. A VCS enables Change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': the ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': the ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when Software Configuration Management(SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System([http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS])====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model to serialize development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It works  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a diff or a patchfile.&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to SCCS,it has a cleaner command interface good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to  CVS  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository is split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  can  be  stored  on  servers  or  local  machines.This enables every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18892</id>
		<title>CSC/ECE 517 Fall 2009/wiki1a 5 History of version control by av</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki1a_5_History_of_version_control_by_av&amp;diff=18892"/>
		<updated>2009-09-09T00:09:51Z</updated>

		<summary type="html">&lt;p&gt;Vksingh: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is a [http://en.wikipedia.org/wiki/Utility_software software utility] used to manage the data, specially ''source code'', within a [http://en.wikipedia.org/wiki/Software_development software development] environment. Managing changes are important for software engineers, since during most of time they need to add, modify or fix a small portion of the code (also known as creating new version). And version control does the housekeeping of the changes by providing  a  detailed  history  of each document .  ''[http://en.wikipedia.org/wiki/Revision_control Version control]''  implements  several  techniques  to  ensure  the  integrity of  the  information,  while  making  use  of  minimal  resources.  This is a comprehensive list of  [http://en.wikipedia.org/wiki/List_of_revision_control_software version control software].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Introduction===&lt;br /&gt;
&lt;br /&gt;
''[http://en.wikipedia.org/wiki/Revision_control Version control]'' is  a  fundamental  part  of  [http://en.wikipedia.org/wiki/Software_configuration_management software  configuration  management] (SCM).It is also  known  as  ''revision  control'',  and  acts  as  a  key  lifeline  in  a  team  environment. Version  control  works  by  keeping  a  record  of  every  unit  of  information  and  tracks  the  changes  and  updates  made.  &lt;br /&gt;
&lt;br /&gt;
It also  allow multiple  users  to  edit  the  same  document  at  the  same  time. This provides a  valuable  resource  to the team  projects,  and  thereby enables a  better  working  environment.  Keeping  records  of  all  changes  to  a  set  of  information  provides  a  reliable  solution  to  data  management,  and  an  archive  for  future reference.  &lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Revision_control Version control]  works  by  uniquely  identifying  each  piece  of  information  and  recording  the  changes  with  it.  The  information  is  stored  in  a  data repository,  an  information  database,  and  can  be  accessed  remotely  or  locally  depending  on  the  type  of  system.  When  a  user  is  required  to  make  changes  to  a  document, they  can  ''checkout'' the  information  from  the  system, giving  them  the  most  up‐to‐date  version  of  the  file  in  their  working  copy .  Once  the  file  has  been  amended,  the  user  can  then  commit ,  re‐submit,  the  file  updating  the  copy  in  the  repository  ready  for  use simple  concept,  there  are  many  problems  such  as  revision  storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt; While file systems provide operations like open, save, rename and delete, version control systems provide checking-in and&lt;br /&gt;
 checking-out. Like their file system counterparts checking-in stores a file version, and checking-out retrieves a file revision&lt;br /&gt;
 from the system.&amp;lt;/pre&amp;gt; &lt;br /&gt;
&lt;br /&gt;
[[Image:Svn.png|650px|thumb|center|A typical history of a file version in [http://en.wikipedia.org/wiki/Subversion_%28software%29 SVN].]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''Trunk''' &amp;lt;/span&amp;gt; is the main copy of a project on which development progresses. Team members create 	&lt;br /&gt;
&amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt; (Similar to fork) from the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt; and work on that copy.This provides the flexibility to modify the document in parallel along both &amp;lt;span style=&amp;quot;color: #FFCC33 &amp;quot;&amp;gt; '''branches''' &amp;lt;/span&amp;gt;. At the end changes are &amp;lt;span style=&amp;quot;color: #FF0000 &amp;quot;&amp;gt; '''merged''' &amp;lt;/span&amp;gt; to the &amp;lt;span style=&amp;quot;color: #33FF00&amp;quot;&amp;gt; '''trunk''' &amp;lt;/span&amp;gt;, and this process continues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
====Issues Version Control addressed====&lt;br /&gt;
&lt;br /&gt;
Following were some of reasons version control was developed to address . &lt;br /&gt;
&lt;br /&gt;
* '''Change tracking''' : While working in a team project it gets difficult to keep a track of what changes are made in the code, why they are made and who made them. A VCS enables Change tracking by documenting every change with all the requisite details.&lt;br /&gt;
* '''Reversion''' : At times changes in a particular code module can lead to the entire application failing during regression testing&lt;br /&gt;
and calls for reversion to a code version that is known good. If reversion is difficult or unreliable, it's hard to risk making    changes at all.&lt;br /&gt;
* '''Bug tracking''' : In an agile software development environment it's quite common to get new bug reports for a particular version after the code has mutated away from it considerably.But when the bug doesn't reproduce under the new version, it gets difficult to know whether it still exists or has been fixed already. Under such circumstances it calls for getting back to the older version of the code in order to reproduce and comprehend it.&lt;br /&gt;
* '''Concurrency''': the ability to have many people across separate geographic locations modifying the same collection of files knowing that conflicting modifications can be detected and resolved.&lt;br /&gt;
* '''History''': the ability to attach historical data to your data, such as explanatory comments about the intention behind each change to it. Even for a programmer working solo, change histories are an important aid to memory; for a multi-person project, they are a vitally important form of communication among developers. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===History===&lt;br /&gt;
====Change and Configuration Control (CCC)====&lt;br /&gt;
The history of Version control dates back to 1975 when Software Configuration Management(SCM) became commerical for the first time with the advent of CCC,which was developed by the SoftTool Corporation.CCC offered a central repository and provided a trunkery system that documented every change thus enhancing the accountability of the system and validity of the information stored.The changes were recorded as they occured,at regular intervals, during development and maintenance and at baseline release.&lt;br /&gt;
&lt;br /&gt;
====Source Code Control System([http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS])====&lt;br /&gt;
Then came the [http://en.wikipedia.org/wiki/Source_Code_Control_System SCCS] which was developed by M. J Rochkind in the very early 1970’s. Designed basically for a unix system, it provided a simple locking model to serialize development.Based on a central repository it used the notion of discrete delta to record changes which were combined and  reconstructed to produce the final version of the product.&lt;br /&gt;
&lt;br /&gt;
====Diff Algorithm====&lt;br /&gt;
The  [http://en.wikipedia.org/wiki/Diff diff  algorithm ]  was developed  by  AT&amp;amp;T  [http://en.wikipedia.org/wiki/Bell_Labs Bell  Labs]  in  1974,  and  prototyped  by  James  W.  Hunt  in  1976.   It works  by  finding  the  [http://en.wikipedia.org/wiki/Longest_common_subsequence_problem longest  common  subsequence],  then  comparing  the  data  preceding and  following it, incorporating the changes in a diff or a patchfile.&lt;br /&gt;
&lt;br /&gt;
====Revsion Control System(RCS)====&lt;br /&gt;
In the early 1980’s Walter Tichy introduced the [http://en.wikipedia.org/wiki/Revision_Control_System RCS]. [http://en.wikipedia.org/wiki/Revision_Control_System RCS] introduced both forward and reverse delta concepts for efficient storage of different file revisions. Logically similar to SCCS,it has a cleaner command interface good facilities for grouping together entire project releases under symbolic names.It is well suited for single-developer or small-group projects hosted at a single development site.&lt;br /&gt;
&lt;br /&gt;
====Concurrent Version System(CVS)====&lt;br /&gt;
Next came the [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS] designed and originally  implemented by Dick Grunein 1986 and then modified  by Berliner et al in 1990. It became the defacto standard within the open soure community for many years because it didn't require files to be locked while checked out, reconciliating non-conflicting changes mechanically and requesting human intervention on conflicts. One  notable  drawback  to  CVS  was  that  it  didn't support versioning of re-named or relocated material identifying them as new files instead of new versions.&lt;br /&gt;
&lt;br /&gt;
====Subversion(SVN)====&lt;br /&gt;
Perceived shortcomings and faults in  CVS eventually led to a new version control system called [http://en.wikipedia.org/wiki/Subversion_(software) SVN] around 2001.It was developed by CollabNet Inc. Unlike [http://en.wikipedia.org/wiki/Concurrent_Versions_System CVS], [http://en.wikipedia.org/wiki/Subversion_(software) SVN]  committed changes atomically and significantly had better support for branches.&lt;br /&gt;
&lt;br /&gt;
====Distributed Version Control====&lt;br /&gt;
The paradigm then shifted from client server architecture to a [http://en.wikipedia.org/wiki/Distributed_revision_control distributed system] around 2001, with the development of systems like [http://en.wikipedia.org/wiki/SVK SVK], [http://en.wikipedia.org/wiki/BitKeeper Bitkeeper], [http://en.wikipedia.org/wiki/Mercurial_(software) Mercurial], [http://en.wikipedia.org/wiki/GNU_arch GNU Arch], [http://en.wikipedia.org/wiki/Darcs DARCS], [http://en.wikipedia.org/wiki/Git_(software) GIT], [http://en.wikipedia.org/wiki/Bazaar_(software) Bazaar], [http://en.wikipedia.org/wiki/Monotone_(software) monotone], [http://en.wikipedia.org/wiki/Codeville codeville], [http://en.wikipedia.org/wiki/Vesta_(Software_configuration_management) Vesta] , [http://en.wikipedia.org/wiki/Aegis_(management_software) Aegis] and many more.In all these the repository is split into several s sub‐repositories  for  each  section  or  module  of  a  project. The  sub‐repositories  can  be  stored  on  servers  or  local  machines.This enables every developer to edit his local sharable copy without having to connect to any network connection.&lt;br /&gt;
&lt;br /&gt;
A detailed comparision of all the Version Control Systems till date can be found [http://en.wikipedia.org/wiki/Comparison_of_revision_control_software here]&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Big Shift in Paradigm===&lt;br /&gt;
The traditional Version Control Systems were based on a Client Server Model. It is a simple and easy to use model that uses a central repository that is accessible to all the users allowing them  to get an up-to-date version instantly. It works for backup, undo and synchronization but has the following drawbacks:&lt;br /&gt;
#Branching and Merging is cumbersome.Users have to manually track revisions between merged branches.&lt;br /&gt;
#Peer to Peer synchronization is not supported.&lt;br /&gt;
#Offline commits is not supported as all operations occur through a connection to a centralized server.&lt;br /&gt;
#Data back up is not adequate as there is a single repository.&lt;br /&gt;
#Performance is slow.&lt;br /&gt;
&lt;br /&gt;
In order to overcome the drawbacks inherent in the Centralized Model,most of the recent Version Control Systems adopted a Distributed model that has several clones of the main repository, each downloaded to a local machine for use by a single user, instead of a single repository.It offers the following advantages-&lt;br /&gt;
#More flexible as, as they allow many different types of workflows, from a classic centralized workflow, to a purely ad hoc, to a mixture of ad hoc and centralized.&lt;br /&gt;
#Provides the users unlimited access to the repository even when they are not connected to the network.&lt;br /&gt;
#Supports Peer to Peer Synchronization as the users rely on a group of users rather than a central entity.&lt;br /&gt;
#It has better merging and branching capabilities.&lt;br /&gt;
#Information is more secure as each local repository acts as a backup of the central repository.&lt;br /&gt;
#Speed of execution of commands as well as viewing  transaction and error reports is fast as no network connection is involved.&lt;br /&gt;
&lt;br /&gt;
Detailed explanation of the two models with an analogy can be found [http://betterexplained.com/articles/intro-to-distributed-version-control-illustrated/ here].&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===Conclusion===&lt;br /&gt;
Version Control is becoming a standard with most areas in the computer arena from being embedded into various types of softwares like [http://en.wikipedia.org/wiki/Word_processor word processors] (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Writer OpenOffice.org Writer], [http://en.wikipedia.org/wiki/Microsoft_Word Microsoft Word], [http://en.wikipedia.org/wiki/KOffice KOffice], [http://en.wikipedia.org/wiki/Pages Pages], [http://en.wikipedia.org/wiki/Google_Docs Google Docs]), spreadsheets (e.g. [http://en.wikipedia.org/wiki/OpenOffice.org_Calc OpenOffice.org Calc], [http://en.wikipedia.org/wiki/Google_Spreadsheets Google Spreadsheets], [http://en.wikipedia.org/wiki/Microsoft_Excel Microsoft Excel]), and in various content management systems to being a part of Wiki too.Overall it can be said that versioning systems are powerful development management tools that provide security, eﬃciency and most importantly an asynchronous platform for software development.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
=== Useful Seminal Papers===&lt;br /&gt;
[1] Vincenzo Ambriola, Lars Bendix and Paolo Ciancarini , Software Engineering Journal November 1990  [http://bneal.co.uk/papers/version_control.pdf The evolution of configuration management and version control]&lt;br /&gt;
&lt;br /&gt;
[2] Benjamin  Neal,ECM 3406  Dissertation 11th  December  2008  , [http://ieeexplore.ieee.org/stamp/stamp.jsp?tp=&amp;amp;arnumber=61744&amp;amp;isnumber=2248 Version  Control:An  Overview]  &lt;br /&gt;
&lt;br /&gt;
 [3] Bryan O'Sullivan, ACM 2009, [http://portal.acm.org/citation.cfm?id=1594204.1595636&amp;amp;coll=GUIDE&amp;amp;dl=GUIDE&amp;amp;CFID=50565619&amp;amp;CFTOKEN=27688531 Making Sense of Revision-control Systems]&lt;br /&gt;
 &lt;br /&gt;
[4] Löh, A., Swierstra, W., Leijen, D. 2007, [http://people.cs.uu.nl/andres/VersionControl.html A principled approach to version control] &lt;br /&gt;
 &lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
===External links===&lt;br /&gt;
&lt;br /&gt;
[1] http://agave.garden.org/~aaronh/rcs/manual/html/ch05.html  &lt;br /&gt;
&lt;br /&gt;
[2] http://catb.org/esr/writings/taoup/html/ch15s05.html&lt;br /&gt;
&lt;br /&gt;
[3] http://www.ibm.com/developerworks/aix/library/au-dist_ver_control/&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;/div&gt;</summary>
		<author><name>Vksingh</name></author>
	</entry>
</feed>