<?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=Agoel2</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=Agoel2"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Agoel2"/>
	<updated>2026-07-17T22:35:21Z</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_2013/oss_paa&amp;diff=80473</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80473"/>
		<updated>2013-10-30T01:59:37Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza] project has a collapsible tree view structure to facilitate traversal through all learning objects. The problem statement is to redesign the underlying structure and include efficient search, filter and sort mechanism in the tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolders respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree. The structure of the tree is as follows -&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:ExistingUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:newUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample1.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows -&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
The user selects one of the two fields and enters the course/assignment name. Then he will see a list of all the elements which are related to that course/assignment.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample2.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample3.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza]&lt;br /&gt;
&lt;br /&gt;
:2. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:3. [https://github.com/prateeky1407/expertiza Git repository]&lt;br /&gt;
&lt;br /&gt;
:4. [https://docs.google.com/a/ncsu.edu/document/d/1Z0xjFZu-Zy-xm73YyUVUgFCtfWgRwhN1rZuThoyF-U0/edit Steps to setup Expertiza]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80471</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80471"/>
		<updated>2013-10-30T01:45:39Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza] project has a collapsible tree view structure to facilitate traversal through all learning objects. The problem statement is to redesign the underlying structure and include efficient search, filter and sort mechanism in the tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolders respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree. The structure of the tree is as follows -&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:ExistingUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:newUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample1.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows -&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
The user selects one of the two fields and enters the course/assignment name. Then he will see a list of all the elements which are related to that course/assignment.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample2.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample3.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza]&lt;br /&gt;
&lt;br /&gt;
:2. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:3. [https://github.com/prateeky1407/expertiza Git repository]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80261</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80261"/>
		<updated>2013-10-29T04:30:12Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza] project has a collapsible tree view structure to facilitate traversal through all learning objects. The problem statement is to redesign the underlying structure and include efficient search, filter and sort mechanism in the tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolders respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree. The structure of the tree is as follows -&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:ExistingUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:newUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample1.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample2.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample3.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza]&lt;br /&gt;
&lt;br /&gt;
:2. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:3. [https://github.com/prateeky1407/expertiza Git repository]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80260</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80260"/>
		<updated>2013-10-29T04:26:55Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza] project has a collapsible tree view structure to facilitate traversal through all learning objects. The problem statement is to redesign the underlying structure and include efficient search, filter and sort mechanism in the tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolders respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree. The structure of the tree is as follows -&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:ExistingUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:newUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample1.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample2.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample3.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza]&lt;br /&gt;
&lt;br /&gt;
:2. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:3. [https://github.com/prateeky1407/expertiza Git repository]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80259</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80259"/>
		<updated>2013-10-29T04:23:29Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza] project has a collapsible tree view structure to facilitate traversal through all learning objects. The problem statement is to redesign the underlying structure and include efficient search, filter and sort mechanism in the tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolders respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:ExistingUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:newUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample1.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample2.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample3.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza]&lt;br /&gt;
&lt;br /&gt;
:2. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:3. [https://github.com/prateeky1407/expertiza Git repository]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80258</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80258"/>
		<updated>2013-10-29T04:21:41Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The Expertiza project has a collapsible tree view structure to facilitate traversal through all learning objects. The problem statement is to redesign the underlying structure and include efficient search, filter and sort mechanism in the tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:ExistingUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:newUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample1.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample2.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample3.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://wikis.lib.ncsu.edu/index.php/Expertiza Expertiza]&lt;br /&gt;
&lt;br /&gt;
:2. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:3. [https://github.com/prateeky1407/expertiza Git repository]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80257</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80257"/>
		<updated>2013-10-29T04:09:09Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The problem statement is to include search/filter/sort using a collapsible tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:ExistingUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:newUI.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample1.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample2.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
 '''[[File:sample3.jpg]]'''&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:2. [https://github.com/prateeky1407/expertiza Git repository]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80256</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80256"/>
		<updated>2013-10-29T04:07:23Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The problem statement is to include search/filter/sort using a collapsible tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
[[File:ExistingUI.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
[[File:newUI.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
[[File:sample1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
[[File:sample2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
[[File:sample3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;br /&gt;
&lt;br /&gt;
== External Links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://152.46.20.83:3000/ VCL Link]&lt;br /&gt;
&lt;br /&gt;
:2. [https://github.com/prateeky1407/expertiza Git repository]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80255</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80255"/>
		<updated>2013-10-29T04:01:38Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The problem statement is to include search/filter/sort using a collapsible tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
[[File:ExistingUI.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
[[File:newUI.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
[[File:sample1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
[[File:sample2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
[[File:sample3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in -&lt;br /&gt;
 ''' \view \tree_display\_page_header.html.erb  '''&lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
 '''tree_display_controller.rb '''&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
 '''questionnaire_node.rb '''&lt;br /&gt;
 '''assignment_node.rb '''&lt;br /&gt;
 '''course_node.rb '''&lt;br /&gt;
 '''node.rb '''&lt;br /&gt;
 '''folder_node.rb '''&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
 '''User  -&amp;gt; input string  -&amp;gt;  Controller. '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
 '''Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator) '''&lt;br /&gt;
 '''Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display) '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sample3.jpg&amp;diff=80254</id>
		<title>File:Sample3.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sample3.jpg&amp;diff=80254"/>
		<updated>2013-10-29T03:54:14Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sample2.jpg&amp;diff=80253</id>
		<title>File:Sample2.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sample2.jpg&amp;diff=80253"/>
		<updated>2013-10-29T03:54:04Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Sample1.jpg&amp;diff=80252</id>
		<title>File:Sample1.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Sample1.jpg&amp;diff=80252"/>
		<updated>2013-10-29T03:53:50Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:NewUI.jpg&amp;diff=80251</id>
		<title>File:NewUI.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:NewUI.jpg&amp;diff=80251"/>
		<updated>2013-10-29T03:53:18Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80250</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80250"/>
		<updated>2013-10-29T03:52:33Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The problem statement is to include search/filter/sort using a collapsible tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
[[File:ExistingUI.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
&lt;br /&gt;
[[File:newUI.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.2 Above is the new UI which includes search and filter functionality&lt;br /&gt;
&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
&lt;br /&gt;
[[File:sample1.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.3 A sample output of searching “demo” in assignments.&lt;br /&gt;
&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
[[File:sample2.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.4 Sample output which shows the result of filtering assignments by course “CourseTest1” &lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
[[File:sample3.jpg]]&lt;br /&gt;
&lt;br /&gt;
Fig.5 Sample output which shows the same result of searching “demo” in assignments but sorted in descending order.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in \view \tree_display\_page_header.html.erb &lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
course_node.rb&lt;br /&gt;
&lt;br /&gt;
node.rb&lt;br /&gt;
&lt;br /&gt;
folder_node.rb&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
User  -&amp;gt; input string  -&amp;gt;  Controller.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator)&lt;br /&gt;
&lt;br /&gt;
Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ExistingUI.jpg&amp;diff=80249</id>
		<title>File:ExistingUI.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ExistingUI.jpg&amp;diff=80249"/>
		<updated>2013-10-29T03:47:49Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: uploaded a new version of &amp;amp;quot;File:ExistingUI.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:ExistingUI.jpg&amp;diff=80248</id>
		<title>File:ExistingUI.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:ExistingUI.jpg&amp;diff=80248"/>
		<updated>2013-10-29T03:44:20Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80247</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80247"/>
		<updated>2013-10-29T03:43:59Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The problem statement is to include search/filter/sort using a collapsible tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
[[File:ExistingUI.jpg]]&lt;br /&gt;
Fig.1 Existing UI which implements display of nodes and a sort utility&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in \view \tree_display\_page_header.html.erb &lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
course_node.rb&lt;br /&gt;
&lt;br /&gt;
node.rb&lt;br /&gt;
&lt;br /&gt;
folder_node.rb&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
User  -&amp;gt; input string  -&amp;gt;  Controller.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator)&lt;br /&gt;
&lt;br /&gt;
Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80246</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80246"/>
		<updated>2013-10-29T03:37:44Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Expertiza OSS Project –E809  (TreeDisplay)'''&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The problem statement is to include search/filter/sort using a collapsible tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
&lt;br /&gt;
: •	Questionnaire&lt;br /&gt;
&lt;br /&gt;
:: o	Review&lt;br /&gt;
&lt;br /&gt;
:: o	Metareview&lt;br /&gt;
&lt;br /&gt;
:: o	Author Feedback&lt;br /&gt;
&lt;br /&gt;
:: o	Teammate Review&lt;br /&gt;
&lt;br /&gt;
:: o	Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Global Survey&lt;br /&gt;
&lt;br /&gt;
:: o	Course Evaluation&lt;br /&gt;
&lt;br /&gt;
: •	Courses&lt;br /&gt;
&lt;br /&gt;
:: o	Course&lt;br /&gt;
&lt;br /&gt;
::: 	assignment&lt;br /&gt;
&lt;br /&gt;
: •	Assignments&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
&lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
&lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
&lt;br /&gt;
: 1.  A course can have many assignments.&lt;br /&gt;
&lt;br /&gt;
: 2.  An assignment can have many questionnaires.&lt;br /&gt;
&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in \view \tree_display\_page_header.html.erb &lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
&lt;br /&gt;
questionnaire_node.rb&lt;br /&gt;
&lt;br /&gt;
assignment_node.rb&lt;br /&gt;
&lt;br /&gt;
course_node.rb&lt;br /&gt;
&lt;br /&gt;
node.rb&lt;br /&gt;
&lt;br /&gt;
folder_node.rb&lt;br /&gt;
&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
&lt;br /&gt;
User  -&amp;gt; input string  -&amp;gt;  Controller.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
&lt;br /&gt;
Controller  -&amp;gt;  search string  -&amp;gt;  Models(Iterator)&lt;br /&gt;
&lt;br /&gt;
Iterator  -&amp;gt;  Controller  -&amp;gt;  View(display)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80245</id>
		<title>CSC/ECE 517 Fall 2013/oss paa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/oss_paa&amp;diff=80245"/>
		<updated>2013-10-29T03:29:36Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: Created page with &amp;quot;== '''Expertiza OSS Project –E809  (TreeDisplay)''' ==  __TOC__ == Introduction == The problem statement is to include search/filter/sort using a collapsible tree view structur...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Expertiza OSS Project –E809  (TreeDisplay)''' ==&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
The problem statement is to include search/filter/sort using a collapsible tree view structure. The tree is composed of different folders namely Assignments, Courses, Questionnaires and their subfolder respectively.&lt;br /&gt;
&lt;br /&gt;
==Existing Design==&lt;br /&gt;
Currently the folders structure is displayed as a tree; the structure of the tree is as follows --&lt;br /&gt;
•	Questionnaire&lt;br /&gt;
o	Review&lt;br /&gt;
o	Metareview&lt;br /&gt;
o	Author Feedback&lt;br /&gt;
o	Teammate Review&lt;br /&gt;
o	Survey&lt;br /&gt;
o	Global Survey&lt;br /&gt;
o	Course Evaluation&lt;br /&gt;
•	Courses&lt;br /&gt;
o	Course&lt;br /&gt;
	assignment&lt;br /&gt;
•	Assignments&lt;br /&gt;
&lt;br /&gt;
The whole set of Courses, Assignments and Questionnaires are displayed on screen in a collapsible tree view upon login. Items may be expanded and collapsed. There is no functionality to search/filter results.&lt;br /&gt;
The sort functionality has been provided which sorts the tree structure with important metrics such as creation date, name and directory in ascending as well as descending order. &lt;br /&gt;
We also have the option to view either the public and private items or the private items only.&lt;br /&gt;
&lt;br /&gt;
==Project Requirement==&lt;br /&gt;
The tree display can be inefficient given many objects (courses, etc.).  We are supposed to design the underlying structure at the model level to efficiently retrieve organized data. &lt;br /&gt;
We are also required to redesign the view to enable users to filter/search and sort by important metrics such as creation date, name (alphabetical) and relationship (e.g. filter all assignments by a course). &lt;br /&gt;
The interface should be kept modular in the code to increase extensibility for future metrics.  We have to keep the controller as ‘skinny’ as possible, leaving the model to perform computational logic.&lt;br /&gt;
&lt;br /&gt;
==Implementation==&lt;br /&gt;
We have introduced two new features - search and filter.&lt;br /&gt;
To implement the search/filter, we have decided to use the same tree display which is efficient and simple to show the current data.&lt;br /&gt;
===Search===&lt;br /&gt;
This functionality searches for a keyword among 3 categories courses/assignment/questionnaire. It is implemented using substring search. All the entries whose substring matches with the search string are returned. Based on the input the user can view the filtered results in any of the 3 categories.&lt;br /&gt;
===Filter===&lt;br /&gt;
There are 2 main relationships in the tree structure. These are as follows --&lt;br /&gt;
1.  A course can have many assignments.&lt;br /&gt;
2.  An assignment can have many questionnaires.&lt;br /&gt;
===Compatibility with existing features===&lt;br /&gt;
We have implemented these 2 filters in the code. A user can search all assignments for a respective course, and also search for all questionnaires related to one assignment. We preserve the sort feature across the implementation which means that the user can sort the filtered results also. The user can also view the public and private items or the private items only for the filtered result.&lt;br /&gt;
&lt;br /&gt;
==Design==&lt;br /&gt;
===View===&lt;br /&gt;
Since the tree display is the best way to show the folder structure and to maximize code reuse, we choose the same display style for search results.  We add search and filter boxes to input the search/filter keyword on the main page and output the result on the same page. We also add the reset button to return to the primary key structure.&lt;br /&gt;
All the above changes are done in \view \tree_display\_page_header.html.erb &lt;br /&gt;
&lt;br /&gt;
===Controller===&lt;br /&gt;
We modify the existing list function in the tree_display_controller.rb as it is responsible for all the inputs on the tree display page. We also add a new function filter in the file which parses the input string given by the user and converts it into a meaningful string depending on what user wants to filter. Filter is called by list function and the string is placed into a global variable, so that future sort can make use of the previous search.&lt;br /&gt;
&lt;br /&gt;
===Model===&lt;br /&gt;
We have made changes to the following models to search/filter for the keyword in corresponding nodes.-&lt;br /&gt;
questionnaire_node.rb&lt;br /&gt;
assignment_node.rb&lt;br /&gt;
course_node.rb&lt;br /&gt;
node.rb&lt;br /&gt;
folder_node.rb&lt;br /&gt;
All the models have the same logic to parse the input search string and accordingly find the nodes in the model objects. The design is extensible and controller is left skinny which just does the parsing of input string and calls a generic model function.  The summary is given below&lt;br /&gt;
The view takes the string and passes to controller&lt;br /&gt;
User   input string    Controller.&lt;br /&gt;
Controller does the parsing and calls a generic function which iterates over folders.&lt;br /&gt;
Controller    search string    Models(Iterator)&lt;br /&gt;
Iterator    Controller    View(display)&lt;br /&gt;
Model returns the required nodes and controller handles them to view. The code which has been put in all model objects is generic. The same code can be used with future nodes or new folders when they are added in future.&lt;br /&gt;
The controller code remains generic and it only needs to include a new case which specifies the new filter. This way we can extend the same controller and model code later for future searches. By adding the code in this manner, we have introduced maximum cohesion as all search/filter functionality always uses the same code.&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013&amp;diff=80244</id>
		<title>CSC/ECE 517 Fall 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013&amp;diff=80244"/>
		<updated>2013-10-29T03:20:45Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[ CSC/ECE 517 Fall 2012/ch1 1w23 ph ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w30 nn]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w21 w]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w01 aj]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w24 nv]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w29 rkld]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w25 aras]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w30 ps]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w19 rj]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w18 bs]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w17 pk]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w22 ss]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w12 vn]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w14 st]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w08 cc]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w10 ga ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w26 as ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w27 ma ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w13 aa ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w11 sv ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w07 d ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w20 gq ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w03 ss ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w28 nm ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w02 pp ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1  1w6 zs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1  1w04 y ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w05 st ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w09 hs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w32 av ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w48 x ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w43 av]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w46 ka]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w33 aa]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w35 sa ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w39 as ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w31 vm ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w43 sm ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w44 s ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w47 ka ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w34 fs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w40 ao ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss fmv ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss vna ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/oss paa ]]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79948</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79948"/>
		<updated>2013-10-08T00:55:47Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
[[File:img_bdd.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-1. Steps for BDD&amp;lt;ref&amp;gt;http://msdn.microsoft.com/en-us/magazine/gg490346.aspx&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-2. Steps for TDD'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules.&amp;lt;ref&amp;gt;http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd&amp;lt;/ref&amp;gt; They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD &amp;lt;ref&amp;gt;http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
For example, to define a class named Student, TDD will create StudentTest class containing required tests, whereas BDD will create StudentBehaviour class which will contain example methods to define the behaviour of Student class.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD &amp;lt;ref&amp;gt;http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons&amp;lt;/ref&amp;gt;==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails &amp;lt;ref&amp;gt;http://www.ryangreenhall.com/articles/bdd-by-example.html&amp;lt;/ref&amp;gt;==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber &amp;lt;ref&amp;gt;http://cukes.info/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:img_cucumber.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-3. Use of Cucumber&amp;lt;ref&amp;gt;http://infowarestudios.co.za/agile-testing-getting-agile-tests-incorporated-into-your-sprints-using-bdd-and-cucumber-in-c/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
[[File:img_rspec.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-4. Use of RSpec&amp;lt;ref&amp;gt;http://i.stack.imgur.com/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RBehave &amp;lt;ref&amp;gt;http://dannorth.net/2007/06/17/introducing-rbehave/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
:2. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
:3. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
:4. [http://en.wikipedia.org/wiki/RSpec RSpec]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== External links ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
:2. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
:3. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
:4. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
:5. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79947</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79947"/>
		<updated>2013-10-08T00:53:16Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
[[File:img_bdd.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-1. Steps for BDD&amp;lt;ref&amp;gt;http://msdn.microsoft.com/en-us/magazine/gg490346.aspx&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-2. Steps for TDD'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules.&amp;lt;ref&amp;gt;http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd&amp;lt;/ref&amp;gt; They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD &amp;lt;ref&amp;gt;http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
For example, to define a class named Student, TDD will create StudentTest class containing required tests, whereas BDD will create StudentBehaviour class which will contain example methods to define the behaviour of Student class.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD &amp;lt;ref&amp;gt;http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons&amp;lt;/ref&amp;gt;==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails &amp;lt;ref&amp;gt;http://www.ryangreenhall.com/articles/bdd-by-example.html&amp;lt;/ref&amp;gt;==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber &amp;lt;ref&amp;gt;http://cukes.info/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:img_cucumber.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-3. Use of Cucumber&amp;lt;ref&amp;gt;http://infowarestudios.co.za/agile-testing-getting-agile-tests-incorporated-into-your-sprints-using-bdd-and-cucumber-in-c/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
[[File:img_rspec.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-4. Use of RSpec&amp;lt;ref&amp;gt;http://i.stack.imgur.com/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RBehave &amp;lt;ref&amp;gt;http://dannorth.net/2007/06/17/introducing-rbehave/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
:1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
:2. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
:3. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
:4. [http://en.wikipedia.org/wiki/RSpec RSpec]&lt;br /&gt;
&lt;br /&gt;
:5. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
:6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
:7. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
:8. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
:9. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79945</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79945"/>
		<updated>2013-10-08T00:49:08Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
[[File:img_bdd.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-1. Steps for BDD&amp;lt;ref&amp;gt;http://msdn.microsoft.com/en-us/magazine/gg490346.aspx&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-2. Steps for TDD'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules.&amp;lt;ref&amp;gt;http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd&amp;lt;/ref&amp;gt; They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD &amp;lt;ref&amp;gt;http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
For example, to define a class named Student, TDD will create StudentTest class containing required tests, whereas BDD will create StudentBehaviour class which will contain example methods to define the behaviour of Student class.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD &amp;lt;ref&amp;gt;http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons&amp;lt;/ref&amp;gt;==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails &amp;lt;ref&amp;gt;http://www.ryangreenhall.com/articles/bdd-by-example.html&amp;lt;/ref&amp;gt;==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber &amp;lt;ref&amp;gt;http://cukes.info/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:img_cucumber.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-3. Use of Cucumber&amp;lt;ref&amp;gt;http://infowarestudios.co.za/agile-testing-getting-agile-tests-incorporated-into-your-sprints-using-bdd-and-cucumber-in-c/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
[[File:img_rspec.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-4. Use of RSpec&amp;lt;ref&amp;gt;http://i.stack.imgur.com/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RBehave &amp;lt;ref&amp;gt;http://dannorth.net/2007/06/17/introducing-rbehave/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
4. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
5. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
6. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
7. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
8. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79942</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79942"/>
		<updated>2013-10-08T00:46:34Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
[[File:img_bdd.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-1. Steps for BDD&amp;lt;ref&amp;gt;http://msdn.microsoft.com/en-us/magazine/gg490346.aspx&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-2. Steps for TDD'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules.&amp;lt;ref&amp;gt;http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd&amp;lt;/ref&amp;gt; They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD &amp;lt;ref&amp;gt;http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd&amp;lt;/ref&amp;gt; ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
For example, to define a class named Student, TDD will create StudentTest class containing required tests, whereas BDD will create StudentBehaviour class which will contain example methods to define the behaviour of Student class.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD &amp;lt;ref&amp;gt;http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons&amp;lt;/ref&amp;gt;==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails &amp;lt;ref&amp;gt;http://www.ryangreenhall.com/articles/bdd-by-example.html&amp;lt;/ref&amp;gt;==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber &amp;lt;ref&amp;gt;http://cukes.info/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:img_cucumber.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-3. Use of Cucumber&amp;lt;ref&amp;gt;http://infowarestudios.co.za/agile-testing-getting-agile-tests-incorporated-into-your-sprints-using-bdd-and-cucumber-in-c/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
[[File:img_rspec.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-4. Use of RSpec&amp;lt;ref&amp;gt;http://i.stack.imgur.com/&amp;lt;/ref&amp;gt;'''&lt;br /&gt;
&lt;br /&gt;
=== RBehave &amp;lt;ref&amp;gt;http://dannorth.net/2007/06/17/introducing-rbehave/&amp;lt;/ref&amp;gt;===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== See also ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
4. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
5. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
6. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
7. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
8. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;references /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79932</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79932"/>
		<updated>2013-10-08T00:29:57Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
[[File:img_bdd.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-1. Steps for BDD'''&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-2. Steps for TDD'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
For example, to define a class named Student, TDD will create StudentTest class containing required tests, whereas BDD will create StudentBehaviour class which will contain example methods to define the behaviour of Student class.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
[[File:img_cucumber.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-3. Use of Cucumber'''&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
[[File:img_rspec.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-4. Use of RSpec'''&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
10. [http://cukes.info/ Cucumber coding style]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Img_rspec.jpg&amp;diff=79929</id>
		<title>File:Img rspec.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Img_rspec.jpg&amp;diff=79929"/>
		<updated>2013-10-08T00:27:51Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Img_cucumber.jpg&amp;diff=79927</id>
		<title>File:Img cucumber.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Img_cucumber.jpg&amp;diff=79927"/>
		<updated>2013-10-08T00:27:33Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Img_bdd.jpg&amp;diff=79926</id>
		<title>File:Img bdd.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Img_bdd.jpg&amp;diff=79926"/>
		<updated>2013-10-08T00:25:49Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79904</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79904"/>
		<updated>2013-10-07T23:47:46Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
'''Figure-1. Steps for TDD'''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
For example, to define a class named Student, TDD will create StudentTest class containing required tests, whereas BDD will create StudentBehaviour class which will contain example methods to define the behaviour of Student class.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
10. [http://cukes.info/ Cucumber coding style]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79901</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79901"/>
		<updated>2013-10-07T23:44:13Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
For example, to define a class named Student, TDD will create StudentTest class containing required tests, whereas BDD will create StudentBehaviour class which will contain example methods to define the behaviour of Student class.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
10. [http://cukes.info/ Cucumber coding style]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79892</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79892"/>
		<updated>2013-10-07T23:32:22Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development](also known as TDD). It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79890</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79890"/>
		<updated>2013-10-07T23:28:40Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== '''Behavior Driven Development in Ruby on Rails''' ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from [http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development]. It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
__TOC__&lt;br /&gt;
== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Behavior Driven Development approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. The client specifies his functional specifications to the developer by writing [http://en.wikipedia.org/wiki/User_story user stories] which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79658</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79658"/>
		<updated>2013-10-07T03:10:16Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an [http://en.wikipedia.org/wiki/Agile_software_development Agile] development strategy that has been derived from Test Driven Development. It was developed by [http://dannorth.net/ Dan North] in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79657</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79657"/>
		<updated>2013-10-07T03:01:36Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79655</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79655"/>
		<updated>2013-10-07T02:57:45Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
:: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]. RBehave and RSpec are often used as a combination to simplify BDD wordings.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79653</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79653"/>
		<updated>2013-10-07T02:54:22Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
:: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79651</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79651"/>
		<updated>2013-10-07T02:51:39Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
:: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests using Behaviour-driven development.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RBehave ===&lt;br /&gt;
RBehave is a framework based on the story framework from [http://jbehave.org JBehave] which describes behaviour at the application level. It is simpler than RSpec and eliminates the need to reuse code. The choice of frameworks depend on the level of [http://en.wikipedia.org/wiki/Granularity granularity]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;br /&gt;
&lt;br /&gt;
14. [http://www.infoq.com/news/2007/10/RSpec-incorporates-RBehave RSpec incorporates RBehave]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79644</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79644"/>
		<updated>2013-10-07T02:35:19Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
:: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc. It explains the behavior of objects at the code level. It provides a simple and elegant syntax and works effectively with some other frameworks like [http://rubyonrails.org/ Rails] and [http://mocha.rubyforge.org/ Mocha] library.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79643</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79643"/>
		<updated>2013-10-07T02:30:35Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
:: •	BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79457</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79457"/>
		<updated>2013-10-06T16:49:21Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a ''' [role]&lt;br /&gt;
 '''I can '''[feature] &lt;br /&gt;
 '''so that '''[reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder '''&lt;br /&gt;
 ''' I can login with my credentials '''&lt;br /&gt;
 ''' so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc.&lt;br /&gt;
[[File:BDD.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79455</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79455"/>
		<updated>2013-10-06T16:38:53Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
 '''As a [role], I can [feature] so that [reason]'''&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
 ''' As a Bank account holder, I can login with my credentials so that I can check my account details '''&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
 ''' Given '''[Context]&lt;br /&gt;
 ''' When ''' [Event Occurs]&lt;br /&gt;
 ''' Then ''' [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
 ''' Given I enter a valid username '''&lt;br /&gt;
 ''' And I enter a valid password '''&lt;br /&gt;
 ''' When I press the Login Button '''&lt;br /&gt;
 ''' Then I should be redirected to the home page '''&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc.&lt;br /&gt;
[[File:BDD.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:BDD.jpg&amp;diff=79454</id>
		<title>File:BDD.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:BDD.jpg&amp;diff=79454"/>
		<updated>2013-10-06T16:12:48Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: uploaded a new version of &amp;amp;quot;File:BDD.jpg&amp;amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79453</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79453"/>
		<updated>2013-10-06T16:11:36Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: /* Test-driven development (TDD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
[[File:Steps.jpg]]&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
:: As a [role], I can [feature] so that [reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
:: As a Bank account holder, I can login with my credentials so that I can check my account details&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
:: Given [Context]&lt;br /&gt;
&lt;br /&gt;
:: When [Event Occurs]&lt;br /&gt;
&lt;br /&gt;
:: Then  [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
:: Given I enter a valid username &lt;br /&gt;
&lt;br /&gt;
:: And I enter a valid password&lt;br /&gt;
&lt;br /&gt;
:: When I press the Login Button&lt;br /&gt;
&lt;br /&gt;
:: Then I should be redirected to the home page&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc.&lt;br /&gt;
[[File:BDD.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Steps.jpg&amp;diff=79452</id>
		<title>File:Steps.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Steps.jpg&amp;diff=79452"/>
		<updated>2013-10-06T16:11:24Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79451</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79451"/>
		<updated>2013-10-06T16:08:40Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
:: As a [role], I can [feature] so that [reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
:: As a Bank account holder, I can login with my credentials so that I can check my account details&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
:: Given [Context]&lt;br /&gt;
&lt;br /&gt;
:: When [Event Occurs]&lt;br /&gt;
&lt;br /&gt;
:: Then  [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
:: Given I enter a valid username &lt;br /&gt;
&lt;br /&gt;
:: And I enter a valid password&lt;br /&gt;
&lt;br /&gt;
:: When I press the Login Button&lt;br /&gt;
&lt;br /&gt;
:: Then I should be redirected to the home page&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc.&lt;br /&gt;
[[File:BDD.jpg]]&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber Difference between RSpec and Cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:BDD.jpg&amp;diff=79450</id>
		<title>File:BDD.jpg</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:BDD.jpg&amp;diff=79450"/>
		<updated>2013-10-06T16:07:05Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79449</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w33 aa</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w33_aa&amp;diff=79449"/>
		<updated>2013-10-06T15:49:09Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: Created page with &amp;quot;== Behavior-driven development in Ruby on Rails ==  Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Develo...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
:: As a [role], I can [feature] so that [reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
:: As a Bank account holder, I can login with my credentials so that I can check my account details&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
:: Given [Context]&lt;br /&gt;
&lt;br /&gt;
:: When [Event Occurs]&lt;br /&gt;
&lt;br /&gt;
:: Then  [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
:: Given I enter a valid username &lt;br /&gt;
&lt;br /&gt;
:: And I enter a valid password&lt;br /&gt;
&lt;br /&gt;
:: When I press the Login Button&lt;br /&gt;
&lt;br /&gt;
:: Then I should be redirected to the home page&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w01_aj&amp;diff=79448</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w01 aj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w01_aj&amp;diff=79448"/>
		<updated>2013-10-06T15:48:27Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Version Control Tools ==&lt;br /&gt;
&lt;br /&gt;
Version control tools are the tools which manage the changes to documents, computer programs, large web sites, and other collections of information. It is a repository of code along with the history of the changes. All the change made to the source is tracked, along with the other details like who made the changes, why the changes were made and other comments. This concept is very important for large projects requiring collaborated development. Whether it is the history of this wiki page or large software development project like Facebook, the ability to track the changes, and to reverse changes when necessary can make all huge difference between a well-managed and controlled process and an uncontrolled ‘first come, first served’ system. It can be used to track the development lifecycle of a project in detail.&lt;br /&gt;
&lt;br /&gt;
== Categories of version control tools ==&lt;br /&gt;
&lt;br /&gt;
=== Distributed Model ===&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Peer-to-peer Peer-to-peer] approach is followed in distributed revision control system in which each person’s copy of codebase is the current version of his code. In this way, each developer has the copy of full code rather than a part of code on which that developer is working. This system then synchronizes the copies of each developer by exchanging patches which contain the sets of changes. In this way each developer gets the latest copy of the code portion that others are working on. This method, most of the times, does not use the central repository. &lt;br /&gt;
Major advantages of this system are:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
•	As the full code is available on the hard disk, most of the actions are very fast as the interaction with the remote server is not required.&lt;br /&gt;
&lt;br /&gt;
•	Committing new change sets can be done locally without anyone else seeing them. Once you have a group of change sets ready, you can push all of them at once.&lt;br /&gt;
&lt;br /&gt;
•	Except pushing and pulling, most of the actions can be performed without an internet connection.&lt;br /&gt;
&lt;br /&gt;
Despite the above advantages, Distributed Version Control Tools pose some problems. As the copy of whole code is maintained at the local machine, it requires a huge amount of space in case the files cannot be compressed (binary files). Moreover, in case the project has a huge history of changes, it might require large amount of time to download the entire patches.&lt;br /&gt;
&lt;br /&gt;
Few examples of such tools are Codeville, Fossil, LibreSource, Monotone,  Veracity and Git. &lt;br /&gt;
Let us consider Git to explain the features of distributed model for version control tools.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Git ====&lt;br /&gt;
Git is a free and open source distributed version control system. Its highest priority is to provide the high speed to its users. It was initially designed and developed for Linux kernel in 2005. was originally designed as a low-level version control system engine on top of which others could write front ends. However, the core Git project has since become a complete version control system that is usable directly. As of today, Git is estimated to have captured 30% of the market.&lt;br /&gt;
Every Git working directory is a full-fledged repository with complete history and full version tracking capabilities, not dependent on network access or a central server.&lt;br /&gt;
&lt;br /&gt;
[[File:Branching-Git.png]]&lt;br /&gt;
''(Image showing the concept of branching for Git)''&lt;br /&gt;
&lt;br /&gt;
==== Design of Git ====&lt;br /&gt;
Git, like any other distributed version control system, has three main functionalities:&lt;br /&gt;
&lt;br /&gt;
•	Code storage&lt;br /&gt;
&lt;br /&gt;
•	Keeping track of the changes made to the code&lt;br /&gt;
&lt;br /&gt;
•	Synchronizing all the developers for the latest code&lt;br /&gt;
&lt;br /&gt;
===== Code Storage =====&lt;br /&gt;
&lt;br /&gt;
Blob is the basic storage in Git. Git stores the contents of the file for tracking history, and not just the differences between individual files for each change. The contents are then referenced by a 40 character [http://en.wikipedia.org/wiki/SHA-1 SHA1 hash]. Pretty much every object, be it a commit, tree, or blob has a SHA.&lt;br /&gt;
&lt;br /&gt;
This gives an added advantage that if two or more copies of the same file are stored in the repository, Git will store only one file internally.&lt;br /&gt;
&lt;br /&gt;
The next level object is a tree. These can be thought of as folders or directories. Finally, this brings us to the most important object: the commit. Commits can be thought of as snapshots. The major difference between Git and any other tool is the way Git thinks about its data. Conceptually, most other systems store information as a list of file-based changes. Tools consider the information they keep as a set of files and the changes made to each file over time.&lt;br /&gt;
&lt;br /&gt;
[[File:Data_storage_git.png]]&lt;br /&gt;
''(Image showing data storage in case of normal control system)''&lt;br /&gt;
In contrast, Git thinks of its data more like a set of snapshots of a mini file system.&lt;br /&gt;
Every time you commit, or save the state of your project in Git, it basically takes a picture of what all your files look like at that moment and stores a reference to that snapshot.&lt;br /&gt;
&lt;br /&gt;
Git stores data as:&lt;br /&gt;
 &lt;br /&gt;
[[File:Git_commit.png‎]]&lt;br /&gt;
''(Image showing data storage in case of Git)''&lt;br /&gt;
&lt;br /&gt;
This is an important difference between Git and all other tools. It makes Git reconsider almost every aspect of version control that most other systems copied from the previous generation.&lt;br /&gt;
&lt;br /&gt;
===== Tracking the changes made to the code =====&lt;br /&gt;
Git uses directed acyclic graph to store its history. Each commit in Git can have multiple or single parent commits. This info about the ancestors is stored with each commit. Here we can have nonlinear history. That means a commit can have multiple parent commits on which the child commit depends. Below example shows 3-way merge that has 3 parents:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:Git_Tree.png‎]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The history of a file is linked all the way up its directory structure to the root directory, which is then linked to a commit node. This commit node, in turn, can have one or more parents. When merging multiple branches we are merging the contents in a DAG. This allows Git to determine common ancestors.&lt;br /&gt;
&lt;br /&gt;
===== Synchronizing all the developers for the latest code =====&lt;br /&gt;
&lt;br /&gt;
In Git, when a developer makes the same modification to the equivalent file in the local Git code, the change will be recorded locally first, then they can &amp;quot;push&amp;quot; the commits to the other users who are working on the same project. The content changes are stored identically for each Git repository that the commit exists in. &lt;br /&gt;
Upon the local commit, the local Git repository will create a new object representing a file for the changed file. For each directory above the changed file, a new tree object is created with a new identifier. A DAG is created starting from the newly created root tree object pointing to the files and referencing the newly created blob in place of that file's previous blob object in the previous tree hierarchy.&lt;br /&gt;
At this point the commit is still local to the current Git code on developer’s local device. When he &amp;quot;pushes&amp;quot; the commit to a publicly accessible Git repository this commit gets sent to that repository. After the public repository verifies that the commit can apply to the branch, the same objects are stored in the public repository as were originally created in the local Git repository.&lt;br /&gt;
&lt;br /&gt;
==== Tools available for Git ====&lt;br /&gt;
&lt;br /&gt;
Git provides many command line and UI tools for most of the platforms. All these tools are based on Git core toolkit.&lt;br /&gt;
Git toolkit is divided into 2 parts: plumbing and porcelain. Plumbing contains two level commands that enable basic content tracking and modification of directed acyclic graphs. Procelain contains the more commonly used commands which are used to maintain repositories and communicating with other developers. Work is in progress for improving the toolkit design and making it faster.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===== Some of the major characteristics of Git: =====&lt;br /&gt;
===== Good support for expansion =====&lt;br /&gt;
Git is extremely fast and scalable. Referring to a local copy of code instead of the copy on remote server is very fast. As the project size increases, the affect of size on performance is very less.&lt;br /&gt;
&lt;br /&gt;
===== Distributed development =====&lt;br /&gt;
Each developer is provided with the local copy of the entire development history. Changes are copied from one of the repository to another. These changes are transferred and can integrate the same way the local branches of the repository.&lt;br /&gt;
&lt;br /&gt;
===== Backward compatibility =====&lt;br /&gt;
Repositories can be published by HTTP, FTP, rsync, or a Git protocol over either a plain socket, ssh or HTTP. Git also has a CVS server emulation, which enables the use of existing CVS clients and IDE plugins to access Git repositories.&lt;br /&gt;
&lt;br /&gt;
===== Non-linear development =====&lt;br /&gt;
Git provides quick branching and merging. A branch in git is only a reference to a single commit. It supports non-linear development through various tools.&lt;br /&gt;
&lt;br /&gt;
===== Support for incomplete merge =====&lt;br /&gt;
In case of an incomplete merge, Git provides multiple algorithms for letting the user know of this situation and also provides support for manual editing.&lt;br /&gt;
&lt;br /&gt;
===== Cryptographic authentication of history =====&lt;br /&gt;
Git stores the history so that the id of a particular version depends upon the history of changes resulting into that commit. Once it is published, it is not possible to change the old versions without it being noticed.&lt;br /&gt;
&lt;br /&gt;
Some of the major companies using Git in their projects include Google, Facebook, Microsoft(ASP.NET), Twitter, Eclipse and Netflix.&lt;br /&gt;
&lt;br /&gt;
'''Some of the other major tools in this category are given below'''&lt;br /&gt;
&lt;br /&gt;
==== GNU Bazaar ====&lt;br /&gt;
[http://en.wikipedia.org/wiki/GNU_Bazaar GNU Bazaar] (formerly Bazaar-NG, command line tool bzr) is a distributed revision control system sponsored by Canonical.&lt;br /&gt;
Bazaar can be used by a single developer working on multiple branches of local content, or by teams collaborating across a network.&lt;br /&gt;
Bazaar is written in the Python programming language, with packages for major GNU/Linux distributions, Mac OS X and Microsoft Windows.&lt;br /&gt;
&lt;br /&gt;
==== Mercurial ====&lt;br /&gt;
[http://mercurial.selenic.com/ Mercurial] is a cross-platform, distributed revision control tool for software developers. It is mainly implemented using the Python programming language, but includes a binary diff implementation written in C. It is supported on Windows and Unix-like systems, such as FreeBSD, Mac OS X andLinux. Mercurial is primarily a command line program but graphical user interface extensions are available. All of Mercurial's operations are invoked as arguments to its driver program hg, a reference to the chemical symbol of the element mercury.&lt;br /&gt;
&lt;br /&gt;
==== Bitkeeper ====&lt;br /&gt;
[http://www.bitkeeper.com/ BitKeeper] is a software tool for distributed revision control (configuration management, SCM, etc.) of computer source code. A distributed system, BitKeeper competes largely against other systems such as Git and Mercurial. BitKeeper is produced by BitMover Inc., a privately held company based in Campbell, California[2] and owned by CEO Larry McVoy, who had previously designed TeamWare.&lt;br /&gt;
&lt;br /&gt;
BitKeeper builds upon many of the TeamWare concepts. Its key selling point is the fact that it is a distributed version control tool, as opposed to CVSor SVN. One of the defining characteristics of any distributed version control tool is the ease with which distributed development teams can keep their own local source repositories and still work with the central repository. Its web site claims that &amp;quot;BitKeeper has been shown to double the pace of software development&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
=== Client Server Model ===&lt;br /&gt;
Centralized or client-server version control systems are based on the idea that there is a single “central” copy of your project somewhere (probably on a server), and programmers will “commit” their changes to this central copy.&lt;br /&gt;
&lt;br /&gt;
“Committing” a change simply means recording the change in the central system. Other programmers can then see this change. They can also pull down the change, and the version control tool will automatically update the contents of any files that were changed.&lt;br /&gt;
&lt;br /&gt;
Most modern version control systems deal with “changesets,” which simply are a groups of changes (possibly to many files) that should be treated as a cohesive whole. For example: a change to a C header file and the corresponding .c file should always be kept together.&lt;br /&gt;
&lt;br /&gt;
==== Major Advantages of Centralized Version Control over Distributed Version Control ====&lt;br /&gt;
If the project contains many large, binary files that cannot be easily compressed, the space needed to store all versions of these files can accumulate quickly.&lt;br /&gt;
&lt;br /&gt;
If the project has a very long history (50,000 changesets or more), downloading the entire history can take an impractical amount of time and disk space.&lt;br /&gt;
&lt;br /&gt;
==== Perforce ====&lt;br /&gt;
Perforce is an enterprise version control and management system which uses centralized Version Control System. Dedicated Perforce applications are used to sync files between the file repository and individual users' workstations. &lt;br /&gt;
Perforce supports both Git clients and clients that use Perforce's own protocol. A Git client can communicate with the Perforce server over SSH, and other Perforce clients communicate with the server via TCP/IP using a proprietary RPC and streaming protocol.&lt;br /&gt;
&lt;br /&gt;
[[File:perf1.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== The Perforce Versioning Service =====&lt;br /&gt;
The Perforce versioning service manages shared file repositories called depots. Depots contains all revisions of all file under Perforce control. Perforce organizes all the files in depots into directory trees, like a hard drive. Files in a depot are referred to as depot files or versioned files. Files are identified by namespace (i.e., by OS-neutral filenames). File content itself is not stored in the database. MD5 hashes of file content are stored in the database. Text file revisions are stored as RCS deltas and binary file revisions are stored in their entirety. &lt;br /&gt;
&lt;br /&gt;
　　The service maintains a database to track change logs, user permissions, and which users have which files checked out at any time. The &lt;br /&gt;
information stored in this database is referred to as metadata. &lt;br /&gt;
&lt;br /&gt;
　　Database tables are stored as binary files. Checkpoints and journals are written as text files that can be compressed and taken out. A database that has been corrupted by hardware failure or other catastrophe can be recovered from the most recent journal and checkpoint. Administrators must plan for disaster recovery by configuring database journaling and setting up regular checkpoints.&lt;br /&gt;
&lt;br /&gt;
[[File:perf2.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== Perforce applications (clients) =====&lt;br /&gt;
Dedicated Perforce applications communicate with the versioning service to enable the checking in and out, conflict management, branch development, bug tracking request changing and more. They include:&lt;br /&gt;
&lt;br /&gt;
　　• P4, the Perforce Command-Line Client, for all platforms&lt;br /&gt;
&lt;br /&gt;
　　• P4V, the Perforce Visual Client, for Mac OS X, UNIX, Linux, and Windows&lt;br /&gt;
&lt;br /&gt;
　　• P4Web, the Perforce Web Client, a browser-based interface to Perforce&lt;br /&gt;
&lt;br /&gt;
　　• Integrations, or plug-ins, that work with commercial IDEs and productivity software&lt;br /&gt;
&lt;br /&gt;
　　&lt;br /&gt;
When the files are loaded into the workspace, the Perforce application requests the files from the central data repository. To optimize the network utilization, the service keeps track of which files you (and other users) have retrieved. Perforce applications do not require a persistent connection to the versioning service.&lt;br /&gt;
&lt;br /&gt;
===== Connecting and Mapping files to the workspace =====&lt;br /&gt;
　　Perforce applications manages files in a certain location of the hard disk, called the workspace. More than one client workspace can co-exist, even on the same workstation.&lt;br /&gt;
&lt;br /&gt;
　　To customize the location of depot files under the root workspace, users must map the files and directories on the shared versioning service to corresponding areas of local hard drive.&lt;br /&gt;
　　Workspace views:&lt;br /&gt;
&lt;br /&gt;
　　• Determine which files in the depot needs to be in the workspace.&lt;br /&gt;
&lt;br /&gt;
　　• Custom-map files in the depot to files in the workspace.&lt;br /&gt;
&lt;br /&gt;
　　Client workspace views may consist multiple lines or mappings. Each line in the workspace view has a &amp;quot;depot side&amp;quot;, designates a subset of files within the depot, and a &amp;quot;client side&amp;quot; that controls where the files specified on the depot side are located under the workspace root.&lt;br /&gt;
&lt;br /&gt;
[[File:perf3.jpg]]&lt;br /&gt;
&lt;br /&gt;
=====　What file types are supported? =====&lt;br /&gt;
　　Perforce file types include seven base file types.&lt;br /&gt;
&lt;br /&gt;
　　• text files,&lt;br /&gt;
&lt;br /&gt;
　　• binary files,&lt;br /&gt;
&lt;br /&gt;
　　• native apple files on the Macintosh,&lt;br /&gt;
&lt;br /&gt;
　　• Mac resource forks,&lt;br /&gt;
&lt;br /&gt;
　　• symbolic links (symlinks),&lt;br /&gt;
&lt;br /&gt;
　　• unicode (and utf16) files.&lt;br /&gt;
&lt;br /&gt;
===== Working with files =====&lt;br /&gt;
The changelist is the fundamental unit of work. The basic file operations which are common to all VCS (such as editing, adding, deleting, rolling back changes, and file check in) are taken care in changelists.&lt;br /&gt;
A changelist consists file list, their revision numbers, the changes made, and a description that describes the work that has been performed.&lt;br /&gt;
Changelists serve two purposes:&lt;br /&gt;
&lt;br /&gt;
　　• To logically organize the work by grouping related changes to files together,&lt;br /&gt;
&lt;br /&gt;
　　• To ensure the work integrity by making sure that related changes to files are checked in together.&lt;br /&gt;
&lt;br /&gt;
Perforce changelists are atomic change transactions; if a changelist affects three files, then the changes for all three files are committed to the depot, or none of the changes are. Even if the network connection between your Perforce client program and the Perforce server is interrupted during changelist submission, the entire submit fails. Each changelist is identified by a changelist number (generated by Perforce), and a description (supplied by the user).&lt;br /&gt;
&lt;br /&gt;
[[File:perf4.jpg]]&lt;br /&gt;
&lt;br /&gt;
===== Working concurrently =====&lt;br /&gt;
　　Perforce helps teams to work concurrently. The conflict resolution and three-way merge process enables multiple users to work on the same files at the same time without interfering with each other's work.&lt;br /&gt;
&lt;br /&gt;
　　The three-way merge process for resolving file conflicts helps you to resolve conflicting changes to text files, but is not necessarily meaningful for binary files such as graphics or compiled code. If the user is working on files where merges are not meaningful, locking such files is an option to prevent others from making changes that conflict.&lt;br /&gt;
&lt;br /&gt;
　　Perforce supports two types of file locking:&lt;br /&gt;
&lt;br /&gt;
　　• To prevent inconsistencies in current file changes, lock the file. Other users can still check out the locked file, but are restricted to view only privileges.&lt;br /&gt;
&lt;br /&gt;
　　• To prevent a file from being checked out by more than one user at a time, use the +l exclusive-open filetype modifier. Files that have the +l filetype modifier can only be opened by one user at a time. Your Perforce administrator can use a special table called the typemap table to automatically specify certain file types as exclusive-open.&lt;br /&gt;
　　&lt;br /&gt;
=====　Streams =====&lt;br /&gt;
　　Perforce streams are structured containers for the files that consist projects, codelines, and components. Streams confer the following benefits:&lt;br /&gt;
&lt;br /&gt;
　　• Ensures a hierarchical approach to branching&lt;br /&gt;
&lt;br /&gt;
　　• Provides an &amp;quot;out of the box&amp;quot; best-practice branching strategy&lt;br /&gt;
&lt;br /&gt;
　　• Provide metadata about the branch hierarchy to the Perforce service&lt;br /&gt;
&lt;br /&gt;
　　• Provide a standard approach to structuring code (stability and hierarchy)&lt;br /&gt;
&lt;br /&gt;
　　• Automate the generation of client workspace views and branch views&lt;br /&gt;
&lt;br /&gt;
　　• Offer a compelling and informative visualization of stream structure and status&lt;br /&gt;
&lt;br /&gt;
　　• Enable you to organize and visualize (bodies of) code.&lt;br /&gt;
&lt;br /&gt;
　　• Provide rules to make development easier.&lt;br /&gt;
　　&lt;br /&gt;
=====　Codeline Management =====&lt;br /&gt;
Codelines are inter-related files that grow together. To organize groups of related files by purpose, branches are created. To move changes between branches, changelists are integrated. To create a snapshot of files in a specific phase, labels can be used.&lt;br /&gt;
　　&lt;br /&gt;
=====　Branching =====&lt;br /&gt;
　　Branching is a method of managing changes between two or more sets of files. Perforce's Inter-File Branching mechanism enables copying of any set of files to a new location in the depot by allowing changes made to one set of files to be copied, or integrated, to the other. The new file set (or codeline) evolves separately from the original files, but changes in either codeline can be propagated to the other by means of integration. Almost all of the version control systems support some form of branching. &lt;br /&gt;
&lt;br /&gt;
　　Merging is actually only one of three possible outcomes of an integration. The others are ignoring (aka &amp;quot;blocking&amp;quot;) and copying (aka &amp;quot;promoting&amp;quot;). Merging is used to keep one set of files up to date with another. For example, a development branch may be kept up to date with its trunk through repeated merging. Ignoring disqualifies changes in one set of files from future integration into another. It is often used when a development branch must be up to date with, and yet divergent from, its trunk. Copying is typically used to promote the content of an up-to-date development branch into a trunk.&lt;br /&gt;
&lt;br /&gt;
'''Some other tools in this category are given below'''&lt;br /&gt;
&lt;br /&gt;
==== AccuRev ====&lt;br /&gt;
[http://www.accurev.com/ AccuRev] is a centralized version control system which uses a client/server model. Communication is performed via TCP/IP using a proprietary protocol. Servers function as team servers, continuous integration servers, or build servers. AccuRev is built around a stream-based architecture in which streams form a hierarchical structure of code changes where parent streams pass on certain properties to child streams. Developers make changes using command line functions, the Java GUI, the web interface, or one of the IDE plug-ins.&lt;br /&gt;
&lt;br /&gt;
Characteristics:&lt;br /&gt;
&lt;br /&gt;
• Streams and parallel development&lt;br /&gt;
&lt;br /&gt;
• Private developer history&lt;br /&gt;
&lt;br /&gt;
• Change packages&lt;br /&gt;
&lt;br /&gt;
• Distributed development&lt;br /&gt;
&lt;br /&gt;
• Automated merging&lt;br /&gt;
&lt;br /&gt;
==== IBM Rational ClearCase ====&lt;br /&gt;
[http://www-03.ibm.com/software/products/us/en/clearcase/ The Rational ClearCase] family consists of several software tools for supporting software configuration management (SCM) of source code and other software development assets. It is developed by the Rational Software division of IBM. ClearCase forms the base for configuration management for many large and medium sized businesses and can handle projects with hundreds or thousands of developers.&lt;br /&gt;
A part of Rational ClearCase is revision control system, which is a feature for end users.&lt;br /&gt;
&lt;br /&gt;
ClearCase supports two kinds of use models, UCM (Unified Change Management), and base ClearCase. UCM provides an out-of-the-box model while base ClearCase provides a basic infrastructure (upon which UCM is built). Both can be configured to support a wide variety of needs. UCM is part of RUP (Rational Unified Process) and therefore all process templates and roles can be used from RUP.&lt;br /&gt;
&lt;br /&gt;
'''Features:'''&lt;br /&gt;
&lt;br /&gt;
• Build auditing&lt;br /&gt;
&lt;br /&gt;
• VOB (Versioned Object Base)&lt;br /&gt;
&lt;br /&gt;
• Configuration Record&lt;br /&gt;
&lt;br /&gt;
• Build Avoidance&lt;br /&gt;
&lt;br /&gt;
• Unix/Windows Interoperability&lt;br /&gt;
&lt;br /&gt;
• Integration With Other Products&lt;br /&gt;
&lt;br /&gt;
• Space Saving&lt;br /&gt;
&lt;br /&gt;
'''Weaknesses:'''&lt;br /&gt;
&lt;br /&gt;
• Speed&lt;br /&gt;
&lt;br /&gt;
• Sensitivity to network problems&lt;br /&gt;
&lt;br /&gt;
=== Local Data Model ===&lt;br /&gt;
In the local-only approach, all developers must use the same computer system. These software often manage single files individually and are largely replaced or embedded within newer software. This data model is the grandfather of all the modern version control softwares. These are the very first softwares for version control that were implemented in the late 1970's. Technological and software advances have rendered these practically useless but certain legacy systems still use these due to the hardware and software limitations.&lt;br /&gt;
&lt;br /&gt;
==== Source Code Control System (SCCS) ====&lt;br /&gt;
　　Source Code Control System (SCCS) is an early revision control system, geared toward program source code and other text files. It was originally developed in SNOBOL at Bell Labs in 1972 by Marc Rochkind for an IBM System/370 computer running OS/360 MVT. SCCS was the dominant version control system for Unix until the release of the Revision Control System (RCS)[dubious – discuss]. Today, SCCS is generally considered obsolete. However, its file format is still used internally by a few other revision control programs, including BitKeeper and TeamWare. The latter is a frontend to SCCS. Sablime has been developed from a modified version of SCCS but uses a history file format that is incompatible with SCCS. The SCCS file format uses a storage technique called interleaved deltas (or the weave). This storage technique is now considered by many revision control system developers as foundational to advanced merging and versioning techniques, such as the &amp;quot;Precise Codeville&amp;quot; (&amp;quot;pcdv&amp;quot;) merge.&lt;br /&gt;
　　&lt;br /&gt;
==== Revision Control System (RCS) ====&lt;br /&gt;
The Revision Control System (RCS) is a software implementation of revision control that automates the storing, retrieval, logging, identification, and merging of revisions. RCS is useful for text that is revised frequently, for example programs, documentation, procedural graphics, papers, and form letters. RCS is also capable of handling binary files, though with reduced efficiency. Revisions are stored with the aid of the diff utility.&lt;br /&gt;
&lt;br /&gt;
This came into existency in 1982 and gave the version control systems a new dimension. It was the best VCS for the single user system, where all the files related to a project are in a single system. RCS just locks a single file that is being used and doesn't lock the entire project which is computationally cheaper.&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://www.oss-watch.ac.uk/resources/versioncontrol Version Control Tools]&lt;br /&gt;
&lt;br /&gt;
2. [http://www.mediamosa.org/content/source-code DVS]&lt;br /&gt;
&lt;br /&gt;
3. [http://blogs.atlassian.com/2012/02/version-control-centralized-dvcs/ Distributed Version Control]&lt;br /&gt;
&lt;br /&gt;
4. [http://git-scm.com/ Git]&lt;br /&gt;
&lt;br /&gt;
5. [http://gitready.com/beginner/2009/02/17/how-git-stores-your-data.html GitReady]&lt;br /&gt;
&lt;br /&gt;
6. [https://wiki.archlinux.org/index.php/Git‎ Archlinux] &lt;br /&gt;
&lt;br /&gt;
7. [http://stackoverflow.com/questions/8198105/how-git-stores-files StackOverflow]&lt;br /&gt;
&lt;br /&gt;
8. [http://en.wikipedia.org Wikipedia]&lt;br /&gt;
&lt;br /&gt;
9. [http://www.perforce.com/perforce/doc.current/manuals/p4v-gs/p4v-gs.pdf Perforce documentation and manuals ‎]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w01_aj&amp;diff=79447</id>
		<title>CSC/ECE 517 Fall 2013/ch1 1w01 aj</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013/ch1_1w01_aj&amp;diff=79447"/>
		<updated>2013-10-06T15:47:42Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Behavior-driven development in Ruby on Rails ==&lt;br /&gt;
&lt;br /&gt;
Behavior-driven development (also known as BDD) is an agile development strategy that has been derived from Test Driven Development. It was developed by Dan North in order to address the problems faced by TDD. BDD approach focuses on design, documentation and behavior rather than on tests. This approach enables more interactions between the client and the developer. &lt;br /&gt;
The client specifies his functional specifications to the developer by writing user stories which describe how the system should perform when a certain condition is met. These user stories are then translated into tests using tools like RSpec and Cucumber. These tests are then run to check whether they satisfy the desired functional behavior. The business requirement is delivered when all the tests pass.&lt;br /&gt;
&lt;br /&gt;
== Difference from other development strategies ==&lt;br /&gt;
=== Test-driven development (TDD) ===&lt;br /&gt;
Another type of Test Driven Development is Behavior-driven development (also known as             TDD). In TDD, software developers write automated test cases before they write any code.&lt;br /&gt;
:: •	The first step of TDD is to write a failing test for a particular unit of functionality to be added. &lt;br /&gt;
&lt;br /&gt;
:: •	The next step is to write a piece of code only to pass that failing test.&lt;br /&gt;
&lt;br /&gt;
:: •	The last step would be to refactor the code so that it meets the requirement standards of the code.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Test Driven Development follows three rules. They are:&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any production code unless it is to make a failing unit test pass.&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more of a unit test than is sufficient to fail&lt;br /&gt;
&lt;br /&gt;
:: •	One must not write any more production code than is sufficient to pass the one failing unit test.&lt;br /&gt;
&lt;br /&gt;
=== Difference between TDD and BDD ===&lt;br /&gt;
:: •	TDD’s main focus is on the tests while BDD mainly focuses on the behavioral specification from the user point of view. &lt;br /&gt;
&lt;br /&gt;
:: •	With TDD, unit tests are written, whereas for BDD tests are written using “User Stories”.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD uses language which is intelligible to only the software programmers.&lt;br /&gt;
&lt;br /&gt;
BDD uses language which is more easily understood by technical as well as non technical people.&lt;br /&gt;
&lt;br /&gt;
== Advantages of BDD ==&lt;br /&gt;
:: •	Due to BDD language being comprehensible by  both technical as well as domain experts, the BDD involves the customers and the business partners in writing the scenarios for the tests.&lt;br /&gt;
&lt;br /&gt;
:: •	Unlike tests which come after implementation, focusing on the behavior proves to be a better approach.&lt;br /&gt;
&lt;br /&gt;
:: •	TDD methodology can lead to a number of failed tests before arriving at the correct result because it focuses mainly on implementation. But BDD does not require so many tests as its main focus is behavior thus resulting in less code.&lt;br /&gt;
&lt;br /&gt;
== Disadvantages of BDD ==&lt;br /&gt;
:: •	The user stories written by the customers might not be good quality and may have to be rewritten by the developer.&lt;br /&gt;
&lt;br /&gt;
:: •	The customer might not have enough time to review the scenarios on a regular basis.&lt;br /&gt;
&lt;br /&gt;
== Examples of BDD with Ruby on Rails ==&lt;br /&gt;
In BDD, business requirements are identified by user stories. The user stories are described using the following format&lt;br /&gt;
&lt;br /&gt;
:: As a [role], I can [feature] so that [reason]&lt;br /&gt;
&lt;br /&gt;
Example to explain this-&lt;br /&gt;
&lt;br /&gt;
:: As a Bank account holder, I can login with my credentials so that I can check my account details&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Once the user stories are written, the acceptance tests can be written for the user stories. The acceptance tests have the following format&lt;br /&gt;
&lt;br /&gt;
:: Given [Context]&lt;br /&gt;
&lt;br /&gt;
:: When [Event Occurs]&lt;br /&gt;
&lt;br /&gt;
:: Then  [Outcome]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Scenario: Enter a  Login Page&lt;br /&gt;
&lt;br /&gt;
:: Given I enter a valid username &lt;br /&gt;
&lt;br /&gt;
:: And I enter a valid password&lt;br /&gt;
&lt;br /&gt;
:: When I press the Login Button&lt;br /&gt;
&lt;br /&gt;
:: Then I should be redirected to the home page&lt;br /&gt;
&lt;br /&gt;
These acceptance tests for the user stories are entered in the application as automated tests by the developer. &lt;br /&gt;
&lt;br /&gt;
== Implementation ==&lt;br /&gt;
Ruby on Rails uses various tools like Cucumber, Rspec etc to implement the user tests.&lt;br /&gt;
&lt;br /&gt;
=== Cucumber ===&lt;br /&gt;
BDD makes the use of Cucumber for running automated acceptance tests. Cucumber specifies what  a user should see and be able to do. Cucumber works with Ruby to help the software development teams describe how an application should behave. Cucumber is intelligible to both software developers as well as domain experts. It can serve both as documentation and automated tests.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== RSpec ===&lt;br /&gt;
RSpec mainly deals with unit tests which mean testing a class method in isolation from the rest of the application. So it guarantees that the model does what it is supposed to do, the controller does what it is supposed to do, etc.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
1. [http://en.wikipedia.org/wiki/Behavior-driven_development Behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
2. [http://butunclebob.com/ArticleS.UncleBob.TheThreeRulesOfTdd Rules of Test-driven development]&lt;br /&gt;
&lt;br /&gt;
3. [http://bob-roberts.net/2012/02/17/608/ Using Rspec and Capybara]&lt;br /&gt;
&lt;br /&gt;
4. [http://stackoverflow.com/questions/2509/what-are-the-primary-differences-between-tdd-and-bdd Difference between TDD and BDD]&lt;br /&gt;
&lt;br /&gt;
5. [http://www.slideshare.net/IosifItkin/behavior-driven-development-pros-and-cons Benefits of behavior-driven development]&lt;br /&gt;
&lt;br /&gt;
6. [http://rorataspire.wordpress.com/2008/06/16/behaviour-driven-development-have-a-definite-edge-in-the-outsourced-software-development/ Lifecycle]&lt;br /&gt;
&lt;br /&gt;
7. [http://en.wikipedia.org/wiki/Test-driven_development Test-driven development]&lt;br /&gt;
&lt;br /&gt;
8. [http://www.ryangreenhall.com/articles/bdd-by-example.html Examples of BDD]&lt;br /&gt;
&lt;br /&gt;
9. [http://cukes.info/ Cucumber info]&lt;br /&gt;
&lt;br /&gt;
10. [http://en.wikipedia.org/wiki/Cucumber_(software) Cucumber]&lt;br /&gt;
&lt;br /&gt;
11. [http://www.slideshare.net/MarkMenard/behavior-driven-development-with-rails Behavior driven development with Rails]&lt;br /&gt;
&lt;br /&gt;
12. [http://codesqueeze.com/the-easy-way-to-writing-good-user-stories/ Writing user stories]&lt;br /&gt;
&lt;br /&gt;
13. [http://stackoverflow.com/questions/11762245/whats-the-difference-between-rspec-and-cucumber]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013&amp;diff=79446</id>
		<title>CSC/ECE 517 Fall 2013</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2013&amp;diff=79446"/>
		<updated>2013-10-06T15:06:12Z</updated>

		<summary type="html">&lt;p&gt;Agoel2: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;* [[ CSC/ECE 517 Fall 2012/ch1 1w23 ph ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w30 nn]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w21 w]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w01 aj]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w24 nv]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w29 rkld]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w25 aras]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w30 ps]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w19 rj]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w18 bs]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w17 pk]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w22 ss]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w12 vn]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w14 st]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w08 cc]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w10 ga ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w26 as ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w27 ma ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w13 aa ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w11 sv ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w07 d ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w20 gq ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w03 ss ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w28 nm ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w02 pp ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1  1w6 zs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1  1w04 y ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w05 st ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w09 hs ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w32 av ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w48 x ]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w43 av]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w46 ka]]&lt;br /&gt;
* [[ CSC/ECE 517 Fall 2013/ch1 1w33 aa]]&lt;/div&gt;</summary>
		<author><name>Agoel2</name></author>
	</entry>
</feed>