<?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=Tinydancer</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=Tinydancer"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Tinydancer"/>
	<updated>2026-06-10T13:18:29Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.0</generator>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29779</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29779"/>
		<updated>2009-11-19T20:16:37Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* CRC Cards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
CRC (Class-Responsibility-Collaborator) Card Modeling was first introduced by Kent Beck and Ward Cunningham. It is a simple yet powerful object-oriented analysis technique where users, analysts, and developers can work together in a modeling and design process.&lt;br /&gt;
&lt;br /&gt;
CRC Cards are usually created from index cards which contain the following information:&lt;br /&gt;
* Class name - the name of the class&lt;br /&gt;
* Responsibilities - anything that the class knows or does&lt;br /&gt;
* Collaborators - names of other classes with which the class will collaborate to fulfill its responsibilities&lt;br /&gt;
&lt;br /&gt;
The size of the index card forces the designers or participants to limit the class from having too many responsibilities or collaborations with other classes.  The designers should consider breaking a class that has too many responsibilities into multiple classes.  Class that has too many collaborations with other classes will create high coupling, which does not adhere with the object oriented methodology.&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Alternatives to CRC Cards =&lt;br /&gt;
== Unified Modeling Language (UML) ==&lt;br /&gt;
&lt;br /&gt;
UML is a visual language for specifying, constructing, and documenting the artifacts of systems. &lt;br /&gt;
&lt;br /&gt;
Advantages of UML Diagram compared to CRC cards:&lt;br /&gt;
# You can use UML with all processes, throughout the development lifecycle, and across different implementation technologies.&lt;br /&gt;
# You can easily visualize the relationship between classes or objects.&lt;br /&gt;
# The complete structure of the system can be captured in one UML diagram, instead of several CRC cards.&lt;br /&gt;
&lt;br /&gt;
== OMT ==&lt;br /&gt;
The Object Modeling technique combines three views of a system and hence three models are used for representing the views.&lt;br /&gt;
 &lt;br /&gt;
# Object Model – describes the static structure of the objects and their relationships in the system. This represents the concepts like attribute, operation, inheritance, association, aggregation etc.&lt;br /&gt;
# Dynamic Model – describes the aspects of the system that changes over time. This model explains the concepts like states, event, activity, etc.&lt;br /&gt;
# Functional Model – describes the data value transformations in a system. This model explains the concepts like process, data flow, and control flow, actor, etc.&lt;br /&gt;
&lt;br /&gt;
During the analysis phase of the design, all these models are developed and delivered. Object Model Diagram provides a formal graphic notation for modeling objects, classes and their relationships with one another. State diagrams and Event flow diagrams will represent the dynamic model of the system. Data flow diagram represents the data transformation within the system due to the events or actions of the actors.&lt;br /&gt;
OMT differs from CRCs in the way the system is viewed. Apart from viewing the systems as classes and responsibilities, OMT provides a richer way to view and design the system using the 3 models as described above.&lt;br /&gt;
&lt;br /&gt;
== Booch Method of OOAD ==&lt;br /&gt;
&lt;br /&gt;
Booch Method is a process and notation for developing and communicating the design of an object-oriented software system. Booch method contains proven heuristics for developing quality software that provides effective design and support for development of future systems.&lt;br /&gt;
Booch method is a broad methodology that addresses OOAD using object modeling, analysis modeling, application design, implementation design etc.&lt;br /&gt;
&lt;br /&gt;
Booch method uses following types of diagrams to describe the design decisions that must be made when creating an Object-Oriented system.&lt;br /&gt;
&lt;br /&gt;
Class Diagrams: Represents set of classes and class relationships&lt;br /&gt;
&lt;br /&gt;
Class Specification is used to capture all the information about a class in text format. A class specification contains set of fields that define a class&lt;br /&gt;
&lt;br /&gt;
Category Diagrams are used to group logically related classes in to meaningful collection. &lt;br /&gt;
&lt;br /&gt;
State Transition Diagrams represents the dynamic behavior associated of the classes in the system&lt;br /&gt;
&lt;br /&gt;
Object Diagrams show the existence of objects and their relationships in the logical model of the system. &lt;br /&gt;
&lt;br /&gt;
Timing Diagram is a graph that augments an on object diagram to capture information about external events and timing of operations in the object diagram&lt;br /&gt;
&lt;br /&gt;
Module Diagram is used to show the allocation of classes and objects to module in the physical design of the system.&lt;br /&gt;
&lt;br /&gt;
Process Diagrams represents various process flows and their allocation to processors of the system&lt;br /&gt;
&lt;br /&gt;
Subsystems represent the clusters of logically related modules&lt;br /&gt;
&lt;br /&gt;
The analysis and design steps in Booch method will result in class diagrams, class specifications, object specifications, inheritance views, class category diagrams, architectural descriptions.&lt;br /&gt;
&lt;br /&gt;
== Coad, Yourdon and Nicola OOAD ==&lt;br /&gt;
&lt;br /&gt;
In Coad, Yourdon and Nicola method, OOA works with problem domain classes and objects and OOD focuses on human interaction, task management, and data management classes and objects. In this method, each class and its objects fit into one of the four components: human interaction component, problem domain component, task management component, data management component. They differ from traditional CRCs in a way that the approach revolves around the principles of managing complexity. Three most important principles to manage complexity are:&lt;br /&gt;
&lt;br /&gt;
1. Pervading methods of organization – This is similar to how real world people organize the objects via differentiating objects based on attributes, forming a class of objects based on the features.&lt;br /&gt;
&lt;br /&gt;
2. Categories of behavior – This concept is the basis for identifying the actions of an object&lt;br /&gt;
&lt;br /&gt;
3. Personification – This gives a human characteristic to inanimate objects &lt;br /&gt;
&lt;br /&gt;
== FUSION ==&lt;br /&gt;
&lt;br /&gt;
Fusion method was developed by Object Oriented Design Group at Hewlett-Packard Laboratories, Bristol. The method builds on existing Booch, OMT, CRC and provides a direct route from requirements definition through to a programming language implementation. &lt;br /&gt;
The analysis phase of this method provides a declarative description of system behavior. The Object model describes the static structure of the objects in the problem domain and their interrelation. The Interface model describes the interface of a system and how the system interacts with the environment.&lt;br /&gt;
&lt;br /&gt;
The design stage realizes the system behavior using various outputs as given below.&lt;br /&gt;
&lt;br /&gt;
1. Object Interaction Graph and visibility graph shows how objects interact with each other to complete an operation that is defined in the interface model. Algorithms, classes and their attributes, method signatures are specified accompanying each object interaction graph. Visibility graph complements the Object Interaction graph as it shows how the references among various objects are implemented.&lt;br /&gt;
&lt;br /&gt;
2. Class description captures the class interfaces, attributes, object reference attributes and method signatures&lt;br /&gt;
&lt;br /&gt;
3. Inheritance Graphs are specified to capture the relationships between the objects that are working together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
* Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
* [http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4 Object Think: A Perspective on Objects by Mike Abney]&lt;br /&gt;
&lt;br /&gt;
* [http://net.educause.edu/ir/library/text/c95/c95-ps04.txt &amp;quot;OBJECT THINK&amp;quot; A Step toward Object Oriented Implementation]&lt;br /&gt;
&lt;br /&gt;
* [http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think Object Think]&lt;br /&gt;
&lt;br /&gt;
* Designing Object Oriented Software by Wirfs-Brock et al.&lt;br /&gt;
&lt;br /&gt;
* Object Analysis and Design : Description of Methods by Andrew T.F. Hutt&lt;br /&gt;
&lt;br /&gt;
* [http://students.cs.byu.edu/~pbiggs/survey.html A Survey of Object-Oriented Methods by Peter Biggs]&lt;br /&gt;
&lt;br /&gt;
* [http://www.softstar-inc.com/Download/Intro%20to%20CRC.pdf Introduction to CRC Cards by David M. Rubin]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29778</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29778"/>
		<updated>2009-11-19T20:05:55Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
CRC (Class-Responsibility-Collaborator) Card Modeling was first introduced by Kent Beck and Ward Cunningham. It is a simple yet powerful object-oriented analysis technique where users, analysts, and developers can work together in a modeling and design process.&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Alternatives to CRC Cards =&lt;br /&gt;
== Unified Modeling Language (UML) ==&lt;br /&gt;
&lt;br /&gt;
UML is a visual language for specifying, constructing, and documenting the artifacts of systems. &lt;br /&gt;
&lt;br /&gt;
Advantages of UML Diagram compared to CRC cards:&lt;br /&gt;
# You can use UML with all processes, throughout the development lifecycle, and across different implementation technologies.&lt;br /&gt;
# You can easily visualize the relationship between classes or objects.&lt;br /&gt;
# The complete structure of the system can be captured in one UML diagram, instead of several CRC cards.&lt;br /&gt;
&lt;br /&gt;
== OMT ==&lt;br /&gt;
The Object Modeling technique combines three views of a system and hence three models are used for representing the views.&lt;br /&gt;
 &lt;br /&gt;
# Object Model – describes the static structure of the objects and their relationships in the system. This represents the concepts like attribute, operation, inheritance, association, aggregation etc.&lt;br /&gt;
# Dynamic Model – describes the aspects of the system that changes over time. This model explains the concepts like states, event, activity, etc.&lt;br /&gt;
# Functional Model – describes the data value transformations in a system. This model explains the concepts like process, data flow, and control flow, actor, etc.&lt;br /&gt;
&lt;br /&gt;
During the analysis phase of the design, all these models are developed and delivered. Object Model Diagram provides a formal graphic notation for modeling objects, classes and their relationships with one another. State diagrams and Event flow diagrams will represent the dynamic model of the system. Data flow diagram represents the data transformation within the system due to the events or actions of the actors.&lt;br /&gt;
OMT differs from CRCs in the way the system is viewed. Apart from viewing the systems as classes and responsibilities, OMT provides a richer way to view and design the system using the 3 models as described above.&lt;br /&gt;
&lt;br /&gt;
== Booch Method of OOAD ==&lt;br /&gt;
&lt;br /&gt;
Booch Method is a process and notation for developing and communicating the design of an object-oriented software system. Booch method contains proven heuristics for developing quality software that provides effective design and support for development of future systems.&lt;br /&gt;
Booch method is a broad methodology that addresses OOAD using object modeling, analysis modeling, application design, implementation design etc.&lt;br /&gt;
&lt;br /&gt;
Booch method uses following types of diagrams to describe the design decisions that must be made when creating an Object-Oriented system.&lt;br /&gt;
&lt;br /&gt;
Class Diagrams: Represents set of classes and class relationships&lt;br /&gt;
&lt;br /&gt;
Class Specification is used to capture all the information about a class in text format. A class specification contains set of fields that define a class&lt;br /&gt;
&lt;br /&gt;
Category Diagrams are used to group logically related classes in to meaningful collection. &lt;br /&gt;
&lt;br /&gt;
State Transition Diagrams represents the dynamic behavior associated of the classes in the system&lt;br /&gt;
&lt;br /&gt;
Object Diagrams show the existence of objects and their relationships in the logical model of the system. &lt;br /&gt;
&lt;br /&gt;
Timing Diagram is a graph that augments an on object diagram to capture information about external events and timing of operations in the object diagram&lt;br /&gt;
&lt;br /&gt;
Module Diagram is used to show the allocation of classes and objects to module in the physical design of the system.&lt;br /&gt;
&lt;br /&gt;
Process Diagrams represents various process flows and their allocation to processors of the system&lt;br /&gt;
&lt;br /&gt;
Subsystems represent the clusters of logically related modules&lt;br /&gt;
&lt;br /&gt;
The analysis and design steps in Booch method will result in class diagrams, class specifications, object specifications, inheritance views, class category diagrams, architectural descriptions.&lt;br /&gt;
&lt;br /&gt;
== Coad, Yourdon and Nicola OOAD ==&lt;br /&gt;
&lt;br /&gt;
In Coad, Yourdon and Nicola method, OOA works with problem domain classes and objects and OOD focuses on human interaction, task management, and data management classes and objects. In this method, each class and its objects fit into one of the four components: human interaction component, problem domain component, task management component, data management component. They differ from traditional CRCs in a way that the approach revolves around the principles of managing complexity. Three most important principles to manage complexity are:&lt;br /&gt;
&lt;br /&gt;
1. Pervading methods of organization – This is similar to how real world people organize the objects via differentiating objects based on attributes, forming a class of objects based on the features.&lt;br /&gt;
&lt;br /&gt;
2. Categories of behavior – This concept is the basis for identifying the actions of an object&lt;br /&gt;
&lt;br /&gt;
3. Personification – This gives a human characteristic to inanimate objects &lt;br /&gt;
&lt;br /&gt;
== FUSION ==&lt;br /&gt;
&lt;br /&gt;
Fusion method was developed by Object Oriented Design Group at Hewlett-Packard Laboratories, Bristol. The method builds on existing Booch, OMT, CRC and provides a direct route from requirements definition through to a programming language implementation. &lt;br /&gt;
The analysis phase of this method provides a declarative description of system behavior. The Object model describes the static structure of the objects in the problem domain and their interrelation. The Interface model describes the interface of a system and how the system interacts with the environment.&lt;br /&gt;
&lt;br /&gt;
The design stage realizes the system behavior using various outputs as given below.&lt;br /&gt;
&lt;br /&gt;
1. Object Interaction Graph and visibility graph shows how objects interact with each other to complete an operation that is defined in the interface model. Algorithms, classes and their attributes, method signatures are specified accompanying each object interaction graph. Visibility graph complements the Object Interaction graph as it shows how the references among various objects are implemented.&lt;br /&gt;
&lt;br /&gt;
2. Class description captures the class interfaces, attributes, object reference attributes and method signatures&lt;br /&gt;
&lt;br /&gt;
3. Inheritance Graphs are specified to capture the relationships between the objects that are working together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
* Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
* [http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4 Object Think: A Perspective on Objects by Mike Abney]&lt;br /&gt;
&lt;br /&gt;
* [http://net.educause.edu/ir/library/text/c95/c95-ps04.txt &amp;quot;OBJECT THINK&amp;quot; A Step toward Object Oriented Implementation]&lt;br /&gt;
&lt;br /&gt;
* [http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think Object Think]&lt;br /&gt;
&lt;br /&gt;
* Designing Object Oriented Software by Wirfs-Brock et al.&lt;br /&gt;
&lt;br /&gt;
* Object Analysis and Design : Description of Methods by Andrew T.F. Hutt&lt;br /&gt;
&lt;br /&gt;
* [http://students.cs.byu.edu/~pbiggs/survey.html A Survey of Object-Oriented Methods by Peter Biggs]&lt;br /&gt;
&lt;br /&gt;
* [http://www.softstar-inc.com/Download/Intro%20to%20CRC.pdf Introduction to CRC Cards by David M. Rubin]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29777</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29777"/>
		<updated>2009-11-19T20:05:17Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
CRC (Class-Responsibility-Collaborator) Card Modeling was first introduced by Kent Beck and Ward Cunningham. It is a simple yet powerful object-oriented analysis technique where users, analysts, and developers can work together in a modeling and design process.&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Alternatives to CRC Cards =&lt;br /&gt;
== Unified Modeling Language (UML) ==&lt;br /&gt;
&lt;br /&gt;
UML is a visual language for specifying, constructing, and documenting the artifacts of systems. &lt;br /&gt;
&lt;br /&gt;
Advantages of UML Diagram compared to CRC cards:&lt;br /&gt;
# You can use UML with all processes, throughout the development lifecycle, and across different implementation technologies.&lt;br /&gt;
# You can easily visualize the relationship between classes or objects.&lt;br /&gt;
# The complete structure of the system can be captured in one UML diagram, instead of several CRC cards.&lt;br /&gt;
&lt;br /&gt;
== OMT ==&lt;br /&gt;
The Object Modeling technique combines three views of a system and hence three models are used for representing the views.&lt;br /&gt;
 &lt;br /&gt;
# Object Model – describes the static structure of the objects and their relationships in the system. This represents the concepts like attribute, operation, inheritance, association, aggregation etc.&lt;br /&gt;
# Dynamic Model – describes the aspects of the system that changes over time. This model explains the concepts like states, event, activity, etc.&lt;br /&gt;
# Functional Model – describes the data value transformations in a system. This model explains the concepts like process, data flow, and control flow, actor, etc.&lt;br /&gt;
&lt;br /&gt;
During the analysis phase of the design, all these models are developed and delivered. Object Model Diagram provides a formal graphic notation for modeling objects, classes and their relationships with one another. State diagrams and Event flow diagrams will represent the dynamic model of the system. Data flow diagram represents the data transformation within the system due to the events or actions of the actors.&lt;br /&gt;
OMT differs from CRCs in the way the system is viewed. Apart from viewing the systems as classes and responsibilities, OMT provides a richer way to view and design the system using the 3 models as described above.&lt;br /&gt;
&lt;br /&gt;
== Booch Method of OOAD ==&lt;br /&gt;
&lt;br /&gt;
Booch Method is a process and notation for developing and communicating the design of an object-oriented software system. Booch method contains proven heuristics for developing quality software that provides effective design and support for development of future systems.&lt;br /&gt;
Booch method is a broad methodology that addresses OOAD using object modeling, analysis modeling, application design, implementation design etc.&lt;br /&gt;
&lt;br /&gt;
Booch method uses following types of diagrams to describe the design decisions that must be made when creating an Object-Oriented system.&lt;br /&gt;
&lt;br /&gt;
Class Diagrams: Represents set of classes and class relationships&lt;br /&gt;
&lt;br /&gt;
Class Specification is used to capture all the information about a class in text format. A class specification contains set of fields that define a class&lt;br /&gt;
&lt;br /&gt;
Category Diagrams are used to group logically related classes in to meaningful collection. &lt;br /&gt;
&lt;br /&gt;
State Transition Diagrams represents the dynamic behavior associated of the classes in the system&lt;br /&gt;
&lt;br /&gt;
Object Diagrams show the existence of objects and their relationships in the logical model of the system. &lt;br /&gt;
&lt;br /&gt;
Timing Diagram is a graph that augments an on object diagram to capture information about external events and timing of operations in the object diagram&lt;br /&gt;
&lt;br /&gt;
Module Diagram is used to show the allocation of classes and objects to module in the physical design of the system.&lt;br /&gt;
&lt;br /&gt;
Process Diagrams represents various process flows and their allocation to processors of the system&lt;br /&gt;
&lt;br /&gt;
Subsystems represent the clusters of logically related modules&lt;br /&gt;
&lt;br /&gt;
The analysis and design steps in Booch method will result in class diagrams, class specifications, object specifications, inheritance views, class category diagrams, architectural descriptions.&lt;br /&gt;
&lt;br /&gt;
== Coad, Yourdon and Nicola OOAD ==&lt;br /&gt;
&lt;br /&gt;
In Coad, Yourdon and Nicola method, OOA works with problem domain classes and objects and OOD focuses on human interaction, task management, and data management classes and objects. In this method, each class and its objects fit into one of the four components: human interaction component, problem domain component, task management component, data management component. They differ from traditional CRCs in a way that the approach revolves around the principles of managing complexity. Three most important principles to manage complexity are:&lt;br /&gt;
&lt;br /&gt;
1. Pervading methods of organization – This is similar to how real world people organize the objects via differentiating objects based on attributes, forming a class of objects based on the features.&lt;br /&gt;
&lt;br /&gt;
2. Categories of behavior – This concept is the basis for identifying the actions of an object&lt;br /&gt;
&lt;br /&gt;
3. Personification – This gives a human characteristic to inanimate objects &lt;br /&gt;
&lt;br /&gt;
== FUSION ==&lt;br /&gt;
&lt;br /&gt;
Fusion method was developed by Object Oriented Design Group at Hewlett-Packard Laboratories, Bristol. The method builds on existing Booch, OMT, CRC and provides a direct route from requirements definition through to a programming language implementation. &lt;br /&gt;
The analysis phase of this method provides a declarative description of system behavior. The Object model describes the static structure of the objects in the problem domain and their interrelation. The Interface model describes the interface of a system and how the system interacts with the environment.&lt;br /&gt;
&lt;br /&gt;
The design stage realizes the system behavior using various outputs as given below.&lt;br /&gt;
&lt;br /&gt;
1. Object Interaction Graph and visibility graph shows how objects interact with each other to complete an operation that is defined in the interface model. Algorithms, classes and their attributes, method signatures are specified accompanying each object interaction graph. Visibility graph complements the Object Interaction graph as it shows how the references among various objects are implemented.&lt;br /&gt;
&lt;br /&gt;
2. Class description captures the class interfaces, attributes, object reference attributes and method signatures&lt;br /&gt;
&lt;br /&gt;
3. Inheritance Graphs are specified to capture the relationships between the objects that are working together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
* Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
* [http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4 Object Think: A Perspective on Objects by Mike Abney]&lt;br /&gt;
&lt;br /&gt;
* [http://net.educause.edu/ir/library/text/c95/c95-ps04.txt &amp;quot;OBJECT THINK&amp;quot; A Step toward Object Oriented Implementation]&lt;br /&gt;
&lt;br /&gt;
* [http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think Object Think]&lt;br /&gt;
&lt;br /&gt;
* Designing Object Oriented Software by Wirfs-Brock et al.&lt;br /&gt;
&lt;br /&gt;
* Object Analysis and Design : Description of Methods by Andrew T.F. Hutt&lt;br /&gt;
&lt;br /&gt;
* [http://students.cs.byu.edu/~pbiggs/survey.html A Survey of Object-Oriented Methods by Peter Biggs]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29776</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29776"/>
		<updated>2009-11-19T20:04:44Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* CRC Cards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
CRC (Class-Responsibility-Collaborator) Card Modeling was first introduced by Kent Beck and Ward Cunningham. It is a simple yet powerful object-oriented analysis technique where users, analysts, and developers can work together in a modeling and design process.&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Alternatives to CRC Cards =&lt;br /&gt;
== Unified Modeling Language (UML) ==&lt;br /&gt;
&lt;br /&gt;
UML is a visual language for specifying, constructing, and documenting the artifacts of systems. &lt;br /&gt;
&lt;br /&gt;
Advantages of UML Diagram compared to CRC cards:&lt;br /&gt;
# You can use UML with all processes, throughout the development lifecycle, and across different implementation technologies.&lt;br /&gt;
# You can easily visualize the relationship between classes or objects.&lt;br /&gt;
# The complete structure of the system can be captured in one UML diagram, instead of several CRC cards.&lt;br /&gt;
&lt;br /&gt;
== OMT ==&lt;br /&gt;
The Object Modeling technique combines three views of a system and hence three models are used for representing the views.&lt;br /&gt;
 &lt;br /&gt;
# Object Model – describes the static structure of the objects and their relationships in the system. This represents the concepts like attribute, operation, inheritance, association, aggregation etc.&lt;br /&gt;
# Dynamic Model – describes the aspects of the system that changes over time. This model explains the concepts like states, event, activity, etc.&lt;br /&gt;
# Functional Model – describes the data value transformations in a system. This model explains the concepts like process, data flow, and control flow, actor, etc.&lt;br /&gt;
&lt;br /&gt;
During the analysis phase of the design, all these models are developed and delivered. Object Model Diagram provides a formal graphic notation for modeling objects, classes and their relationships with one another. State diagrams and Event flow diagrams will represent the dynamic model of the system. Data flow diagram represents the data transformation within the system due to the events or actions of the actors.&lt;br /&gt;
OMT differs from CRCs in the way the system is viewed. Apart from viewing the systems as classes and responsibilities, OMT provides a richer way to view and design the system using the 3 models as described above.&lt;br /&gt;
&lt;br /&gt;
== Booch Method of OOAD ==&lt;br /&gt;
&lt;br /&gt;
Booch Method is a process and notation for developing and communicating the design of an object-oriented software system. Booch method contains proven heuristics for developing quality software that provides effective design and support for development of future systems.&lt;br /&gt;
Booch method is a broad methodology that addresses OOAD using object modeling, analysis modeling, application design, implementation design etc.&lt;br /&gt;
&lt;br /&gt;
Booch method uses following types of diagrams to describe the design decisions that must be made when creating an Object-Oriented system.&lt;br /&gt;
&lt;br /&gt;
Class Diagrams: Represents set of classes and class relationships&lt;br /&gt;
&lt;br /&gt;
Class Specification is used to capture all the information about a class in text format. A class specification contains set of fields that define a class&lt;br /&gt;
&lt;br /&gt;
Category Diagrams are used to group logically related classes in to meaningful collection. &lt;br /&gt;
&lt;br /&gt;
State Transition Diagrams represents the dynamic behavior associated of the classes in the system&lt;br /&gt;
&lt;br /&gt;
Object Diagrams show the existence of objects and their relationships in the logical model of the system. &lt;br /&gt;
&lt;br /&gt;
Timing Diagram is a graph that augments an on object diagram to capture information about external events and timing of operations in the object diagram&lt;br /&gt;
&lt;br /&gt;
Module Diagram is used to show the allocation of classes and objects to module in the physical design of the system.&lt;br /&gt;
&lt;br /&gt;
Process Diagrams represents various process flows and their allocation to processors of the system&lt;br /&gt;
&lt;br /&gt;
Subsystems represent the clusters of logically related modules&lt;br /&gt;
&lt;br /&gt;
The analysis and design steps in Booch method will result in class diagrams, class specifications, object specifications, inheritance views, class category diagrams, architectural descriptions.&lt;br /&gt;
&lt;br /&gt;
== Coad, Yourdon and Nicola OOAD ==&lt;br /&gt;
&lt;br /&gt;
In Coad, Yourdon and Nicola method, OOA works with problem domain classes and objects and OOD focuses on human interaction, task management, and data management classes and objects. In this method, each class and its objects fit into one of the four components: human interaction component, problem domain component, task management component, data management component. They differ from traditional CRCs in a way that the approach revolves around the principles of managing complexity. Three most important principles to manage complexity are:&lt;br /&gt;
&lt;br /&gt;
1. Pervading methods of organization – This is similar to how real world people organize the objects via differentiating objects based on attributes, forming a class of objects based on the features.&lt;br /&gt;
&lt;br /&gt;
2. Categories of behavior – This concept is the basis for identifying the actions of an object&lt;br /&gt;
&lt;br /&gt;
3. Personification – This gives a human characteristic to inanimate objects &lt;br /&gt;
&lt;br /&gt;
== FUSION ==&lt;br /&gt;
&lt;br /&gt;
Fusion method was developed by Object Oriented Design Group at Hewlett-Packard Laboratories, Bristol. The method builds on existing Booch, OMT, CRC and provides a direct route from requirements definition through to a programming language implementation. &lt;br /&gt;
The analysis phase of this method provides a declarative description of system behavior. The Object model describes the static structure of the objects in the problem domain and their interrelation. The Interface model describes the interface of a system and how the system interacts with the environment.&lt;br /&gt;
&lt;br /&gt;
The design stage realizes the system behavior using various outputs as given below.&lt;br /&gt;
&lt;br /&gt;
1. Object Interaction Graph and visibility graph shows how objects interact with each other to complete an operation that is defined in the interface model. Algorithms, classes and their attributes, method signatures are specified accompanying each object interaction graph. Visibility graph complements the Object Interaction graph as it shows how the references among various objects are implemented.&lt;br /&gt;
&lt;br /&gt;
2. Class description captures the class interfaces, attributes, object reference attributes and method signatures&lt;br /&gt;
&lt;br /&gt;
3. Inheritance Graphs are specified to capture the relationships between the objects that are working together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
[http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4 Object Think: A Perspective on Objects by Mike Abney]&lt;br /&gt;
&lt;br /&gt;
[http://net.educause.edu/ir/library/text/c95/c95-ps04.txt &amp;quot;OBJECT THINK&amp;quot; A Step toward Object Oriented Implementation]&lt;br /&gt;
&lt;br /&gt;
[http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think Object Think]&lt;br /&gt;
&lt;br /&gt;
Designing Object Oriented Software by Wirfs-Brock et al.&lt;br /&gt;
&lt;br /&gt;
Object Analysis and Design : Description of Methods by Andrew T.F. Hutt&lt;br /&gt;
&lt;br /&gt;
[http://students.cs.byu.edu/~pbiggs/survey.html A Survey of Object-Oriented Methods by Peter Biggs]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29762</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29762"/>
		<updated>2009-11-19T19:27:31Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* OMT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Alternatives to CRC Cards =&lt;br /&gt;
== Unified Modeling Language (UML) ==&lt;br /&gt;
&lt;br /&gt;
UML is a visual language for specifying, constructing, and documenting the artifacts of systems. &lt;br /&gt;
&lt;br /&gt;
Advantages of UML Diagram compared to CRC cards:&lt;br /&gt;
# You can use UML with all processes, throughout the development lifecycle, and across different implementation technologies.&lt;br /&gt;
# You can easily visualize the relationship between classes or objects.&lt;br /&gt;
# The complete structure of the system can be captured in one UML diagram, instead of several CRC cards.&lt;br /&gt;
&lt;br /&gt;
== OMT ==&lt;br /&gt;
The Object Modeling technique combines three views of a system and hence three models are used for representing the views.&lt;br /&gt;
 &lt;br /&gt;
# Object Model – describes the static structure of the objects and their relationships in the system. This represents the concepts like attribute, operation, inheritance, association, aggregation etc.&lt;br /&gt;
# Dynamic Model – describes the aspects of the system that changes over time. This model explains the concepts like states, event, activity, etc.&lt;br /&gt;
# Functional Model – describes the data value transformations in a system. This model explains the concepts like process, data flow, and control flow, actor, etc.&lt;br /&gt;
&lt;br /&gt;
During the analysis phase of the design, all these models are developed and delivered. Object Model Diagram provides a formal graphic notation for modeling objects, classes and their relationships with one another. State diagrams and Event flow diagrams will represent the dynamic model of the system. Data flow diagram represents the data transformation within the system due to the events or actions of the actors.&lt;br /&gt;
OMT differs from CRCs in the way the system is viewed. Apart from viewing the systems as classes and responsibilities, OMT provides a richer way to view and design the system using the 3 models as described above.&lt;br /&gt;
&lt;br /&gt;
== Booch Method of OOAD ==&lt;br /&gt;
&lt;br /&gt;
Booch Method is a process and notation for developing and communicating the design of an object-oriented software system. Booch method contains proven heuristics for developing quality software that provides effective design and support for development of future systems.&lt;br /&gt;
Booch method is a broad methodology that addresses OOAD using object modeling, analysis modeling, application design, implementation design etc.&lt;br /&gt;
&lt;br /&gt;
Booch method uses following types of diagrams to describe the design decisions that must be made when creating an Object-Oriented system.&lt;br /&gt;
&lt;br /&gt;
Class Diagrams: Represents set of classes and class relationships&lt;br /&gt;
&lt;br /&gt;
Class Specification is used to capture all the information about a class in text format. A class specification contains set of fields that define a class&lt;br /&gt;
&lt;br /&gt;
Category Diagrams are used to group logically related classes in to meaningful collection. &lt;br /&gt;
&lt;br /&gt;
State Transition Diagrams represents the dynamic behavior associated of the classes in the system&lt;br /&gt;
&lt;br /&gt;
Object Diagrams show the existence of objects and their relationships in the logical model of the system. &lt;br /&gt;
&lt;br /&gt;
Timing Diagram is a graph that augments an on object diagram to capture information about external events and timing of operations in the object diagram&lt;br /&gt;
&lt;br /&gt;
Module Diagram is used to show the allocation of classes and objects to module in the physical design of the system.&lt;br /&gt;
&lt;br /&gt;
Process Diagrams represents various process flows and their allocation to processors of the system&lt;br /&gt;
&lt;br /&gt;
Subsystems represent the clusters of logically related modules&lt;br /&gt;
&lt;br /&gt;
The analysis and design steps in Booch method will result in class diagrams, class specifications, object specifications, inheritance views, class category diagrams, architectural descriptions.&lt;br /&gt;
&lt;br /&gt;
== Coad, Yourdon and Nicola OOAD ==&lt;br /&gt;
&lt;br /&gt;
In Coad, Yourdon and Nicola method, OOA works with problem domain classes and objects and OOD focuses on human interaction, task management, and data management classes and objects. In this method, each class and its objects fit into one of the four components: human interaction component, problem domain component, task management component, data management component. They differ from traditional CRCs in a way that the approach revolves around the principles of managing complexity. Three most important principles to manage complexity are:&lt;br /&gt;
&lt;br /&gt;
1. Pervading methods of organization – This is similar to how real world people organize the objects via differentiating objects based on attributes, forming a class of objects based on the features.&lt;br /&gt;
&lt;br /&gt;
2. Categories of behavior – This concept is the basis for identifying the actions of an object&lt;br /&gt;
&lt;br /&gt;
3. Personification – This gives a human characteristic to inanimate objects &lt;br /&gt;
&lt;br /&gt;
== FUSION ==&lt;br /&gt;
&lt;br /&gt;
Fusion method was developed by Object Oriented Design Group at Hewlett-Packard Laboratories, Bristol. The method builds on existing Booch, OMT, CRC and provides a direct route from requirements definition through to a programming language implementation. &lt;br /&gt;
The analysis phase of this method provides a declarative description of system behavior. The Object model describes the static structure of the objects in the problem domain and their interrelation. The Interface model describes the interface of a system and how the system interacts with the environment.&lt;br /&gt;
&lt;br /&gt;
The design stage realizes the system behavior using various outputs as given below.&lt;br /&gt;
&lt;br /&gt;
1. Object Interaction Graph and visibility graph shows how objects interact with each other to complete an operation that is defined in the interface model. Algorithms, classes and their attributes, method signatures are specified accompanying each object interaction graph. Visibility graph complements the Object Interaction graph as it shows how the references among various objects are implemented.&lt;br /&gt;
&lt;br /&gt;
2. Class description captures the class interfaces, attributes, object reference attributes and method signatures&lt;br /&gt;
&lt;br /&gt;
3. Inheritance Graphs are specified to capture the relationships between the objects that are working together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
[http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4 Object Think: A Perspective on Objects by Mike Abney]&lt;br /&gt;
&lt;br /&gt;
[http://net.educause.edu/ir/library/text/c95/c95-ps04.txt &amp;quot;OBJECT THINK&amp;quot; A Step toward Object Oriented Implementation]&lt;br /&gt;
&lt;br /&gt;
[http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think Object Think]&lt;br /&gt;
&lt;br /&gt;
Designing Object Oriented Software by Wirfs-Brock et al.&lt;br /&gt;
&lt;br /&gt;
Object Analysis and Design : Description of Methods by Andrew T.F. Hutt&lt;br /&gt;
&lt;br /&gt;
[http://students.cs.byu.edu/~pbiggs/survey.html A Survey of Object-Oriented Methods by Peter Biggs]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29761</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29761"/>
		<updated>2009-11-19T19:27:16Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* OMT */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Alternatives to CRC Cards =&lt;br /&gt;
== Unified Modeling Language (UML) ==&lt;br /&gt;
&lt;br /&gt;
UML is a visual language for specifying, constructing, and documenting the artifacts of systems. &lt;br /&gt;
&lt;br /&gt;
Advantages of UML Diagram compared to CRC cards:&lt;br /&gt;
# You can use UML with all processes, throughout the development lifecycle, and across different implementation technologies.&lt;br /&gt;
# You can easily visualize the relationship between classes or objects.&lt;br /&gt;
# The complete structure of the system can be captured in one UML diagram, instead of several CRC cards.&lt;br /&gt;
&lt;br /&gt;
== OMT ==&lt;br /&gt;
The Object Modeling technique combines three views of a system and hence three models are used for representing the views.&lt;br /&gt;
 &lt;br /&gt;
# Object Model – describes the static structure of the objects and their relationships in the system. This represents the concepts like attribute, operation, inheritance, association, aggregation etc.&lt;br /&gt;
&lt;br /&gt;
# Dynamic Model – describes the aspects of the system that changes over time. This model explains the concepts like states, event, activity etc&lt;br /&gt;
&lt;br /&gt;
# Functional Model – describes the data value transformations in a system. This model explains the concepts like process, data flow, and control flow, actor etc.&lt;br /&gt;
&lt;br /&gt;
During the analysis phase of the design, all these models are developed and delivered. Object Model Diagram provides a formal graphic notation for modeling objects, classes and their relationships with one another. State diagrams and Event flow diagrams will represent the dynamic model of the system. Data flow diagram represents the data transformation within the system due to the events or actions of the actors.&lt;br /&gt;
OMT differs from CRCs in the way the system is viewed. Apart from viewing the systems as classes and responsibilities, OMT provides a richer way to view and design the system using the 3 models as described above.&lt;br /&gt;
&lt;br /&gt;
== Booch Method of OOAD ==&lt;br /&gt;
&lt;br /&gt;
Booch Method is a process and notation for developing and communicating the design of an object-oriented software system. Booch method contains proven heuristics for developing quality software that provides effective design and support for development of future systems.&lt;br /&gt;
Booch method is a broad methodology that addresses OOAD using object modeling, analysis modeling, application design, implementation design etc.&lt;br /&gt;
&lt;br /&gt;
Booch method uses following types of diagrams to describe the design decisions that must be made when creating an Object-Oriented system.&lt;br /&gt;
&lt;br /&gt;
Class Diagrams: Represents set of classes and class relationships&lt;br /&gt;
&lt;br /&gt;
Class Specification is used to capture all the information about a class in text format. A class specification contains set of fields that define a class&lt;br /&gt;
&lt;br /&gt;
Category Diagrams are used to group logically related classes in to meaningful collection. &lt;br /&gt;
&lt;br /&gt;
State Transition Diagrams represents the dynamic behavior associated of the classes in the system&lt;br /&gt;
&lt;br /&gt;
Object Diagrams show the existence of objects and their relationships in the logical model of the system. &lt;br /&gt;
&lt;br /&gt;
Timing Diagram is a graph that augments an on object diagram to capture information about external events and timing of operations in the object diagram&lt;br /&gt;
&lt;br /&gt;
Module Diagram is used to show the allocation of classes and objects to module in the physical design of the system.&lt;br /&gt;
&lt;br /&gt;
Process Diagrams represents various process flows and their allocation to processors of the system&lt;br /&gt;
&lt;br /&gt;
Subsystems represent the clusters of logically related modules&lt;br /&gt;
&lt;br /&gt;
The analysis and design steps in Booch method will result in class diagrams, class specifications, object specifications, inheritance views, class category diagrams, architectural descriptions.&lt;br /&gt;
&lt;br /&gt;
== Coad, Yourdon and Nicola OOAD ==&lt;br /&gt;
&lt;br /&gt;
In Coad, Yourdon and Nicola method, OOA works with problem domain classes and objects and OOD focuses on human interaction, task management, and data management classes and objects. In this method, each class and its objects fit into one of the four components: human interaction component, problem domain component, task management component, data management component. They differ from traditional CRCs in a way that the approach revolves around the principles of managing complexity. Three most important principles to manage complexity are:&lt;br /&gt;
&lt;br /&gt;
1. Pervading methods of organization – This is similar to how real world people organize the objects via differentiating objects based on attributes, forming a class of objects based on the features.&lt;br /&gt;
&lt;br /&gt;
2. Categories of behavior – This concept is the basis for identifying the actions of an object&lt;br /&gt;
&lt;br /&gt;
3. Personification – This gives a human characteristic to inanimate objects &lt;br /&gt;
&lt;br /&gt;
== FUSION ==&lt;br /&gt;
&lt;br /&gt;
Fusion method was developed by Object Oriented Design Group at Hewlett-Packard Laboratories, Bristol. The method builds on existing Booch, OMT, CRC and provides a direct route from requirements definition through to a programming language implementation. &lt;br /&gt;
The analysis phase of this method provides a declarative description of system behavior. The Object model describes the static structure of the objects in the problem domain and their interrelation. The Interface model describes the interface of a system and how the system interacts with the environment.&lt;br /&gt;
&lt;br /&gt;
The design stage realizes the system behavior using various outputs as given below.&lt;br /&gt;
&lt;br /&gt;
1. Object Interaction Graph and visibility graph shows how objects interact with each other to complete an operation that is defined in the interface model. Algorithms, classes and their attributes, method signatures are specified accompanying each object interaction graph. Visibility graph complements the Object Interaction graph as it shows how the references among various objects are implemented.&lt;br /&gt;
&lt;br /&gt;
2. Class description captures the class interfaces, attributes, object reference attributes and method signatures&lt;br /&gt;
&lt;br /&gt;
3. Inheritance Graphs are specified to capture the relationships between the objects that are working together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
[http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4 Object Think: A Perspective on Objects by Mike Abney]&lt;br /&gt;
&lt;br /&gt;
[http://net.educause.edu/ir/library/text/c95/c95-ps04.txt &amp;quot;OBJECT THINK&amp;quot; A Step toward Object Oriented Implementation]&lt;br /&gt;
&lt;br /&gt;
[http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think Object Think]&lt;br /&gt;
&lt;br /&gt;
Designing Object Oriented Software by Wirfs-Brock et al.&lt;br /&gt;
&lt;br /&gt;
Object Analysis and Design : Description of Methods by Andrew T.F. Hutt&lt;br /&gt;
&lt;br /&gt;
[http://students.cs.byu.edu/~pbiggs/survey.html A Survey of Object-Oriented Methods by Peter Biggs]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29750</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=29750"/>
		<updated>2009-11-19T15:47:45Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Unified Modeling Language (UML) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Alternatives to CRC Cards =&lt;br /&gt;
== Unified Modeling Language (UML) ==&lt;br /&gt;
&lt;br /&gt;
UML is a visual language for specifying, constructing, and documenting the artifacts of systems. &lt;br /&gt;
&lt;br /&gt;
Advantages of UML Diagram compared to CRC cards:&lt;br /&gt;
# You can use UML with all processes, throughout the development lifecycle, and across different implementation technologies.&lt;br /&gt;
# You can easily visualize the relationship between classes or objects.&lt;br /&gt;
# The complete structure of the system can be captured in one UML diagram, instead of several CRC cards.&lt;br /&gt;
&lt;br /&gt;
== OMT ==&lt;br /&gt;
The Object Modeling technique combines three views of a system and hence three models are used for representing the views.&lt;br /&gt;
 &lt;br /&gt;
1. Object Model – describes the static structure of the objects and their relationships in the system. This represents the concepts like attribute, operation, inheritance, association, aggregation etc.&lt;br /&gt;
&lt;br /&gt;
2. Dynamic Model – describes the aspects of the system that changes over time. This model explains the concepts like states, event, activity etc&lt;br /&gt;
&lt;br /&gt;
3. Functional Model – describes the data value transformations in a system. This model explains the concepts like process, data flow, and control flow, actor etc.&lt;br /&gt;
&lt;br /&gt;
During the analysis phase of the design, all these models are developed and delivered. Object Model Diagram provides a formal graphic notation for modeling objects, classes and their relationships with one another. State diagrams and Event flow diagrams will represent the dynamic model of the system. Data flow diagram represents the data transformation within the system due to the events or actions of the actors.&lt;br /&gt;
OMT differs from CRCs in the way the system is viewed. Apart from viewing the systems as classes and responsibilities, OMT provides a richer way to view and design the system using the 3 models as described above.&lt;br /&gt;
&lt;br /&gt;
== Booch Method of OOAD ==&lt;br /&gt;
&lt;br /&gt;
Booch Method is a process and notation for developing and communicating the design of an object-oriented software system. Booch method contains proven heuristics for developing quality software that provides effective design and support for development of future systems.&lt;br /&gt;
Booch method is a broad methodology that addresses OOAD using object modeling, analysis modeling, application design, implementation design etc.&lt;br /&gt;
&lt;br /&gt;
Booch method uses following types of diagrams to describe the design decisions that must be made when creating an Object-Oriented system.&lt;br /&gt;
&lt;br /&gt;
Class Diagrams: Represents set of classes and class relationships&lt;br /&gt;
&lt;br /&gt;
Class Specification is used to capture all the information about a class in text format. A class specification contains set of fields that define a class&lt;br /&gt;
&lt;br /&gt;
Category Diagrams are used to group logically related classes in to meaningful collection. &lt;br /&gt;
&lt;br /&gt;
State Transition Diagrams represents the dynamic behavior associated of the classes in the system&lt;br /&gt;
&lt;br /&gt;
Object Diagrams show the existence of objects and their relationships in the logical model of the system. &lt;br /&gt;
&lt;br /&gt;
Timing Diagram is a graph that augments an on object diagram to capture information about external events and timing of operations in the object diagram&lt;br /&gt;
&lt;br /&gt;
Module Diagram is used to show the allocation of classes and objects to module in the physical design of the system.&lt;br /&gt;
&lt;br /&gt;
Process Diagrams represents various process flows and their allocation to processors of the system&lt;br /&gt;
&lt;br /&gt;
Subsystems represent the clusters of logically related modules&lt;br /&gt;
&lt;br /&gt;
The analysis and design steps in Booch method will result in class diagrams, class specifications, object specifications, inheritance views, class category diagrams, architectural descriptions.&lt;br /&gt;
&lt;br /&gt;
== Coad, Yourdon and Nicola OOAD ==&lt;br /&gt;
&lt;br /&gt;
In Coad, Yourdon and Nicola method, OOA works with problem domain classes and objects and OOD focuses on human interaction, task management, and data management classes and objects. In this method, each class and its objects fit into one of the four components: human interaction component, problem domain component, task management component, data management component. They differ from traditional CRCs in a way that the approach revolves around the principles of managing complexity. Three most important principles to manage complexity are:&lt;br /&gt;
&lt;br /&gt;
1. Pervading methods of organization – This is similar to how real world people organize the objects via differentiating objects based on attributes, forming a class of objects based on the features.&lt;br /&gt;
&lt;br /&gt;
2. Categories of behavior – This concept is the basis for identifying the actions of an object&lt;br /&gt;
&lt;br /&gt;
3. Personification – This gives a human characteristic to inanimate objects &lt;br /&gt;
&lt;br /&gt;
== FUSION ==&lt;br /&gt;
&lt;br /&gt;
Fusion method was developed by Object Oriented Design Group at Hewlett-Packard Laboratories, Bristol. The method builds on existing Booch, OMT, CRC and provides a direct route from requirements definition through to a programming language implementation. &lt;br /&gt;
The analysis phase of this method provides a declarative description of system behavior. The Object model describes the static structure of the objects in the problem domain and their interrelation. The Interface model describes the interface of a system and how the system interacts with the environment.&lt;br /&gt;
&lt;br /&gt;
The design stage realizes the system behavior using various outputs as given below.&lt;br /&gt;
&lt;br /&gt;
1. Object Interaction Graph and visibility graph shows how objects interact with each other to complete an operation that is defined in the interface model. Algorithms, classes and their attributes, method signatures are specified accompanying each object interaction graph. Visibility graph complements the Object Interaction graph as it shows how the references among various objects are implemented.&lt;br /&gt;
&lt;br /&gt;
2. Class description captures the class interfaces, attributes, object reference attributes and method signatures&lt;br /&gt;
&lt;br /&gt;
3. Inheritance Graphs are specified to capture the relationships between the objects that are working together.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
[http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4 Object Think: A Perspective on Objects by Mike Abney]&lt;br /&gt;
&lt;br /&gt;
[http://net.educause.edu/ir/library/text/c95/c95-ps04.txt &amp;quot;OBJECT THINK&amp;quot; A Step toward Object Oriented Implementation]&lt;br /&gt;
&lt;br /&gt;
[http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think Object Think]&lt;br /&gt;
&lt;br /&gt;
Designing Object Oriented Software by Wirfs-Brock et al.&lt;br /&gt;
&lt;br /&gt;
Object Analysis and Design : Description of Methods by Andrew T.F. Hutt&lt;br /&gt;
&lt;br /&gt;
[http://students.cs.byu.edu/~pbiggs/survey.html A Survey of Object-Oriented Methods by Peter Biggs]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28973</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28973"/>
		<updated>2009-11-19T00:26:54Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= Unified Modeling Language (UML) =&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
Object Think: A Perspective on Objects by Mike Abney on http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4&lt;br /&gt;
&lt;br /&gt;
http://net.educause.edu/ir/library/text/c95/c95-ps04.txt&lt;br /&gt;
&lt;br /&gt;
http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28963</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28963"/>
		<updated>2009-11-19T00:25:15Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Guildelines for design using Object Thinking */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guidelines for Design Using Object Think ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
Object Think: A Perspective on Objects by Mike Abney on http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4&lt;br /&gt;
&lt;br /&gt;
http://net.educause.edu/ir/library/text/c95/c95-ps04.txt&lt;br /&gt;
&lt;br /&gt;
http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28957</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28957"/>
		<updated>2009-11-19T00:24:33Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= CRC Cards =&lt;br /&gt;
&lt;br /&gt;
= Object Think =&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
== Guildelines for design using Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
== Benefits of Object Thinking ==&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
Object Think: A Perspective on Objects by Mike Abney on http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4&lt;br /&gt;
&lt;br /&gt;
http://net.educause.edu/ir/library/text/c95/c95-ps04.txt&lt;br /&gt;
&lt;br /&gt;
http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28942</id>
		<title>CSC/ECE 517 Fall 2009/wiki3 10 OT</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki3_10_OT&amp;diff=28942"/>
		<updated>2009-11-19T00:20:33Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;b&amp;gt;Topic :&amp;lt;/b&amp;gt;&amp;lt;i&amp;gt; CRC cards are useful, but have some limitations. For example, they require that a group be present; it is sometimes hard to get a group together. One alternative technique is &amp;quot;Object Think.&amp;quot; Compare CRC cards with Object Think and any other alternatives for the first stages of analysis and design.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;CRC Cards&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;Object Think&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Simon Horwith defines “Object Think” as an approach to Object Oriented Programming based on the practice of object personification.&lt;br /&gt;
&lt;br /&gt;
Object Think represents a way to think of the domain model in terms of objects, which further helps in developing or designing classes. Object Think was suggested as a practical alternative to CRC cards in 1993 by Coad and Nicola. The primary benefit of Object Think is that unlike CRC cards, it can be done individually and no group is required. &lt;br /&gt;
&lt;br /&gt;
In Object Think perspective, objects are modeled to carry out real world functions. Then the responsibilities are distributed across objects as part of the design. Object Think therefore helps to create an accurate domain model where every object in the domain model handles all of its own responsibilities. The advantage of this approach is that as the software system is initially designed, the designers might start with fewer objects carrying out many functionality. As the system grows over time, Object Think will lead to design a community of objects sharing those responsibilities.&lt;br /&gt;
&lt;br /&gt;
Object Think also bridges the traditional process-oriented thinking with the object mindsets. For example, the real world scenario of communication translates to Messaging in the Object Oriented paradigm.&lt;br /&gt;
&lt;br /&gt;
Object Think perceives Objects as independent entity performing actions and making decisions on its own. Mike Abney, in the article -&amp;quot;Object Think: A Perspective on Objects&amp;quot; suggests that an object's capability to act is one of its three categories of responsibilities: &amp;quot;whom I know,&amp;quot; &amp;quot;what I do,&amp;quot; and &amp;quot;what I know.&amp;quot; Peter Coad and Edward Youdon (in Object-Oriented Analysis, 2nd ed., Prentice Hall, 1990) refers this to object's services. Although technically services refer to an operation or procedure, when an object performs the services they are viewed as actions on the objects. As an example, an account object provides a debit method. So, when the debit method is acted on the object, it is viewed as debit action being carried upon the object. This means the state of the object changes based on the action that is being performed on the object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Guildelines for design using Object Thinking&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Everything in the domain model is an object. This means that a class technically cannot have free-floating functions that are not related to an object of the class. Functions generally represent the actions on an object or a concept in the domain model. So, they have to be associated with an object that represent the concept&lt;br /&gt;
&lt;br /&gt;
2. Think like an Object&lt;br /&gt;
&lt;br /&gt;
3. Model the objects of a system using the language of the domain model. This helps designers to focus on the domain model and design a system with a high level perspective instead of bogged down with low level implementation details.The purpose and capabilities of an object has to be designed and stated clearly. Also, the implementation should statisfy the stated goal.&lt;br /&gt;
&lt;br /&gt;
4. Objects should have context free behavior - This really means that Objects should be designed with the object oriented principles like encapsulation, cohesion, coupling, reuse etc. and Objects should be modeled as autonomous agents that perform the operations in isolation.&lt;br /&gt;
&lt;br /&gt;
5. Design using simulation - Simulating a domain model by representing it in terms of various objects will help to identify the details of the design.&lt;br /&gt;
&lt;br /&gt;
6. Design to keep functions and data together - Domain model's operations can be represented as actions on objects. Since these operations affect the state of the object, it is a good practice to tie objects and their operations together.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h5&amp;gt;Benefits of Object Thinking&amp;lt;/h5&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1. Unlike CRC, Object thinking can be carried out by individuals&lt;br /&gt;
&lt;br /&gt;
2. Design using Object think provides a maintainable code as in a long run, a system will have objects sharing ther responsibilities and collaborating to complete a domain operation&lt;br /&gt;
&lt;br /&gt;
3. Design using object think also results in a reusable code&lt;br /&gt;
&lt;br /&gt;
4. Since Object Think insists on stating the purpose and capabilities of the objects, this will result in a better definition of data and the responsibility on the objects&lt;br /&gt;
&lt;br /&gt;
5. Also, Object Think can be used as a platform to educate developers to become object oriented thinkers&lt;br /&gt;
&lt;br /&gt;
&amp;lt;h3&amp;gt;References&amp;lt;/h3&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Object Think - Common Sense Software Architecture by Simon Horwith on cfunited conference 2006&lt;br /&gt;
&lt;br /&gt;
Object Think: A Perspective on Objects by Mike Abney on http://www.informit.com/articles/article.aspx?p=25184&amp;amp;seqNum=4&lt;br /&gt;
&lt;br /&gt;
http://net.educause.edu/ir/library/text/c95/c95-ps04.txt&lt;br /&gt;
&lt;br /&gt;
http://corfield.org/blog/index.cfm/do/blog.entry/entry/Object_Think&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Report_for_View_(Testing)&amp;diff=26458</id>
		<title>Report for View (Testing)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Report_for_View_(Testing)&amp;diff=26458"/>
		<updated>2009-10-26T23:04:06Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* No “Semi Year” option under “Budget Period Type” (Should this Model?) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''View Analysis and Testing'''&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
==== Testing method ====&lt;br /&gt;
:*Interactive (manual)&lt;br /&gt;
==== Testing Scenario ====&lt;br /&gt;
:*Complete Story&lt;br /&gt;
:*Split focused&lt;br /&gt;
:*Testing matrix&lt;br /&gt;
&lt;br /&gt;
=== Planned Tests ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tests Done===&lt;br /&gt;
&lt;br /&gt;
== View Analysis (Based on tests) ==&lt;br /&gt;
&lt;br /&gt;
== View Changes ==&lt;br /&gt;
=== Planned Changes ===&lt;br /&gt;
#Commit Button&lt;br /&gt;
#&amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; =&amp;gt; &amp;quot;Add&amp;quot;, &amp;quot;Remove&amp;quot; or icons&lt;br /&gt;
#non-purpose? square in transaction dialog&lt;br /&gt;
=== Changes Made ===&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
==== Adding first child to existing category does not create an object tree icon (plus sign)====&lt;br /&gt;
Descriptions:&lt;br /&gt;
# Under My Budget, highlight one of the existing category.&lt;br /&gt;
# Select Edit -&amp;gt; Create new category.&lt;br /&gt;
# Create a name for the new category and select one of the existing categories as the parent.&lt;br /&gt;
# Select “OK”.&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
The parent category should have an object tree icon (plus sign) to show that it has children categories under it.&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
Notice that the parent category does not have an object tree icon (plus sign) next to it. You will have to either highlight the category or switch view from Buddi and come back.&lt;br /&gt;
&lt;br /&gt;
==== Remaining amount for split is shown on the text box instead of written below the box ====&lt;br /&gt;
Descriptions:&lt;br /&gt;
# Select split (add details later)&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
Text box for amount is automatically filled with the remaining amount shown below the box.&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
Default amount is set to $0&lt;br /&gt;
&lt;br /&gt;
==== Remaining amount for split transaction is negative ====&lt;br /&gt;
Descriptions:&lt;br /&gt;
# Select split (add details later)&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
User should be notified that the value inserted is incorrect or that the maximum value should be less than or equal to a certain number.&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
“Save” button is grayed out and user has to figure out what went wrong.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26457</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26457"/>
		<updated>2009-10-26T19:45:30Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Important Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 26 (Monday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at a minimum, all files which have changed OR a .diff of your changes, as you desire).&lt;br /&gt;
# A '''written report ([[Written Report on Model %28Testing%29|Model]]) on the model testing''', indicating what your unit tests test (paying attention to edge cases where problems are more likely to occur) and the results of these tests. (The actual unit tests themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report ([[Written Report on View %28Testing%29|View]]) on the view testing''', indicating what tests you performed, and what the results were. Screenshots taken throughout the test procedure are optional, but a very good idea to demonstrate what problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or the model) as a result of your testing. If there were failures or potential improvements discovered in either your tests, this report should include a re-run of the failed tests, showing that they are now working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Default Amount for split&lt;br /&gt;
|  The default amount is not set to the difference automatically for the new split&lt;br /&gt;
|  Currently, default amount is set to zero&lt;br /&gt;
|  The remaining split amount represents the remaining balance among the splits&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Category drop down&lt;br /&gt;
|  Category list not filtered&lt;br /&gt;
|  Some items (credit, cash) are not selectable when selecting a split source.&lt;br /&gt;
|  If it's not available for selection, then better take them off the list&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Split From Source&lt;br /&gt;
|  Transaction involves split from sources didn't show the split when selected&lt;br /&gt;
|  It shows &amp;lt;From&amp;gt; in an unselected mode&lt;br /&gt;
|  Should show &amp;quot;split&amp;quot; entry with &amp;quot;...&amp;quot; button surfaced&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create Budget Category using existing category as parent&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Create Budget Category&amp;quot; -&amp;gt; create new category and choose one of the parents that does not have any children yet -&amp;gt; &amp;quot;OK&amp;quot;. &lt;br /&gt;
|  Parent does not have + sign next to its name. It will only show up when you highlight parent's row or switch view from Buddi and come back.&lt;br /&gt;
|  Parent's name should have &amp;quot;+&amp;quot; sign next to it right after child creation.&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
* [[Buddi Existing Test code]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26444</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26444"/>
		<updated>2009-10-23T00:09:04Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Bugs or Undesired Behaviors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at a minimum, all files which have changed OR a .diff of your changes, as you desire).&lt;br /&gt;
# A '''written report ([[Written Report on Model %28Testing%29|W]]) on the model testing''', indicating what your unit tests test (paying attention to edge cases where problems are more likely to occur) and the results of these tests. (The actual unit tests themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report ([[Written Report on View %28Testing%29|W]]) on the view testing''', indicating what tests you performed, and what the results were. Screenshots taken throughout the test procedure are optional, but a very good idea to demonstrate what problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or the model) as a result of your testing. If there were failures or potential improvements discovered in either your tests, this report should include a re-run of the failed tests, showing that they are now working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Default Amount for split&lt;br /&gt;
|  The default amount is not set to the difference automatically for the new split&lt;br /&gt;
|  Currently, default amount is set to zero&lt;br /&gt;
|  The remaining split amount represents the remaining balance among the splits&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Category drop down&lt;br /&gt;
|  Category list not filtered&lt;br /&gt;
|  Some items (credit, cash) are not selectable when selecting a split source.&lt;br /&gt;
|  If it's not available for selection, then better take them off the list&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Split From Source&lt;br /&gt;
|  Transaction involves split from sources didn't show the split when selected&lt;br /&gt;
|  It shows &amp;lt;From&amp;gt; in an unselected mode&lt;br /&gt;
|  Should show &amp;quot;split&amp;quot; entry with &amp;quot;...&amp;quot; button surfaced&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create Budget Category using existing category as parent&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Create Budget Category&amp;quot; -&amp;gt; create new category and choose one of the parents that does not have any children yet -&amp;gt; &amp;quot;OK&amp;quot;. &lt;br /&gt;
|  Parent does not have + sign next to its name. It will only show up when you highlight parent's row or switch view from Buddi and come back.&lt;br /&gt;
|  Parent's name should have &amp;quot;+&amp;quot; sign next to it right after child creation.&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
* [[Buddi Existing Test code]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Report_for_View_(Testing)&amp;diff=26436</id>
		<title>Report for View (Testing)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Report_for_View_(Testing)&amp;diff=26436"/>
		<updated>2009-10-20T18:18:37Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Appendix */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''View Analysis and Testing'''&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
==== Testing method ====&lt;br /&gt;
:*Interactive (manual)&lt;br /&gt;
==== Testing Scenario ====&lt;br /&gt;
:*Complete Story&lt;br /&gt;
:*Split focused&lt;br /&gt;
:*Testing matrix&lt;br /&gt;
&lt;br /&gt;
=== Planned Tests ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tests Done===&lt;br /&gt;
&lt;br /&gt;
== View Analysis (Based on tests) ==&lt;br /&gt;
&lt;br /&gt;
== View Changes ==&lt;br /&gt;
=== Planned Changes ===&lt;br /&gt;
#Commit Button&lt;br /&gt;
#&amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; =&amp;gt; &amp;quot;Add&amp;quot;, &amp;quot;Remove&amp;quot; or icons&lt;br /&gt;
#non-purpose? square in transaction dialog&lt;br /&gt;
=== Changes Made ===&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
==== Adding first child to existing category does not create an object tree icon (plus sign)====&lt;br /&gt;
Descriptions:&lt;br /&gt;
# Under My Budget, highlight one of the existing category.&lt;br /&gt;
# Select Edit -&amp;gt; Create new category.&lt;br /&gt;
# Create a name for the new category and select one of the existing categories as the parent.&lt;br /&gt;
# Select “OK”.&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
The parent category should have an object tree icon (plus sign) to show that it has children categories under it.&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
Notice that the parent category does not have an object tree icon (plus sign) next to it. You will have to either highlight the category or switch view from Buddi and come back.&lt;br /&gt;
&lt;br /&gt;
==== Remaining amount for split is shown on the text box instead of written below the box ====&lt;br /&gt;
Descriptions:&lt;br /&gt;
# Select split (add details later)&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
Text box for amount is automatically filled with the remaining amount shown below the box.&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
Default amount is set to $0&lt;br /&gt;
&lt;br /&gt;
==== Remaining amount for split transaction is negative ====&lt;br /&gt;
Descriptions:&lt;br /&gt;
# Select split (add details later)&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
User should be notified that the value inserted is incorrect or that the maximum value should be less than or equal to a certain number.&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
“Save” button is grayed out and user has to figure out what went wrong.&lt;br /&gt;
&lt;br /&gt;
==== No “Semi Year” option under “Budget Period Type” (Should this Model?) ====&lt;br /&gt;
Descriptions:&lt;br /&gt;
* Under &amp;quot;My Budget&amp;quot; tab, select &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Modify Budget Category&amp;quot; -&amp;gt; &amp;quot;Budget Period Type&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
There should be an option to schedule periodic transaction for twice a year (Semi Year)&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
No such option&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=Report_for_View_(Testing)&amp;diff=26435</id>
		<title>Report for View (Testing)</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Report_for_View_(Testing)&amp;diff=26435"/>
		<updated>2009-10-20T18:16:02Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''View Analysis and Testing'''&lt;br /&gt;
&lt;br /&gt;
== Testing ==&lt;br /&gt;
=== Testing Strategy ===&lt;br /&gt;
==== Testing method ====&lt;br /&gt;
:*Interactive (manual)&lt;br /&gt;
==== Testing Scenario ====&lt;br /&gt;
:*Complete Story&lt;br /&gt;
:*Split focused&lt;br /&gt;
:*Testing matrix&lt;br /&gt;
&lt;br /&gt;
=== Planned Tests ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Tests Done===&lt;br /&gt;
&lt;br /&gt;
== View Analysis (Based on tests) ==&lt;br /&gt;
&lt;br /&gt;
== View Changes ==&lt;br /&gt;
=== Planned Changes ===&lt;br /&gt;
#Commit Button&lt;br /&gt;
#&amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; =&amp;gt; &amp;quot;Add&amp;quot;, &amp;quot;Remove&amp;quot; or icons&lt;br /&gt;
#non-purpose? square in transaction dialog&lt;br /&gt;
=== Changes Made ===&lt;br /&gt;
&lt;br /&gt;
== Appendix ==&lt;br /&gt;
=== Test Cases ===&lt;br /&gt;
==== Adding first child to existing category does not create an object tree icon (plus sign)====&lt;br /&gt;
Descriptions:&lt;br /&gt;
# Under My Budget, highlight one of the existing category.&lt;br /&gt;
# Select Edit -&amp;gt; Create new category.&lt;br /&gt;
# Create a name for the new category and select one of the existing categories as the parent.&lt;br /&gt;
# Select “OK”.&lt;br /&gt;
&lt;br /&gt;
Expected behavior:&lt;br /&gt;
The parent category should have an object tree icon (plus sign) to show that it has children categories under it.&lt;br /&gt;
&lt;br /&gt;
Actual behavior:&lt;br /&gt;
Notice that the parent category does not have an object tree icon (plus sign) next to it. You will have to either highlight the category or switch view from Buddi and come back.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26410</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26410"/>
		<updated>2009-10-19T05:21:32Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Bugs or Undesired Behaviors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at a minimum, all files which have changed OR a .diff of your changes, as you desire).&lt;br /&gt;
# A '''written report on the model testing''', indicating what your unit tests test (paying attention to edge cases where problems are more likely to occur) and the results of these tests. (The actual unit tests themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report on the view testing''', indicating what tests you performed, and what the results were. Screenshots taken throughout the test procedure are optional, but a very good idea to demonstrate what problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or the model) as a result of your testing. If there were failures or potential improvements discovered in either your tests, this report should include a re-run of the failed tests, showing that they are now working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Default Amount for split&lt;br /&gt;
|  The default amount is not set to the difference automatically for the new split&lt;br /&gt;
|  Currently, default amount is set to zero&lt;br /&gt;
|  The remaining split amount represents the remaining balance among the splits&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Category drop down&lt;br /&gt;
|  Category list not filtered&lt;br /&gt;
|  Some items (credit, cash) are not selectable when selecting a split source.&lt;br /&gt;
|  If it's not available for selection, then better take them off the list&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Split From Source&lt;br /&gt;
|  Transaction involves split from sources didn't show the split when selected&lt;br /&gt;
|  It shows &amp;lt;From&amp;gt; in an unselected mode&lt;br /&gt;
|  Should show &amp;quot;split&amp;quot; entry with &amp;quot;...&amp;quot; button surfaced&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  ADDITIONAL FEATURE: Add Semi Year (twice a year) &amp;quot;Budget Period Type&amp;quot;.&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Modify Budget Category&amp;quot; -&amp;gt; &amp;quot;Budget Period Type&amp;quot;. &lt;br /&gt;
|  No option for Semi Year &lt;br /&gt;
|  Add the functionality&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create Budget Category using existing category as parent&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Create Budget Category&amp;quot; -&amp;gt; create new category and choose one of the parents that does not have any children yet -&amp;gt; &amp;quot;OK&amp;quot;. &lt;br /&gt;
|  Parent does not have + sign next to its name. It will only show up when you highlight parent's row or switch view from Buddi and come back.&lt;br /&gt;
|  Parent's name should have &amp;quot;+&amp;quot; sign next to it right after child creation.&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26409</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26409"/>
		<updated>2009-10-19T02:40:11Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Bugs or Undesired Behaviors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at a minimum, all files which have changed OR a .diff of your changes, as you desire).&lt;br /&gt;
# A '''written report on the model testing''', indicating what your unit tests test (paying attention to edge cases where problems are more likely to occur) and the results of these tests. (The actual unit tests themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report on the view testing''', indicating what tests you performed, and what the results were. Screenshots taken throughout the test procedure are optional, but a very good idea to demonstrate what problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or the model) as a result of your testing. If there were failures or potential improvements discovered in either your tests, this report should include a re-run of the failed tests, showing that they are now working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Default Amount for split&lt;br /&gt;
|  The default amount is not set to the difference automatically for the new split&lt;br /&gt;
|  Currently default amount is set to zero&lt;br /&gt;
|  The remaining split amount represents the remaining balance among the splits&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Category drop down&lt;br /&gt;
|  Category list not filtered&lt;br /&gt;
|  Some items (credit, cash) are not selectable when selecting a split source.&lt;br /&gt;
|  If it's not available for selection, then better take them off the list&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Split From Source&lt;br /&gt;
|  Transaction involves split from sources didn't show the split when selected&lt;br /&gt;
|  It shows &amp;lt;From&amp;gt; in an unselected mode&lt;br /&gt;
|  Should show &amp;quot;split&amp;quot; entry with &amp;quot;...&amp;quot; button surfaced&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create Budget Category using existing category as parent&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Create Budget Category&amp;quot; -&amp;gt; create new category and choose one of the parents that does not have any children yet -&amp;gt; &amp;quot;OK&amp;quot;. &lt;br /&gt;
|  Parent does not have + sign next to its name. It will only show up when you highlight parent's row or switch view from Buddi and come back.&lt;br /&gt;
|  Parent's name should have &amp;quot;+&amp;quot; sign next to it right after child creation.&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  ADDITIONAL FEATURE: Add Semi Year (twice a year) &amp;quot;Budget Period Type&amp;quot;.&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Modify Budget Category&amp;quot; -&amp;gt; &amp;quot;Budget Period Type&amp;quot;. &lt;br /&gt;
|  No option for Semi Year &lt;br /&gt;
|  Add the functionality&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26408</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26408"/>
		<updated>2009-10-19T02:40:00Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Bugs or Undesired Behaviors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at a minimum, all files which have changed OR a .diff of your changes, as you desire).&lt;br /&gt;
# A '''written report on the model testing''', indicating what your unit tests test (paying attention to edge cases where problems are more likely to occur) and the results of these tests. (The actual unit tests themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report on the view testing''', indicating what tests you performed, and what the results were. Screenshots taken throughout the test procedure are optional, but a very good idea to demonstrate what problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or the model) as a result of your testing. If there were failures or potential improvements discovered in either your tests, this report should include a re-run of the failed tests, showing that they are now working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Default Amount for split&lt;br /&gt;
|  The default amount is not set to the difference automatically for the new split&lt;br /&gt;
|  Currently default amount is set to zero&lt;br /&gt;
|  The remaining split amount represents the remaining balance among the splits&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Category drop down&lt;br /&gt;
|  Category list not filtered&lt;br /&gt;
|  Some items (credit, cash) are not selectable when selecting a split source.&lt;br /&gt;
|  If it's not available for selection, then better take them off the list&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Split From Source&lt;br /&gt;
|  Transaction involves split from sources didn't show the split when selected&lt;br /&gt;
|  It shows &amp;lt;From&amp;gt; in an unselected mode&lt;br /&gt;
|  Should show &amp;quot;split&amp;quot; entry with &amp;quot;...&amp;quot; button surfaced&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create Budget Category using existing category as parent&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Create Budget Category&amp;quot; -&amp;gt; create new category and choose one of the parents that does not have any children yet -&amp;gt; &amp;quot;OK&amp;quot;. &lt;br /&gt;
|  Parent does not have + sign next to its name. It will only show up when you highlight parent's row or switch view from Buddi and come back.&lt;br /&gt;
|  Parent's name should have &amp;quot;+&amp;quot; sign next to it right after child creation.&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  ADDITIONAL FEATURE: Add Semi Year (twice a year) &amp;quot;Budget Period Type&amp;quot;.&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Modify Budget Category&amp;quot; -&amp;gt; &amp;quot;Budget Period Type&amp;quot;. &lt;br /&gt;
|  No option for Semi Year &lt;br /&gt;
|  Add the funtionality&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26407</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=26407"/>
		<updated>2009-10-19T02:30:19Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Bugs or Undesired Behaviors */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at a minimum, all files which have changed OR a .diff of your changes, as you desire).&lt;br /&gt;
# A '''written report on the model testing''', indicating what your unit tests test (paying attention to edge cases where problems are more likely to occur) and the results of these tests. (The actual unit tests themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report on the view testing''', indicating what tests you performed, and what the results were. Screenshots taken throughout the test procedure are optional, but a very good idea to demonstrate what problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or the model) as a result of your testing. If there were failures or potential improvements discovered in either your tests, this report should include a re-run of the failed tests, showing that they are now working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Default Amount for split&lt;br /&gt;
|  The default amount is not set to the difference automatically for the new split&lt;br /&gt;
|  Currently default amount is set to zero&lt;br /&gt;
|  The remaining split amount represents the remaining balance among the splits&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Category drop down&lt;br /&gt;
|  Category list not filtered&lt;br /&gt;
|  Some items (credit, cash) are not selectable when selecting a split source.&lt;br /&gt;
|  If it's not available for selection, then better take them off the list&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Split From Source&lt;br /&gt;
|  Transaction involves split from sources didn't show the split when selected&lt;br /&gt;
|  It shows &amp;lt;From&amp;gt; in an unselected mode&lt;br /&gt;
|  Should show &amp;quot;split&amp;quot; entry with &amp;quot;...&amp;quot; button surfaced&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create Budget Category using existing category as parent&lt;br /&gt;
|  From &amp;quot;My Budget&amp;quot; tab, &amp;quot;Edit&amp;quot; -&amp;gt; &amp;quot;Create Budget Category&amp;quot; -&amp;gt; create new category and choose one of the parents that does not have any children yet -&amp;gt; &amp;quot;OK&amp;quot;. &lt;br /&gt;
|  Parent does not have + sign next to its name. It will only show up when you highlight parent's row or switch view from Buddi and come back.&lt;br /&gt;
|  Parent's name should have &amp;quot;+&amp;quot; sign next to it right after child creation.&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26406</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26406"/>
		<updated>2009-10-15T21:08:07Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. Instead, '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator pattern, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
* Iterates a block of code for each element in the &amp;lt;code&amp;gt;Array&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for every line in a file&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for all active threads&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for each object in the system&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;br /&gt;
&lt;br /&gt;
* Olsen, Russ (2007). [http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452 ''Design Patterns in Ruby'']. Addison-Wesley. ISBN 0-321-49045-2.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26405</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26405"/>
		<updated>2009-10-15T21:07:50Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. Instead, '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator pattern, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
* Iterates a block of code for each element in the &amp;lt;code&amp;gt;Array&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for every line in a file&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for all active threads&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for each object in the system&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;br /&gt;
&lt;br /&gt;
* Olsen, Russ (2007). [http://www.amazon.com/Design-Patterns-Ruby-Russ-Olsen/dp/0321490452 Design Patterns in Ruby]. Addison-Wesley. ISBN 0-321-49045-2.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26404</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26404"/>
		<updated>2009-10-15T19:41:00Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. Instead, '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator pattern, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
* Iterates a block of code for each element in the &amp;lt;code&amp;gt;Array&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for every line in a file&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for all active threads&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for each object in the system&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26403</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26403"/>
		<updated>2009-10-15T19:38:27Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Iterator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. Instead, '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator pattern, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
* Iterates a block of code for each element in the &amp;lt;code&amp;gt;Array&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for every line in a file&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for all active threads&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for each object in the system&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html Design Patterns in Ruby] by Russ Olsen, February 27, 2006.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26402</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26402"/>
		<updated>2009-10-15T19:36:30Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. Instead, '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
* Iterates a block of code for each element in the &amp;lt;code&amp;gt;Array&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for every line in a file&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for all active threads&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for each object in the system&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html Design Patterns in Ruby] by Russ Olsen, February 27, 2006.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26401</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26401"/>
		<updated>2009-10-15T19:36:02Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Singleton Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
* Iterates a block of code for each element in the &amp;lt;code&amp;gt;Array&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for every line in a file&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for all active threads&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for each object in the system&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html Design Patterns in Ruby] by Russ Olsen, February 27, 2006.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26400</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26400"/>
		<updated>2009-10-15T19:35:30Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Iterator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
* Iterates a block of code for each element in the &amp;lt;code&amp;gt;Array&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for every line in a file&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for all active threads&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
* Iterates code for each object in the system&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html Design Patterns in Ruby] by Russ Olsen, February 27, 2006.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26399</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26399"/>
		<updated>2009-10-15T19:27:51Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html Design Patterns in Ruby] by Russ Olsen, February 27, 2006.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26398</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26398"/>
		<updated>2009-10-15T19:27:38Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;br /&gt;
&lt;br /&gt;
* [http://p-cos.net/documents/dynatype.pdf Dynamic vs Static Typing -- A Pattern-based Analysis] by Pascal Costanza, March 13, 2004.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26397</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26397"/>
		<updated>2009-10-15T18:44:03Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Introduction */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of dynamic object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any [http://en.wikipedia.org/wiki/Dynamic_language dynamically typed language] can realize better than a [http://en.wikipedia.org/wiki/Type_system statically typed language]?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26396</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26396"/>
		<updated>2009-10-15T18:35:46Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Design Patterns in JAVA vs Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in Java vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26395</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26395"/>
		<updated>2009-10-15T18:34:13Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design pattern is a concept that applicable to solve problems regardless of the languages we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;lt;code&amp;gt;include Singleton&amp;lt;/code&amp;gt; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26392</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26392"/>
		<updated>2009-10-15T18:12:26Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Iterators */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterator==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Iterator_pattern Iterator pattern] is design pattern used to access the elements of an aggregate object sequentially without exposing its underlying representation. &lt;br /&gt;
&lt;br /&gt;
In order to use Iterator patter, we need: &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In Java, we will need to know the type of objects in the collection and cast them to the right type in order to use them. Whereas in Ruby, iterators are built right in. &lt;br /&gt;
&lt;br /&gt;
Here are some examples that show the ease with which we can use iterators in Ruby: &lt;br /&gt;
&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26391</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26391"/>
		<updated>2009-10-15T18:08:30Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''Java''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26390</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26390"/>
		<updated>2009-10-15T18:08:17Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Factory Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Factory_pattern Factory pattern] is implemented by isolating the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In '''JAVA''', we typically write a similar code as below:  &lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
We can implement the same code skeleton in Ruby. However, there is no special classes or class methods in Ruby since it is a dynamic language. '''Ruby''' allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory)&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special &amp;lt;code&amp;gt;createObject&amp;lt;/code&amp;gt; method.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26389</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26389"/>
		<updated>2009-10-15T17:39:16Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Singleton Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a &amp;lt;code&amp;gt;getInstance&amp;lt;/code&amp;gt; method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;lt;code&amp;gt;include singleton&amp;lt;/code&amp;gt; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26388</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26388"/>
		<updated>2009-10-15T17:38:02Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Singleton Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a getInstance method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;quot;include singleton&amp;quot; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26387</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26387"/>
		<updated>2009-10-15T17:37:44Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Singleton Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a getInstance method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;quot;include singleton&amp;quot; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26386</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26386"/>
		<updated>2009-10-15T17:35:57Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Singleton Pattern */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a getInstance method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;quot;include singleton&amp;quot; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26385</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26385"/>
		<updated>2009-10-15T17:35:13Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a getInstance method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;quot;include singleton&amp;quot; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* Gamma, Erich; Richard Helm, Ralph Johnson, and John Vlissides (1995). [http://en.wikipedia.org/wiki/Design_patterns_book ''Design Patterns: Elements of Reusable Object-Oriented Software'']. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26384</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26384"/>
		<updated>2009-10-15T17:33:53Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a getInstance method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;quot;include singleton&amp;quot; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [http://en.wikipedia.org/wiki/Erich_Gamma Gamma, Erich]; Richard Helm, Ralph Johnson, and John Vlissides (1995). Design Patterns: Elements of Reusable Object-Oriented Software. Addison-Wesley. ISBN 0-201-63361-2.&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26383</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26383"/>
		<updated>2009-10-15T17:31:27Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* References */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a getInstance method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;quot;include singleton&amp;quot; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
*{{cite book&lt;br /&gt;
 | first = Erich&lt;br /&gt;
 | last = Gamma&lt;br /&gt;
 | authorlink = Erich Gamma&lt;br /&gt;
 | coauthors = [[Richard Helm]], [[Ralph Johnson]], and [[John Vlissides]]&lt;br /&gt;
 | year = 1995&lt;br /&gt;
 | title = [[Design Patterns (book)|Design Patterns: Elements of Reusable Object-Oriented Software]]&lt;br /&gt;
 | publisher = [[Addison-Wesley]]&lt;br /&gt;
 | isbn = 0-201-63361-2&lt;br /&gt;
 | ref=book_Gamma1995&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26254</id>
		<title>CSC/ECE 517 Fall 2009/wiki2 13 ncs</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/wiki2_13_ncs&amp;diff=26254"/>
		<updated>2009-10-15T02:11:36Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Ruby_language Ruby] offers more concise implementations of certain [http://en.wikipedia.org/wiki/Design_pattern design patterns] than [http://en.wikipedia.org/wiki/Java_language Java] does. We will look at some design patterns and compare the implementation in '''Ruby vs Java''' with the goal to answer the following:&lt;br /&gt;
* Is this typical of [http://en.wikipedia.org/wiki/Dynamic_language dynamic] object-oriented languages?&lt;br /&gt;
&lt;br /&gt;
* Are there design patterns that any dynamically typed language can realize better than a statically typed language?&lt;br /&gt;
&lt;br /&gt;
* Are there instances when a different pattern should be used in a dynamic language than a static language?&lt;br /&gt;
&lt;br /&gt;
=Design Patterns in JAVA vs Ruby=&lt;br /&gt;
&lt;br /&gt;
==Singleton Pattern==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Singleton_pattern Singleton pattern] is a design pattern used to restrict the instantiation of the class to one object. &lt;br /&gt;
&lt;br /&gt;
The implementation of the pattern involves:&lt;br /&gt;
* making the constructor private &lt;br /&gt;
* declare a instance variable &lt;br /&gt;
* implement a getInstance method and make the it thread safe. &lt;br /&gt;
&lt;br /&gt;
Below is the comparison between singleton class written in Java and Ruby. &lt;br /&gt;
&lt;br /&gt;
It is clear that Ruby provides a more concise way of implementing the singleton pattern. Ruby uses the singleton module which automatically provides all the functionality that we need to write manually in Java. By writing &amp;quot;include singleton&amp;quot; in Ruby, we prevent ourselves from having to repeat writing the same code for each class that we wish to make singleton. In contrast, we need to write the Java class below for every singleton objects we create. &lt;br /&gt;
&lt;br /&gt;
'''Java'''&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  public class SingletonExample { &lt;br /&gt;
     // declare instance variable&lt;br /&gt;
     private static SingletonExample singletonEx; &lt;br /&gt;
     // Make the constructor is private&lt;br /&gt;
     private SingletonExample() {&lt;br /&gt;
     }&lt;br /&gt;
     // make this thread safe use synchronize&lt;br /&gt;
     synchronize public static SingletonExample getSingletonObject() {&lt;br /&gt;
       if (singletonEx == null) {&lt;br /&gt;
          singletonEx = new SingletonExample();&lt;br /&gt;
       }&lt;br /&gt;
       return singletonEx;&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Ruby''' (using singleton module)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  require singleton&lt;br /&gt;
  class SingletonExample&lt;br /&gt;
    include singleton&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factory Pattern==&lt;br /&gt;
Isolate the code to create an object from the concrete implementation of the class. &lt;br /&gt;
&lt;br /&gt;
In JAVA we typically do something like &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
  interface IObjectFactory {&lt;br /&gt;
     IGear createObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ConcreteObjectFactory implements IObjectFactory{&lt;br /&gt;
  IObject createObject() {&lt;br /&gt;
     if ( some condition )&lt;br /&gt;
        return new XObject();&lt;br /&gt;
     else&lt;br /&gt;
        return new YObject();&lt;br /&gt;
  }&lt;br /&gt;
  class ObjectUser {&lt;br /&gt;
     public void doSomething(IObjectFactory factory ) {&lt;br /&gt;
        IObject my_Object = factory.createObject();&lt;br /&gt;
     }&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
We can technically do the exact same thing in Ruby however Ruby being a dynamic language there are no special classes or class methods in Ruby. Ruby allows us to rename our factory method to be called new. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectFactory&lt;br /&gt;
    def new() &lt;br /&gt;
      if ( ... some condition )&lt;br /&gt;
         return XObject.new()&lt;br /&gt;
      else&lt;br /&gt;
         return YObject().new()&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Our client class now becomes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  class ObjectUser &lt;br /&gt;
    def doSomething(factory )&lt;br /&gt;
      ...&lt;br /&gt;
      my_object = factory.new()&lt;br /&gt;
      ...&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Ruby lets us redefine the new method and this allows us to implement the Factory pattern with a class that looks very much like an ordinary class. The client does not need to know about the special createObject methods.&lt;br /&gt;
&lt;br /&gt;
==Iterators==&lt;br /&gt;
Iterators are design patterns used to access the elements of an aggregate object sequentially without exposing its underlying representation. To use iterators we need &lt;br /&gt;
&lt;br /&gt;
* An iterator declared and initialized to point to the collection &lt;br /&gt;
* Write a loop and use the iterator to get the value of the next sequential object in the collection. &lt;br /&gt;
&lt;br /&gt;
In JAVA we will need to know the type of objects in the collection and cast the objects to the right type to use them whereas in Ruby iterators are built right in. Here are some examples that show the ease with which we can use iterators in Ruby &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
  a = [ 10, 20, 30, 40 ]&lt;br /&gt;
  a.each { |element| print &amp;quot;The element is #{element}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  Thread.list.each { |t| print &amp;quot;Thread: #{t}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  ObjectSpace.each_object { |o| print &amp;quot;Object: #{o}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
  open(&amp;quot;data.txt&amp;quot;).each_line { |line| print &amp;quot;The line is #{line}\n&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Conclusion=&lt;br /&gt;
&lt;br /&gt;
Design patterns are concepts that are equally applicable to solve problems regardless of the language we use to implement the solution. So I cannot think of a case where a specific pattern will be more useful or pertinent to be used in a dynamic language than a static language. However given the features of dynamic languages like Ruby that support meta-programming and reflection via Modules and Mixins and support extending/reopening classes and redefining methods at run time definitely make it easier to implement patterns with fewer lines of code. Ruby lets us hide the details of implementations of design patterns much more effectively. You can make a class a singleton with a simple &amp;quot;include Singleton&amp;quot; statement. You can make factories that look exactly like ordinary classes. These features in Ruby do make implementing design patterns very easy and let a programmer focus on solving the problem at hand rather than spending time implementing the design patterns.&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
* [http://designpatternsinruby.com/section01/article.html &amp;quot;Design Patterns in Ruby&amp;quot;] by Russ Olsen, February 27, 2006.&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25694</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25694"/>
		<updated>2009-10-12T18:08:30Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Required Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at a minimum, all files which have changed OR a .diff of your changes, as you desire).&lt;br /&gt;
# A '''written report on the model testing''', indicating what your unit tests test (paying attention to edge cases where problems are more likely to occur) and the results of these tests. (The actual unit tests themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report on the view testing''', indicating what tests you performed, and what the results were. Screenshots taken throughout the test procedure are optional, but a very good idea to demonstrate what problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or the model) as a result of your testing. If there were failures or potential improvements discovered in either your tests, this report should include a re-run of the failed tests, showing that they are now working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  The &amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; buttons didn't appear naturally until one switched the focus TWICE after entering the amount.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25693</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25693"/>
		<updated>2009-10-12T18:07:42Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Required Results */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
# A '''.zip or .tgz archive''' containing the entire Buddi project (or at&lt;br /&gt;
a minimum, all files which have changed OR a .diff of your changes, as&lt;br /&gt;
you desire).&lt;br /&gt;
# A '''written report on the model testing''', indicating what your unit&lt;br /&gt;
tests test (paying attention to edge cases where problems are more&lt;br /&gt;
likely to occur) and the results of these tests. (The actual unit tests&lt;br /&gt;
themselves will be included in the archive in part a)&lt;br /&gt;
# A w'''ritten report on the view testing''', indicating what tests you&lt;br /&gt;
performed, and what the results were. Screenshots taken throughout the&lt;br /&gt;
test procedure are optional, but a very good idea to demonstrate what&lt;br /&gt;
problems (if any) you have found.&lt;br /&gt;
# '''A written report on what changes''' you have made to the view (or&lt;br /&gt;
the model) as a result of your testing. If there were failures or&lt;br /&gt;
potential improvements discovered in either your tests, this report&lt;br /&gt;
should include a re-run of the failed tests, showing that they are now&lt;br /&gt;
working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  The &amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; buttons didn't appear naturally until one switched the focus TWICE after entering the amount.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25692</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25692"/>
		<updated>2009-10-12T18:06:29Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Important Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
=== Required Results ===&lt;br /&gt;
&lt;br /&gt;
This project is more about QA and usability testing, rather than pure &lt;br /&gt;
development. While some coding may be required to enhance the view&lt;br /&gt;
layer, the vast majority of the code written will be in JUnit tests.&lt;br /&gt;
The following is required for your results:&lt;br /&gt;
a) A .zip or .tgz archive containing the entire Buddi project (or at&lt;br /&gt;
a minimum, all files which have changed OR a .diff of your changes, as&lt;br /&gt;
you desire).&lt;br /&gt;
b) A written report on the model testing, indicating what your unit&lt;br /&gt;
tests test (paying attention to edge cases where problems are more&lt;br /&gt;
likely to occur) and the results of these tests. (The actual unit tests&lt;br /&gt;
themselves will be included in the archive in part a)&lt;br /&gt;
c) A written report on the view testing, indicating what tests you&lt;br /&gt;
performed, and what the results were. Screenshots taken throughout the&lt;br /&gt;
test procedure are optional, but a very good idea to demonstrate what&lt;br /&gt;
problems (if any) you have found.&lt;br /&gt;
d) A written report on what changes you have made to the view (or&lt;br /&gt;
the model) as a result of your testing. If there were failures or&lt;br /&gt;
potential improvements discovered in either your tests, this report&lt;br /&gt;
should include a re-run of the failed tests, showing that they are now&lt;br /&gt;
working.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  The &amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; buttons didn't appear naturally until one switched the focus TWICE after entering the amount.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25691</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25691"/>
		<updated>2009-10-12T18:04:57Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Important Information */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
* Submission: October 23 (Friday)&lt;br /&gt;
* First Feedback: October 30 (Friday)&lt;br /&gt;
* Resubmission: November 6 (Friday)&lt;br /&gt;
* Final Review: November 9 (Monday)&lt;br /&gt;
* Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  The &amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; buttons didn't appear naturally until one switched the focus TWICE after entering the amount.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25690</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25690"/>
		<updated>2009-10-12T18:04:36Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Important Information ==&lt;br /&gt;
Submission: October 23 (Friday)&lt;br /&gt;
First Feedback: October 30 (Friday)&lt;br /&gt;
Resubmission: November 6 (Friday)&lt;br /&gt;
Final Review: November 9 (Monday)&lt;br /&gt;
Metareview: November 11 (Wednesday)&lt;br /&gt;
&lt;br /&gt;
E-mail for Buddi questions:&lt;br /&gt;
wyatt@digitalcave.ca or wyatt.olson+buddi-ncsu@gmail.com.&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  The &amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; buttons didn't appear naturally until one switched the focus TWICE after entering the amount.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25688</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25688"/>
		<updated>2009-10-12T17:56:30Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Unit Test for Buddi */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  The &amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; buttons didn't appear naturally until one switched the focus TWICE after entering the amount.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== References ==&lt;br /&gt;
&lt;br /&gt;
* [[Unit Test for Buddi]]&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25686</id>
		<title>CSC/ECE 517 Fall 2009/program2 buddi wn</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2009/program2_buddi_wn&amp;diff=25686"/>
		<updated>2009-10-12T17:55:13Z</updated>

		<summary type="html">&lt;p&gt;Tinydancer: /* Functionality */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''Buddi Project'''&lt;br /&gt;
&lt;br /&gt;
== Objectives ==&lt;br /&gt;
&lt;br /&gt;
=== Functionality ===&lt;br /&gt;
* Verify that '''splits''' in the data model have been implemented correctly. Ensure that the API wrapper functions allow transparent access to the model. Ensure that there are no edge cases where data corruption occurs. &lt;br /&gt;
* Refine and complete the '''view layer''', and verify that it works as desired in all cases.&lt;br /&gt;
&lt;br /&gt;
=== Testing ===&lt;br /&gt;
* Verify Model using JUnit.&lt;br /&gt;
There are already some model and API tests in the junit source folder - you can use these as a basis for creating more. You should construct some tests to only test the model, others to test the plugin API, and still others to verify that changes written to the API are accessible to the model (and vice-versa). &lt;br /&gt;
&lt;br /&gt;
Be sure to test the edge cases and exceptional input, for instance:&lt;br /&gt;
what happens if you try to split a transaction 1000 ways? &lt;br /&gt;
What happens if you try to include 0 splits? &lt;br /&gt;
What happens when you try to pass null to various setter methods? &lt;br /&gt;
&lt;br /&gt;
* Verify UI&lt;br /&gt;
Using your understanding gained from the model tests, you must construct written documents detailing what tests you are planning on doing, and how you plan to go about them. You must then carry out these tests, and document the results. In addition to data integrity, the view tests should include a usability component - is the way which split transactions are expressed intuitive? Are there better ways to do this?&lt;br /&gt;
&lt;br /&gt;
== Bugs or Undesired Behaviors ==&lt;br /&gt;
&lt;br /&gt;
{| class=&amp;quot;wikitable&amp;quot; border=&amp;quot;1&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
!  Title&lt;br /&gt;
!  Details&lt;br /&gt;
!  Actual Behavior&lt;br /&gt;
!  Expected Behavior&lt;br /&gt;
!  Solved&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  Create New menu&lt;br /&gt;
|  Undesired behavior. Create new options shouldn't be put under ''Edit'' menu. It's not intuitive for new users.   &lt;br /&gt;
|  Under My Accounts tab, Edit -&amp;gt; Create Account.&lt;br /&gt;
Under My Budget tab, Edit -&amp;gt; Create Budget Category.&lt;br /&gt;
|  Several options:&lt;br /&gt;
# Move to under File menu&lt;br /&gt;
# Create button for &amp;quot;New Account&amp;quot; and &amp;quot;New Budget Category&amp;quot;&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  The &amp;quot;+&amp;quot;, &amp;quot;-&amp;quot; buttons didn't appear naturally until one switched the focus TWICE after entering the amount.&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|-valign=&amp;quot;top&amp;quot;&lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|  &lt;br /&gt;
|&lt;br /&gt;
|  No&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
== [[Unit Test for Buddi]] ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Useful Links ==&lt;br /&gt;
# [http://devel.buddi.digitalcave.ca/en/ Buddi docs for Developers]&lt;br /&gt;
# [http://buddi.digitalcave.ca/ Buddi docs for Users]&lt;/div&gt;</summary>
		<author><name>Tinydancer</name></author>
	</entry>
</feed>