<?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=Skillam</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=Skillam"/>
	<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=Special:Contributions/Skillam"/>
	<updated>2026-05-17T06:14:49Z</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_2012/Table_Of_Contents&amp;diff=71273</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=71273"/>
		<updated>2012-11-29T22:47:13Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object Oriented Design (OOD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself Principle]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
The yield function in Ruby passes control to a user-defined code block. More about yield function is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w60_ac#The_yield.28.29_Function here].&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Databases and Migration==&lt;br /&gt;
&lt;br /&gt;
A Database&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Database&amp;lt;/ref&amp;gt; is a coherent collection of data with inherent meaning. Random assortment of data is not a database. Data is organized in order to model relevant aspects of reality, so that it supports processes requiring this data.&lt;br /&gt;
Data Migration is related to transfer of data between storage types, formats, or computer systems. This is performed programmatically to accomplish an automated migration so that humans are free from doing this repetitive task.&lt;br /&gt;
&lt;br /&gt;
A Database is nothing more than a collection of meaningful information.  Databases can be of multiple types, for example Distributed Databases, Relational Databases, Flat File Databases.  A database could be as simple as a text file with a list of names or it can even be very complex as a large relational database management system.&amp;lt;br /&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Banking Systems where accounts are maintained and it is made sure that money does not disappear as a result of system failure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Airline Reservation Systems where the plane details, the airport details and the customer details are maintained.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hotel Management Systems where the availability of rooms, the rates and the customer details are maintained.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief description about migrations in database is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Database_Migration here].&lt;br /&gt;
&lt;br /&gt;
Creation and updating migrations is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Creating_A_Migration here]. Creating a Standalone Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Creating_a_Standalone_Migration here].  &lt;br /&gt;
&lt;br /&gt;
Anatomy of migrations is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Anatomy_of_Migrations here].&lt;br /&gt;
&lt;br /&gt;
Relationship between Model and Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Relationship_between_Model_and_Migration here].&lt;br /&gt;
&lt;br /&gt;
Applying Migration to Development and Production is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Applying_Migration_to_Development here].&lt;br /&gt;
&lt;br /&gt;
How to run a specific migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Running_Specific_Migrations here].&lt;br /&gt;
&lt;br /&gt;
Rolling Back a Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Rolling_Back_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Problems_with_Migration Here] are the few problems with migration.&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Migration are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Advantages_of_Migration here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later. More about Command Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w52_an here].&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
&lt;br /&gt;
MVC Architecture is explained briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Model_View_Controller_.28MVC.29_Architecture here].&lt;br /&gt;
&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
Cookbook Application is a very basic Ruby on Rails application. It is a great way to understand the nuances that ‘Ruby’ has to offer. It is built keeping in mind that the reader is new to the world of ruby and is developing his/her first Ruby on Rails application. A sample Cookbook application is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Cookbook_Application here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71240</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71240"/>
		<updated>2012-11-25T23:44:11Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Conclusion */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with a good number of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
&lt;br /&gt;
Figure 6&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''-- [http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29 Coupling] refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
Benefits of low coupling are:&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Disadvantages==&lt;br /&gt;
&lt;br /&gt;
If the design is already done fat interfaces can be segregated using the [http://en.wikipedia.org/wiki/Adapter_pattern Adapter pattern].Like every principle Interface Segregation Principle is one principle which require additional time and effort spent to apply it during the design time and increase the complexity of code. But it produce a flexible design. If we are going to apply it more than is necessary it will result a code containing a lot of interfaces with single methods, so applying should be done based on experience and common sense in identifying the areas where extension of code are more likely to happens in the future.&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71239</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71239"/>
		<updated>2012-11-25T23:35:01Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Example 1 */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with a good number of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
&lt;br /&gt;
Figure 6&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''-- [http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29 Coupling] refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
Benefits of low coupling are:&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71238</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71238"/>
		<updated>2012-11-25T23:31:54Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Violation */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
&lt;br /&gt;
Figure 6&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''-- [http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29 Coupling] refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
Benefits of low coupling are:&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71237</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71237"/>
		<updated>2012-11-25T23:31:08Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Related Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices [1] and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.[5] This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
&lt;br /&gt;
Figure 6&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''-- [http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29 Coupling] refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
Benefits of low coupling are:&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71221</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=71221"/>
		<updated>2012-11-22T05:57:11Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Related Concepts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices [1] and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.[5] This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
&lt;br /&gt;
Figure 6&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''-- [http://en.wikipedia.org/wiki/Coupling_%28computer_programming%29 Coupling] refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
&amp;lt;t&amp;gt;Benefits of low coupling are:&amp;lt;\t&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70437</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70437"/>
		<updated>2012-11-19T01:24:24Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* The ATM User Interface Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices [1] and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.[5] This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
[[File:Capture5.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
&lt;br /&gt;
Figure 6&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''--Coupling refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
&amp;lt;t&amp;gt;Benefits of low coupling are:&amp;lt;\t&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70436</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70436"/>
		<updated>2012-11-19T01:23:06Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* The ATM User Interface Example */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices [1] and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.[5] This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
File:Capture5.PNG&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
&lt;br /&gt;
Figure 6&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
[[File:Capture6.PNG]]&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''--Coupling refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
&amp;lt;t&amp;gt;Benefits of low coupling are:&amp;lt;\t&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture6.PNG&amp;diff=70435</id>
		<title>File:Capture6.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture6.PNG&amp;diff=70435"/>
		<updated>2012-11-19T01:21:54Z</updated>

		<summary type="html">&lt;p&gt;Skillam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture5.PNG&amp;diff=70433</id>
		<title>File:Capture5.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture5.PNG&amp;diff=70433"/>
		<updated>2012-11-19T01:20:45Z</updated>

		<summary type="html">&lt;p&gt;Skillam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70432</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70432"/>
		<updated>2012-11-19T01:19:16Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Explanation of Interface Segregation Principle in Object Oriented Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices [1] and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.[5] This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
[[File:Capture3.PNG]]&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
 &lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''--Coupling refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
&amp;lt;t&amp;gt;Benefits of low coupling are:&amp;lt;\t&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture3.PNG&amp;diff=70431</id>
		<title>File:Capture3.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture3.PNG&amp;diff=70431"/>
		<updated>2012-11-19T01:18:27Z</updated>

		<summary type="html">&lt;p&gt;Skillam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70429</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70429"/>
		<updated>2012-11-19T01:17:53Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Explanation of Interface Segregation Principle in Object Oriented Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices [1] and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.[5] This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
&lt;br /&gt;
Figure-1&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2 given below.&lt;br /&gt;
&lt;br /&gt;
Figure-2&lt;br /&gt;
[[File:Capture4.PNG]]&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
 &lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''--Coupling refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
&amp;lt;t&amp;gt;Benefits of low coupling are:&amp;lt;\t&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture4.PNG&amp;diff=70428</id>
		<title>File:Capture4.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture4.PNG&amp;diff=70428"/>
		<updated>2012-11-19T01:14:14Z</updated>

		<summary type="html">&lt;p&gt;Skillam: uploaded a new version of &amp;amp;quot;File:Capture4.PNG&amp;amp;quot;: http://expertiza.csc.ncsu.edu/wiki/index.php/File:Capture4.PNG&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture4.PNG&amp;diff=70424</id>
		<title>File:Capture4.PNG</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=File:Capture4.PNG&amp;diff=70424"/>
		<updated>2012-11-19T01:07:01Z</updated>

		<summary type="html">&lt;p&gt;Skillam: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70422</id>
		<title>CSC/ECE 517 Fall 2012/ch2b 2w70 sm</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch2b_2w70_sm&amp;diff=70422"/>
		<updated>2012-11-19T01:05:37Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Explanation of Interface Segregation Principle in Object Oriented Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;'''''Interface Segregation Principle'''''&lt;br /&gt;
==Introduction==&lt;br /&gt;
&lt;br /&gt;
The ''Interface Segregation Principle''(also referred as ISP) states that &amp;quot;''Clients should not be forced to implement [http://en.wikipedia.org/wiki/Interface_%28computer_science%29 interfaces] they don't use''&amp;quot;. Instead of one fat interface many small interfaces are preferred based on groups of methods, each one serving one submodule.ISP focuses on the [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 cohesiveness] of interfaces with respect to the clients that use them.This principle alleviates the disadvantages of &amp;quot;fat&amp;quot; or &amp;quot;polluted&amp;quot; interfaces.The interface-segregation principle (ISP) is one of the five [http://en.wikipedia.org/wiki/Solid_%28object-oriented_design%29 SOLID] principles of Object-Oriented Design. ISP is very similar to [http://en.wikipedia.org/wiki/Cohesion_%28computer_science%29 high cohesion] principle of [http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29 GRASP].&lt;br /&gt;
&lt;br /&gt;
Two main ISP guidelines are: Classes should not be forced to depend on methods that they do not use, and the dependency of one class to another one should depend on the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
==Motivation==&lt;br /&gt;
&lt;br /&gt;
When we design an application we should take care how we are going to abstract a module which contains several submodules. Considering the module implemented by a class, we can have an abstraction of the system done in an interface. But if we want to extend our application adding another module that contains only some of the submodules of the original system, we are forced to implement the full interface and to write some dummy methods. Such an interface is named [http://en.wikipedia.org/wiki/Interface_bloat fat interface] or polluted interface. Having an interface pollution is not a good solution and might induce inappropriate behavior in the system.&lt;br /&gt;
&lt;br /&gt;
==Origin==&lt;br /&gt;
The ISP was first used and formulated by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] when doing some consulting for Xerox. Xerox had created a new printer system that could perform a variety of tasks like stapling a set of printed papers and faxing. The software for this system was created from the ground up and performed its tasks successfully. As the software grew, making modification became more and more difficult so that even the smallest change would take a redeployment cycle to an hour. This was making it near impossible to continue development.&lt;br /&gt;
&lt;br /&gt;
The main problem was that one main Job class was used by almost all of the tasks. Anytime a print job or a stapling job had to be done, a call was made to some method in the Job class.This means that the Job class was getting huge or 'fat', full of tons of different methods which were specific to a variety of different clients.Because of this design, a staple job would know about all the methods of the print job, even though there was no use for them.So whenever a developer had to change a small detail about a print job, every one of the classes that used the Job class would have to be recompiled.&lt;br /&gt;
&lt;br /&gt;
The solution suggested by Robert is called the Interface Segregation Principle today. His suggestion was that they add a layer of interfaces between the Job class and all of its clients. All of the dependencies could be reversed using the [http://en.wikipedia.org/wiki/Dependency_inversion_principle Dependency Inversion Principle].Instead of having one 'fat' Job class, a Staple Job interface or a Print Job interface was created that would be used by the Staple or Print classes, respectively, calling methods of the Job class.Therefore one interface is created for each job, and the Job class would inherit from all of these interfaces. This segregation of interfaces vastly decoupled the software allowing the clients like the Staple class to only depend on the methods it cared about.So when a developer made a change to the Print Job, the Staple Job would be unaffected and have no need to recompile.&lt;br /&gt;
&lt;br /&gt;
==Violation==&lt;br /&gt;
&lt;br /&gt;
The Xerox example is a clear violation of the Interface Segregation Principle, but not all violations are so clear cut. A more commonly known example is the ATM Transaction example given in Agile Software Development: Principles, Patterns, and Practices [1] and in an article also written by [http://en.wikipedia.org/wiki/Robert_C._Martin Robert C. Martin] specifically about the ISP.[5] This example is about an interface for the User Interface for an ATM, that handles all requests such as a deposit request, or a withdrawal request, and how this interface needs to be segregated into individual and more specific interfaces.&lt;br /&gt;
&lt;br /&gt;
==Explanation of Interface Segregation Principle in Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
Figure 1 shows a class which has three clients and one &amp;quot;fat&amp;quot; interface to serve them all. Whenever a change is made to one of the methods that ClientA calls,ClientB and ClientC may be affected. This is the disadvantage in following this method. Instead of following this procedure,the methods needed by each client can be placed in special interfaces that are specific to that particular client.&lt;br /&gt;
[[File:[[Media:Example.jpg]]]]&lt;br /&gt;
[[http://expertiza.csc.ncsu.edu/wiki/index.php/File:Capture2.PNG]]&lt;br /&gt;
Those interfaces are multiply inherited by the Service class, and implemented there.In this design,if the interface for ClientA needs to change, ClientB and ClientC will remain unaffected.This implementation is shown in figure 2.&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Example 1===&lt;br /&gt;
Some [http://en.wikipedia.org/wiki/Interface_%28computing%29 interfaces] are created with huge amount of functionalities. But when those interfaces are implemented by client implementor classes, not required functionalities are forced to be implemented, and so the code will have many dummy/empty implementations.&lt;br /&gt;
This situation can be prevented by seperating big interfaces into smaller ones. Only strictly related method definitions must be in the same interface. For a better design and usage,different types of functionalities must be placed in different interfaces.&lt;br /&gt;
Below is a wrong design that's not using Interface Segregation Principle:&lt;br /&gt;
&lt;br /&gt;
 public interface Animal {&lt;br /&gt;
    void fly();&lt;br /&gt;
    void run();&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Animal {&lt;br /&gt;
    public void bark() { /* do nothing */ }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Animal {&lt;br /&gt;
    public void fly() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void bark() { throw new Exception(&amp;quot;Undefined cat property&amp;quot;); }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Animal {&lt;br /&gt;
    public void fly() { }&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This above example uses interfaces where three different functions are defined but few are not being used.Below is the implementation which uses ISP:&lt;br /&gt;
&lt;br /&gt;
 public interface Flyable {&lt;br /&gt;
    void fly();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Runnable {&lt;br /&gt;
    void run();&lt;br /&gt;
 }&lt;br /&gt;
 public interface Barkable {&lt;br /&gt;
    void bark();&lt;br /&gt;
 }&lt;br /&gt;
 public class Bird implements Flyable, Runnable {&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the bird&lt;br /&gt;
    }&lt;br /&gt;
    public void fly() {&lt;br /&gt;
        // write code about flying of the bird&lt;br /&gt;
    } &lt;br /&gt;
 }&lt;br /&gt;
 public class Cat implements Runnable{&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the cat&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 public class Dog implements Runnable, Barkable {&lt;br /&gt;
    public void bark() {  &lt;br /&gt;
        // write code about barking of the dog&lt;br /&gt;
    }&lt;br /&gt;
    public void run() {&lt;br /&gt;
        // write code about running of the dog&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===Example 2===&lt;br /&gt;
The following code violates ISP shows the outline of three classes:&lt;br /&gt;
&lt;br /&gt;
 public class Contact&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(Contact contact, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using contact's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
     &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(Contact contact)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of contact&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
The Contact class represents a person or business that can be contacted. The class holds the person's name, address, email address and telephone number. The Emailer class sends email messages to contacts. The contact and the subject and body of the email are passed to the parameters. The Dialler class extracts the telephone number from the Contact and calls it using an automatic dialling system.&lt;br /&gt;
The Emailer class is a client of the Contact class. Although it only requires access to the Name and EmailAddress properties, it is aware of other members too. Similarly, the Dialler class uses a single property, &amp;quot;Telephone&amp;quot;. However, it has access to the entire Contact interface.&lt;br /&gt;
To refactor the code to comply with the ISP we need to hide unused members from the client classes. We can achieve this by introducing two new interfaces, both implemented by Contact. The IEmailable interface defines properties that hold the name and email address of an object that can receive email. The IDiallable interface includes only a Telephone property, which is enough to allow client classes to call the telephone number of a target object.&lt;br /&gt;
&lt;br /&gt;
The Email class is updated, replacing the Contact dependency with an IEmailable object. Similarly, the Dialler's dependency becomes an IDiallable instance. Both classes now interact with contacts using the smallest possible interface.&lt;br /&gt;
&lt;br /&gt;
With smaller interfaces it is easier to introduce new classes that implement them. To demonstrate, the refactored code includes a new class named &amp;quot;MobileEngineer&amp;quot;. This represents engineers that visit customer sites. Engineer has properties for a name, telephone number and vehicle registration. The class implements IDiallable so that the Dialler object can call engineers.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 public interface IEmailable&lt;br /&gt;
 {&lt;br /&gt;
    string Name { get; set; }&lt;br /&gt;
    string EmailAddress { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public interface IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Contact : IEmailable, IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Address { get; set; }&lt;br /&gt;
    public string EmailAddress { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class MobileEngineer : IDiallable&lt;br /&gt;
 {&lt;br /&gt;
    public string Name { get; set; }&lt;br /&gt;
    public string Vehicle { get; set; }&lt;br /&gt;
    public string Telephone { get; set; }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Emailer&lt;br /&gt;
 {&lt;br /&gt;
    public void SendMessage(IEmailable target, string subject, string body)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to send email, using target's email address and name&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 public class Dialler&lt;br /&gt;
 {&lt;br /&gt;
    public void MakeCall(IDiallable target)&lt;br /&gt;
    {&lt;br /&gt;
        // Code to dial telephone number of target&lt;br /&gt;
    }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
===The ATM User Interface Example===&lt;br /&gt;
&lt;br /&gt;
Consider a traditional Automated Teller Machine (ATM) problem. The user interface of an ATM machine needs to be very flexible.The output may need to be translated into many different languages. It may need to be presented on a screen, or on a braille tablet, or spoken out a speech synthesizer.This can be achieved by creating an abstract base class that has pure virtual functions for all the&lt;br /&gt;
different messages that need to be presented by the interface.&lt;br /&gt;
&lt;br /&gt;
Figure5&lt;br /&gt;
&lt;br /&gt;
 interface ATM_UI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 public class BrailleUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class ScreenUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
 public class SpeechUI implements ATM_UI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Also consider that each different transaction that the ATM can perform is encasulated as a derivative of the class Transaction. So, we might have classes such as DepositTransaction,WithdrawlTransaction, TransferTransaction, etc. Each of these objects issues message to the UI. For example, the DepositTransaction object calls the RequestDepositAmount member function of the UI class. Whereas the TransferTransaction object calls the RequestTransferAmount member function of UI. This corresponds to the diagram in Figure 6.&lt;br /&gt;
 &lt;br /&gt;
 interface Transaction {&lt;br /&gt;
  void execute();&lt;br /&gt;
 }&lt;br /&gt;
 class DepositTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.deposit(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class WithdrawalTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, acct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
 class TransferTransaction implements Transaction {&lt;br /&gt;
  void execute() {&lt;br /&gt;
    atm.withdraw(amt, fromAcct, toAcct);&lt;br /&gt;
  }&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
This is precicely the situation that the ISP tells us to avoid. Each of the transactions is using a portion of the UI that no other object uses. This creates the possibility that changes to one of the derivatives of Transaction will force coresponding change to the UI, thereby affecting all the other derivatives of Transaction, and every other class that&lt;br /&gt;
depends upon the UI interface.&lt;br /&gt;
This unfortunate coupling can be avoided by segregating the UI interface into induvidual abstract base classes such as DepositUI, WithdrawUI and TransferUI. These abstract base classes can then be multiply inherited into the final UI abstract class. Figure&lt;br /&gt;
7 show this model.&lt;br /&gt;
&lt;br /&gt;
Figure 7&lt;br /&gt;
&lt;br /&gt;
 interface DepositUI {&lt;br /&gt;
  void deposit(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface WithdrawalUI {&lt;br /&gt;
  void withdraw(double amt, double account);&lt;br /&gt;
 }&lt;br /&gt;
 interface TransferUI {&lt;br /&gt;
  void transfer(double amt, double fromAccount, double toAccount);&lt;br /&gt;
 }&lt;br /&gt;
 interface ATM_UI extends DepositUI, WithdrawalUI, TransferUI {&lt;br /&gt;
  ...&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
==Related Concepts==&lt;br /&gt;
The following concepts are related to this one:&lt;br /&gt;
&lt;br /&gt;
*''Low coupling''--Coupling refers to the relationship of a module with another module. A module is said to be highly coupled with   another module if changes to it will result to changes to the other module. And a module is said to be loosely coupled if a module is independent of any other modules. This can be achieved by having a stable interface that effectively hides the implementation of another module. &lt;br /&gt;
&amp;lt;t&amp;gt;Benefits of low coupling are:&amp;lt;\t&amp;gt;&lt;br /&gt;
&lt;br /&gt;
1.maintainability – changes are confined in a single module&lt;br /&gt;
&lt;br /&gt;
2.testability – modules involved in unit testing can be limited to a minimum&lt;br /&gt;
&lt;br /&gt;
3.readability – classes that need to be analyzed are kept at a minimum&lt;br /&gt;
&lt;br /&gt;
*''High cohesion''--Cohesion refers to the measure of how strongly-related the functions of a module are. Low cohesion refers to modules that have different unrelated responsibilities. High cohesion refers to modules that have functions that are similar in many aspects.&lt;br /&gt;
Benefits of high cohesion are:&lt;br /&gt;
&lt;br /&gt;
1.Readability – (closely) related functions are contained in a single module&lt;br /&gt;
&lt;br /&gt;
2.Maintainability – debugging tends to be contained in a single module&lt;br /&gt;
&lt;br /&gt;
3.Reusability – classes that have concentrated functionalities are not polluted with useless functions&lt;br /&gt;
&lt;br /&gt;
*''Liskov Substitution Principle (LSP)''--Liskov Substitution principle (LSP) states that &amp;quot;Methods that use references to the base classes must be able to use the objects of the derived classes without knowing it&amp;quot;.This principle was written by [http://en.wikipedia.org/wiki/Barbara_Liskov Barbara Liskov] in 1988.The idea here is that the subtypes must be replaceable for the super type references without affecting the program execution.&lt;br /&gt;
&lt;br /&gt;
==Advantages==&lt;br /&gt;
&lt;br /&gt;
*Reduces coupling within the system.&lt;br /&gt;
*Reduces unwanted side effects&lt;br /&gt;
*Reusability is increased&lt;br /&gt;
&lt;br /&gt;
==Conclusion==&lt;br /&gt;
&lt;br /&gt;
ISP is a software development principle used for clean development and intends to make software easy-to-change.ISP helps developers to change, refactor and redeploy their code easily.ISP splits interfaces which are very large into smaller and more specific ones so that clients will only have to know about the methods that are of interest to them. In a nutshell, no client should be forced to depend on methods it does not use.&lt;br /&gt;
&lt;br /&gt;
==References==&lt;br /&gt;
&lt;br /&gt;
http://codebalance.blogspot.com/2010/09/oop-solid-rules-interface-segregation.html&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Interface_segregation_principle&lt;br /&gt;
&lt;br /&gt;
http://500internalservererror.wordpress.com/2009/02/23/what-do-low-coupling-and-high-cohesion-mean-what-does-the-principle-of-encapsulation-mean/&lt;br /&gt;
&lt;br /&gt;
http://blog.sanaulla.info/2011/11/28/solid-liskov-substitution-principle/&lt;br /&gt;
&lt;br /&gt;
http://www.blackwasp.co.uk/ISP.aspx&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/User:LupusDei108/Interface_Segregation_Principle&lt;br /&gt;
&lt;br /&gt;
http://www.oodesign.com/interface-segregation-principle.html&lt;br /&gt;
&lt;br /&gt;
http://www.john-thompson.org/IT/Default.aspx?Path=IT/0200~Architecture/0350~Principles/Interface%20Segregation&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/Principles_and_Patterns.pdf&lt;br /&gt;
&lt;br /&gt;
http://www.objectmentor.com/resources/articles/isp.pdf&lt;br /&gt;
&lt;br /&gt;
http://stefanroock.files.wordpress.com/2011/09/solidforyourlanguage.pdf&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69855</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69855"/>
		<updated>2012-11-17T09:12:27Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* CRC Cards */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
The yield function in Ruby passes control to a user-defined code block. More about yield function is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w60_ac#The_yield.28.29_Function here].&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Databases and Migration==&lt;br /&gt;
&lt;br /&gt;
A Database&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Database&amp;lt;/ref&amp;gt; is a coherent collection of data with inherent meaning. Random assortment of data is not a database. Data is organized in order to model relevant aspects of reality, so that it supports processes requiring this data.&lt;br /&gt;
Data Migration is related to transfer of data between storage types, formats, or computer systems. This is performed programmatically to accomplish an automated migration so that humans are free from doing this repetitive task.&lt;br /&gt;
&lt;br /&gt;
A Database is nothing more than a collection of meaningful information.  Databases can be of multiple types, for example Distributed Databases, Relational Databases, Flat File Databases.  A database could be as simple as a text file with a list of names or it can even be very complex as a large relational database management system.&amp;lt;br /&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Banking Systems where accounts are maintained and it is made sure that money does not disappear as a result of system failure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Airline Reservation Systems where the plane details, the airport details and the customer details are maintained.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hotel Management Systems where the availability of rooms, the rates and the customer details are maintained.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief description about migrations in database is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Database_Migration here].&lt;br /&gt;
&lt;br /&gt;
Creation and updating migrations is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Creating_A_Migration here]. Creating a Standalone Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Creating_a_Standalone_Migration here].  &lt;br /&gt;
&lt;br /&gt;
Anatomy of migrations is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Anatomy_of_Migrations here].&lt;br /&gt;
&lt;br /&gt;
Relationship between Model and Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Relationship_between_Model_and_Migration here].&lt;br /&gt;
&lt;br /&gt;
Applying Migration to Development and Production is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Applying_Migration_to_Development here].&lt;br /&gt;
&lt;br /&gt;
How to run a specific migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Running_Specific_Migrations here].&lt;br /&gt;
&lt;br /&gt;
Rolling Back a Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Rolling_Back_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Problems_with_Migration Here] are the few problems with migration.&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Migration are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Advantages_of_Migration here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later. More about Command Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w52_an here].&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
&lt;br /&gt;
MVC Architecture is explained briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Model_View_Controller_.28MVC.29_Architecture here].&lt;br /&gt;
&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
Cookbook Application is a very basic Ruby on Rails application. It is a great way to understand the nuances that ‘Ruby’ has to offer. It is built keeping in mind that the reader is new to the world of ruby and is developing his/her first Ruby on Rails application. A sample Cookbook application is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Cookbook_Application here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69854</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69854"/>
		<updated>2012-11-17T09:11:45Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Databases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
The yield function in Ruby passes control to a user-defined code block. More about yield function is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w60_ac#The_yield.28.29_Function here].&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Databases and Migration==&lt;br /&gt;
&lt;br /&gt;
A Database&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Database&amp;lt;/ref&amp;gt; is a coherent collection of data with inherent meaning. Random assortment of data is not a database. Data is organized in order to model relevant aspects of reality, so that it supports processes requiring this data.&lt;br /&gt;
Data Migration is related to transfer of data between storage types, formats, or computer systems. This is performed programmatically to accomplish an automated migration so that humans are free from doing this repetitive task.&lt;br /&gt;
&lt;br /&gt;
A Database is nothing more than a collection of meaningful information.  Databases can be of multiple types, for example Distributed Databases, Relational Databases, Flat File Databases.  A database could be as simple as a text file with a list of names or it can even be very complex as a large relational database management system.&amp;lt;br /&amp;gt;&lt;br /&gt;
Examples:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Banking Systems where accounts are maintained and it is made sure that money does not disappear as a result of system failure.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Airline Reservation Systems where the plane details, the airport details and the customer details are maintained.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;li&amp;gt;Hotel Management Systems where the availability of rooms, the rates and the customer details are maintained.&amp;lt;/li&amp;gt;&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
&lt;br /&gt;
A brief description about migrations in database is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Database_Migration here].&lt;br /&gt;
&lt;br /&gt;
Creation and updating migrations is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Creating_A_Migration here]. Creating a Standalone Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Creating_a_Standalone_Migration here].  &lt;br /&gt;
&lt;br /&gt;
Anatomy of migrations is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Anatomy_of_Migrations here].&lt;br /&gt;
&lt;br /&gt;
Relationship between Model and Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Relationship_between_Model_and_Migration here].&lt;br /&gt;
&lt;br /&gt;
Applying Migration to Development and Production is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Applying_Migration_to_Development here].&lt;br /&gt;
&lt;br /&gt;
How to run a specific migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Running_Specific_Migrations here].&lt;br /&gt;
&lt;br /&gt;
Rolling Back a Migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Rolling_Back_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Problems_with_Migration Here] are the few problems with migration.&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Migration are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w62_rb#Advantages_of_Migration here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later. More about Command Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w52_an here].&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
&lt;br /&gt;
MVC Architecture is explained briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Model_View_Controller_.28MVC.29_Architecture here].&lt;br /&gt;
&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
Cookbook Application is a very basic Ruby on Rails application. It is a great way to understand the nuances that ‘Ruby’ has to offer. It is built keeping in mind that the reader is new to the world of ruby and is developing his/her first Ruby on Rails application. A sample Cookbook application is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Cookbook_Application here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69853</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69853"/>
		<updated>2012-11-17T09:01:04Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Metaprogramming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
The yield function in Ruby passes control to a user-defined code block. More about yield function is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w60_ac#The_yield.28.29_Function here].&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Databases==&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later. More about Command Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w52_an here].&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
&lt;br /&gt;
MVC Architecture is explained briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Model_View_Controller_.28MVC.29_Architecture here].&lt;br /&gt;
&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
Cookbook Application is a very basic Ruby on Rails application. It is a great way to understand the nuances that ‘Ruby’ has to offer. It is built keeping in mind that the reader is new to the world of ruby and is developing his/her first Ruby on Rails application. A sample Cookbook application is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Cookbook_Application here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69852</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69852"/>
		<updated>2012-11-17T09:00:36Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
The yield function in Ruby passes control to a user-defined code block. More about yield function is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w60_ac#The_yield.28.29_Function here].&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later. More about Command Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w52_an here].&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
&lt;br /&gt;
MVC Architecture is explained briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Model_View_Controller_.28MVC.29_Architecture here].&lt;br /&gt;
&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
Cookbook Application is a very basic Ruby on Rails application. It is a great way to understand the nuances that ‘Ruby’ has to offer. It is built keeping in mind that the reader is new to the world of ruby and is developing his/her first Ruby on Rails application. A sample Cookbook application is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Cookbook_Application here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69851</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69851"/>
		<updated>2012-11-17T08:57:01Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Model-View-Controller */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later. More about Command Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w52_an here].&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
&lt;br /&gt;
MVC Architecture is explained briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Model_View_Controller_.28MVC.29_Architecture here].&lt;br /&gt;
&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
Cookbook Application is a very basic Ruby on Rails application. It is a great way to understand the nuances that ‘Ruby’ has to offer. It is built keeping in mind that the reader is new to the world of ruby and is developing his/her first Ruby on Rails application. A sample Cookbook application is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w38_nm#Cookbook_Application here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69849</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69849"/>
		<updated>2012-11-17T08:50:22Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later. More about Command Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w52_an here].&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69848</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69848"/>
		<updated>2012-11-17T08:48:30Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Metaprogramming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w57_mp#Metaprogramming_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later.&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69847</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69847"/>
		<updated>2012-11-17T08:45:34Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. In Ruby, everything is an object and every operation is a method call on some object. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
Objects in Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w55_ms#Objects_In_Ruby here].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later.&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69846</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69846"/>
		<updated>2012-11-17T08:22:52Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later.&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
The ''Active Record pattern'' is a [http://en.wikipedia.org/wiki/Software_design_pattern Design pattern] in Software Engineering which deals with the approach to store and access data in a database.A brief introduction on Active Record  Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Introduction here].&lt;br /&gt;
&lt;br /&gt;
Naming conventions for Active Record Pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Naming here].&lt;br /&gt;
&lt;br /&gt;
CRUD stands for '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Create Create]', '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Read Read]' , '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Update Update]' and '[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Delete Delete]'. These are the four basic operations which are generally performed on tables in a database. The ActiveRecord module provides predefined methods for the basic CRUD operations for the model.&lt;br /&gt;
&lt;br /&gt;
Details about how you connect to the databaseis given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Connecting_to_the_Database here].&lt;br /&gt;
&lt;br /&gt;
Migrations help to version the various changes made to databases. It also allow developers to track a set of changes made to production or development databases and to rollback to a previous version if needed. Building a migration is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#Building_a_Migration here].&lt;br /&gt;
&lt;br /&gt;
Associations are used to connect two models. The association is used to describe the role of relations that models are having with each other. ActiveRecord associations can be used to describe one-to-one (1:1), one-to-many (1:n) and many-to-many (n:m) relationships between models. Associations are used to make common operations simpler and easier in your code. Rails supports six types of associations:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#belongs_to_Association belongs_to]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_Association has_one]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_Association has_many]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_many_:through_Association has_many :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_one_:through_Association has_one :through]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w63_dv#has_and_belongs_to_many_Association has_and_belongs_to_many] &lt;br /&gt;
&lt;br /&gt;
belongs_to and has_one form a one-to-one relationship. has_one :through is a different way to create a one-to-one relationship. has_many and belongs_to form a one-to-many relation. has_and_belongs_to_many or an alternative way has_many :through to create a many-to-many relationship&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69845</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69845"/>
		<updated>2012-11-17T08:02:08Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Behavior-Driven Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later.&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
Some of the Patterns that are more commonly used with Ruby are explained below.&lt;br /&gt;
&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
'''Cucumber''' is one of the latest additions to the RSpec family of tools for testing in Ruby. Testing is one of the most important parts of the Ruby culture. It allows programmers and software development teams to describe feature based tests in plain text definitions known as &amp;quot;stories&amp;quot;. This text is written in a business readable [http://en.wikipedia.org/wiki/Domain-specific_language domain-specific language(DSL)], most widely used is [https://github.com/cucumber/cucumber/wiki/Gherkin '''Gherkin'''], although you can use testing environment specific languages also like the Capbara DSL&lt;br /&gt;
&lt;br /&gt;
Though Cucumber is a testing tool, the main intent of its development is to support Behavior Driven Development(BDD) which is derived from Test Driven Development. This implies that the tests written in DSL are typically written before any other part of the code is written. It is analysed by the non technical stakeholders and then the production code is written. The production code is thus written outside-in, in such a way that the tests pass. &lt;br /&gt;
&lt;br /&gt;
Cucumber provides support for a wide range of Ruby virtual machines such as [http://en.wikipedia.org/wiki/JRuby JRuby], alternative application frameworks such as [http://www.sinatrarb.com/ Sinatra], other programming languages such as [http://www.python.org Python], test environments such as Capybara and provides [http://www.debian.org/doc/manuals/intro-i18n/ i18n] language support for feature and step files. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''Capybara''' is a testing environment that simulates the manner in which a real world user would interact with the application. It requires no explicit setup for [http://en.wikipedia.org/wiki/Ruby_on_Rails Rails] applications. The most powerful feature of Capybara is that it has a very intuitive application program interface that understands any language an actual user would use. With the libraries and drivers provided by Capybara for deploying web applications and for interacting with service applications, the testing requires minimum amount of coding.&lt;br /&gt;
&lt;br /&gt;
A brief history about Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#History_and_the_need_for_development here].&lt;br /&gt;
&lt;br /&gt;
Setting up Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Cucumber here].&lt;br /&gt;
&lt;br /&gt;
Cucumber testing comprises of two components namely:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Features Features]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Step_Definitions Step Definitions]&lt;br /&gt;
&lt;br /&gt;
Setting up Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Setting_up_Capybara here].&lt;br /&gt;
&lt;br /&gt;
An example of running Cucumber tests on Capybara is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Example_of_running_Cucumber_tests_on_Capybara here].&lt;br /&gt;
&lt;br /&gt;
The advantages of Cucumber are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w71_gs#Advantages here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69844</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69844"/>
		<updated>2012-11-17T07:44:17Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object Oriented Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Subclassing is a principle of creating a specialization(subclass/ [http://msdn.microsoft.com/en-us/library/chsw0hdc.aspx]) of a [http://www.webopedia.com/TERM/B/base_class.html base class](superclass/ parent class) by inheriting the methods and instance data from the base class.&lt;br /&gt;
Subclassing is one of the significant features of [http://en.wikipedia.org/wiki/Object-oriented_programming OO programming], which greatly increases the reusability of classes and also minimizes duplication of code. A subclass usually inherits some properties from a super class. [http://en.wikipedia.org/wiki/Inheritance Inheritance] is a design principle in object oriented languages like Java. The reason behind  inheritance is to reuse the code of existing objects or establish a subtype from an object. This greatly improves the efficiency and makes the code more readable as methods which are written only once can be used by a lot of subclasses. A superclass consists of common features that can be extended over subclasses. Superclass and subclass are commonly called base and derived class. The relationship between a subclass and superclass can be represented by a simple UML diagram as shown below. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;[[File:UML_Subclass.jpg]]&lt;br /&gt;
&lt;br /&gt;
Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
Advantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Reusability Reusability]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Polymorphism Polymorphism]&lt;br /&gt;
&lt;br /&gt;
Disadvantages of subclassing:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Tight_Coupling Tight coupling]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Using_subclassing_solely_for_code_reuse Using subclassing solely for code reuse]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w46_sm#Multiple_Inheritance_Problem Multiple Inheritance Problem]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later.&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
Some of the Patterns that are more commonly used with Ruby are explained below.&lt;br /&gt;
&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69577</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69577"/>
		<updated>2012-11-16T14:00:04Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice&amp;quot;'' - [http://www.patternlanguage.com/leveltwo/ca.htm Christopher Alexander]&lt;br /&gt;
&lt;br /&gt;
''&amp;quot;In software engineering, a design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&amp;quot;.''&lt;br /&gt;
&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Design_Patterns Design Pattern] is a template to solve a problem which can be used in many different situations. It names, abstracts and identifies the key aspects of a common design structure that makes it useful for creating a reusable object - oriented design. Design Patterns in [http://en.wikipedia.org/wiki/Object-oriented_programming Object - Oriented Languages] help show the relationship between the different classes and objects in the program. Design Patterns are tools for building software.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A design pattern is a general reusable solution to a commonly occurring problem within a given context in software design&lt;br /&gt;
&lt;br /&gt;
The different types of design patterns can be categorized and listed as below:&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Creational_pattern Creational Pattern], which help create the objects for the user, instead of having the user to instantiate the object.&lt;br /&gt;
* [http://www.oodesign.com/factory-pattern.html'''''Factory Pattern'''''], which allows a class to defer instantiation to subclasses. &lt;br /&gt;
* [http://www.oodesign.com/abstract-factory-pattern.html'''''Abstract Factory Pattern'''''], which provides an interface for creating related or dependent objects without specifying the objects' concrete classes.&lt;br /&gt;
* [http://www.oodesign.com/builder-pattern.html'''''Builder Pattern'''''], which separates the construction of a complex object from its representation so that the same construction process can create different representation. &lt;br /&gt;
* [http://www.oodesign.com/prototype-pattern.html'''''Prototype Pattern'''''], which specifies the kind of object to create using a prototypical instance, and creates new objects by cloning this prototype. &lt;br /&gt;
* [http://www.oodesign.com/singleton-pattern.html'''''Singleton Pattern'''''], which ensures that only one instance of a class is created and provides a global access point to the object. &lt;br /&gt;
[http://en.wikipedia.org/wiki/Structural_pattern Structural Pattern], which employ interfaces to achieve inheritance to enable objects to obtain new functionality.&lt;br /&gt;
* [http://www.oodesign.com/adapter-pattern.html'''''Adapter Pattern'''''], which 'adapts' one interface for a class into one that a client expects.&lt;br /&gt;
* [http://www.oodesign.com/bridge-pattern.html'''''Bridge Pattern'''''], which decouples an abstraction from its implementation so that the two can vary independently.&lt;br /&gt;
* [http://www.oodesign.com/composite-pattern.html'''''Composite Pattern'''''], which represents a tree structure of objects where every object has the same interface.&lt;br /&gt;
* [http://www.oodesign.com/decorator-pattern.html'''''Decorator Pattern'''''], which adds additional functionality to a class at runtime where subclassing would result in an exponential rise of new classes&lt;br /&gt;
* [http://sourcemaking.com/design_patterns/facade'''''Facade Pattern'''''], which creates a simplified interface of an existing interface to ease usage for common tasks.&lt;br /&gt;
* [http://www.oodesign.com/flyweight-pattern.html'''''Flyweight Pattern'''''], where a high quantity of objects share a common properties object to save space.&lt;br /&gt;
* [http://www.oodesign.com/proxy-pattern.html'''''Proxy Pattern'''''], where a class functions as an interface to another thing.&lt;br /&gt;
[http://en.wikipedia.org/wiki/Behavioral_pattern Behavioral Pattern], which are concerned with communication between objects.&lt;br /&gt;
* [http://www.oodesign.com/command-pattern.html'''''Command Pattern'''''], which enables to pass around the code that needs to be executed later.&lt;br /&gt;
* [http://www.oodesign.com/chain-of-responsibility-pattern.html'''''Chain of Responsibility Pattern'''''], where command objects are handled or passed on to other objects by logic-containing processing objects.&lt;br /&gt;
* [http://www.oodesign.com/interpreter-pattern.html'''''Interpreter Pattern'''''], which implements a specialized computer language to rapidly solve a specific set of problems.&lt;br /&gt;
* [http://www.oodesign.com/iterator-pattern.html'''''Iterator Pattern'''''], where iterators are used to access the elements of an aggregate object sequentially without exposing its underlying representation.&lt;br /&gt;
* [http://www.oodesign.com/mediator-pattern.html'''''Mediator Pattern'''''], which provides a unified interface to a set of interfaces in a subsystem.&lt;br /&gt;
* [http://www.oodesign.com/memento-pattern.html'''''Memento Pattern'''''], which provides the ability to restore an object to its previous state (rollback).&lt;br /&gt;
* [http://www.oodesign.com/observer-pattern.html'''''Observer Pattern'''''], is similar to Publish/Subscribe or Event Listener. Objects register to observe an event that may be raised by another object. &lt;br /&gt;
* [http://sourcemaking.com/design_patterns/state'''''State Pattern'''''], is a clean way for an object to partially change its type at runtime.&lt;br /&gt;
* [http://www.oodesign.com/strategy-pattern.html'''''Strategy Pattern'''''], where Algorithms can be selected on the fly.&lt;br /&gt;
* [http://www.oodesign.com/template-method-pattern.html'''''Template Pattern'''''], which describes the program skeleton of a program.&lt;br /&gt;
* [http://www.oodesign.com/visitor-pattern.html'''''Visitor Pattern'''''], is a way to separate an algorithm from an object.&lt;br /&gt;
&lt;br /&gt;
Some of the Patterns that are more commonly used with Ruby are explained below.&lt;br /&gt;
&lt;br /&gt;
Little about design patterns in Ruby is explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Creational_Patterns here].&lt;br /&gt;
&lt;br /&gt;
A Comparison table for singleton,adapter,command and strategy pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w42_js#Comparison_of_the_different_Design_Patterns here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69576</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69576"/>
		<updated>2012-11-16T13:56:14Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Metaprogramming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69575</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69575"/>
		<updated>2012-11-16T13:53:33Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
Forms in web applications are an essential interface for user input. However, form markup can quickly become tedious to write and maintain because of form control naming and their numerous attributes. Rails deals away with these complexities by providing view helpers for generating form markup.[1] Rails provides excellent features to create forms and gather user input. Forms in Rails are an effective way to obtain user input in a convenient manner. Forms can include different types of data fields that will help obtain different types of data. For example, Text box can fetch a few words from the user and Text Area, a paragraph. Forms are embedded in a Web Application and are very user-friendly. Forms in Rails also have in-built functionalities to verify the data the user enters, validate it using a set of predefined rules, display corresponding error messages(in case of non-compliance) and storing the information in the database if it passes validation. &lt;br /&gt;
&lt;br /&gt;
Detailed description about creating forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Creating_a_Form here].&lt;br /&gt;
The [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Actions action] attribute in Rails Forms specifies what to do when a Form is submitted.&lt;br /&gt;
&lt;br /&gt;
In rails,routes are used to automatically direct a HTTP request to the appropriate controller action.&lt;br /&gt;
With the help of routes one can easily name and configure a URL path i.e the routing engine can figure out where to go and which action to invoke for a given URL. This also works in reverse, which in turn reduces the rigidness in your application structure.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Views Views] are used to render forms or data to the user. It displays only necessary information and hides internal workings from the user. In views it is more about presentation of data than the data itself. More focus is given to layout and template so as to make it easily readable for the end user. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Helpers Helpers] can be used to define any piece of code which will be called many times by the view. Helper methods mainly are used to provide functionality in the views. Also default helper programs can used for otherwise cumbersome to implement functions like date etc&lt;br /&gt;
&lt;br /&gt;
General steps to create forms and things to do with forms is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#Things_to_do_with_forms here].&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w66_as#What_does_a_form_look_like.3F Here] is a sample form.&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69574</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69574"/>
		<updated>2012-11-16T13:41:19Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Setting up testing environment for Rails is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Setup_test_environment_in_Rails here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w39_sn#Fixtures Fixtures] are used for testing in Rails.&lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69573</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69573"/>
		<updated>2012-11-16T13:37:02Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Metaprogramming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
Metaprogramming is the writing of computer programs that write or manipulate other programs (or themselves) as their data, or that do part of the work at compile time that would otherwise be done at runtime. In some cases, this allows programmers to minimize the number of lines of code to express a solution (hence reducing development time), or it gives programs greater flexibility to efficiently handle new situations without recompilation. Typically, you use a metaprogram to eliminate or reduce a tedious or error-prone programming task. So, for example, instead of writing a machine code program by hand, you would use a high-level language, such as C, and then let the C compiler do the translation to the equivalent low-level machine instructions.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_Example Here] is a metaprogramming example.&lt;br /&gt;
&lt;br /&gt;
[http://www.sitepoint.com/typing-versus-dynamic-typing/ Statically typed languages] are those which define and enforce types at compile-time. Statically typed languages typically have clearly distinct compile-time and run-time phases, with program code converted by a compiler into a binary executable which is then run separately. Dynamically typed languages have distinct compilation and execution phases and therefore we  use the terms compile-time and run-time identically for both statically and dynamically typed languages. In most dynamically typed languages (e.g. Ruby, Perl, and Python) ‘running’ a file both compiles and executes it.&lt;br /&gt;
&lt;br /&gt;
Metaprogramming in dynamically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Metaprogramming_in_Dynamically_Typed_Languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of metaprogramming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w53_kc#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69572</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69572"/>
		<updated>2012-11-16T13:31:51Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object-Relational Mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Metaprogramming==&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69571</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69571"/>
		<updated>2012-11-16T13:28:28Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Scaffolding */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Refactoring==&lt;br /&gt;
&lt;br /&gt;
Refactoring is a technique for restructuring existing code. It is defined as altering the code's internal structure without changing its external behavior. It is done as a series of small transformations which together produce significant restructuring. Since each transformation is small, it's less likely to go wrong. The system is also kept fully working after each small transformation, reducing the chances that a system can get seriously broken during the restructuring.When people make small changes to the code without fully understanding its design, the code loses its structure, which eventually has a cumulative effect. If the developer cannot understand the code design, then it becomes more difficult for him to preserve it. Timely refactoring helps the code to retain its shape. &lt;br /&gt;
Automated refactoring refers to refactoring which is under the developers control. What we mean by this is that, the system is not responsible for deciding what refactoring is required, rather this is the job of the developer. Automated refactoring is a feature of most widely used IDE's today, which helps expedite the task of refactoring for the developers. &lt;br /&gt;
In this article, we are aiming at describing the various techniques for automated refactoring. This article gives a clear understanding of these techniques which are illustrated with examples. We have also given a comparison of the refactoring functionality provided by various frequently used IDE's. &lt;br /&gt;
&lt;br /&gt;
Common Refactoring Techniques are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Extraction_Refactoring Extraction Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Inline_Refactoring Inline Refactoring]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Encapsulating_Fields Encapsulating Fields]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Changing_Method_Signature Changing Method Signature]&lt;br /&gt;
&lt;br /&gt;
Few other refactoring techniques are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Other_Refactorings here].&lt;br /&gt;
&lt;br /&gt;
A table regarding Refactoring support in popular IDE(s)is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w45_is#Refactoring_support_in_popular_IDE.28s.29 here].&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69570</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69570"/>
		<updated>2012-11-16T13:20:40Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object Oriented Design (OOD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger&lt;br /&gt;
At the heart of great design are a set of principles and patterns.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_principles Design principles] form the foundation of good object-oriented design and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Design_patterns design patterns] provide general repeatable solutions for common software problems.&lt;br /&gt;
&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design of a system. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.&lt;br /&gt;
&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Lots of Objects]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Interfaces to Make APIs Predictable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Use Dependency Injection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Tips_for_a_good_OOD Create Loosely Coupled Classes]&lt;br /&gt;
&lt;br /&gt;
Factors leading to Poor OOD are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Single_Responsibility_Principle_.28SRP.29 Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29 Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Overuse_of_Inheritance Overuse of Inheritance]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_design_anti-patterns Software design anti-patterns]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Object_oriented_design_anti-patterns Object oriented design anti-patterns]&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to recognize and plan for the scope of this change. If preventive measure are taken software failure can be avoided and organizations can benefit from OOD. Assessing quality of software at the design level will provide ease and higher accuracy for users.Some of the methods are listed below:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Identifying_Code_Smells Identifying Code Smells]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#MOOD_.28Metrics_for_Object_Oriented_Design.29 MOOD (Metrics for Object Oriented Design)] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Well-Known_Software_Failures Here] are some well&lt;br /&gt;
known software failures.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w44_as&amp;diff=69569</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w44 as</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w44_as&amp;diff=69569"/>
		<updated>2012-11-16T13:12:43Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Tips for a good OOD */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
=&amp;lt;b&amp;gt;Introduction&amp;lt;/b&amp;gt; =&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
== An example of Object Oriented Design==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Person {&lt;br /&gt;
    String id;&lt;br /&gt;
    String name;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Course {...}&lt;br /&gt;
&lt;br /&gt;
Class Student extends Person {&lt;br /&gt;
    List&amp;lt;Course&amp;gt; registeredCourses;&lt;br /&gt;
    Instructor advisor;&lt;br /&gt;
    int semester;&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Instructor extends Person {&lt;br /&gt;
    List&amp;lt;Course&amp;gt; coursesTaught;&lt;br /&gt;
    List&amp;lt;Student&amp;gt; students;&lt;br /&gt;
    ....&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Student student = new Student(...);&lt;br /&gt;
student.getRegisteredClasses();&lt;br /&gt;
student.getAdvisor();&lt;br /&gt;
Instructor instructor = new Instructor(...);&lt;br /&gt;
instructor.getCoursesTaught();&lt;br /&gt;
instructor.getStudents();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In above example, two objects are created, one for the Student and another for Instructor. The main observation to be made is that the Student object interacts with the Instructor object to obtain the advisor's information. Similarly, the Instructor object interacts with the Student object to obtain the student information.&lt;br /&gt;
&lt;br /&gt;
== Advantages of Object Oriented Design ==&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Traits of a poor Object Oriented Design ==&lt;br /&gt;
* Not following Single Responsibility Principle [[#Violating_the_Single_Responsibility_Principle_.28SRP.29| (SRP)]].&lt;br /&gt;
* Violating the DRY principle [[#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29| (DRY)]].&lt;br /&gt;
* Anti-Patterns [[#Software_design_anti-patterns| (Anti-Patterns)]].&lt;br /&gt;
* Misnomer: The name of variables, methods, Classes and instance objects are not indicative of the data and functionality that they represent.&lt;br /&gt;
* More functionality in a single method.&lt;br /&gt;
* Repeated use of switch/case statements on the same enumerated member (sign of sub-classes needing extraction).&lt;br /&gt;
* Lots of member variables that are used for processing, not to capture state (might indicate need to extract a method object).&lt;br /&gt;
* Long chains of member access.&lt;br /&gt;
* Use of too many design patterns in a small space.&lt;br /&gt;
* Some repeated pattern of action, process or structure that initially appears to be beneficial, but ultimately produces more bad consequences than beneficial results.&lt;br /&gt;
* A base class down-casting itself to a derived class. Like, excessive use of switch statements, or derived classes that override everything&lt;br /&gt;
* Overuse of inheritance mechanisms.&lt;br /&gt;
* No proper documentation.&lt;br /&gt;
&lt;br /&gt;
Next, we will define the success and failure of a Software and discuss basic concepts involved of Object Oriented Design. In the later part, we discuss in-depth with examples of how poor designs lead to software failures. Finally, we discuss about methodology to avoid poor object oriented designs.&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;b&amp;gt;Software &amp;lt;i&amp;gt;success&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;failure&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; = &lt;br /&gt;
&lt;br /&gt;
== What is software success ==&lt;br /&gt;
The general definition of software project success is - projects delivered on time, in scope (software quality is satisfied) and within planned costs. [1] It is just a most simplistic definition of software project success because it merely relies on the schedule and budget. In fact, it is hard to tell whether software is a success or failure one, because business success, at sometime, is more essential than technical success. [2] This means that the software which is being implemented must create value that business needed, such as making profit, rather than simply achieve the software goal and requirement.&lt;br /&gt;
&lt;br /&gt;
In ''The Strategic Project Office'', written by J. Kent Crawford, [3] we can find some more specific success criteria mentioned to address alignment between project goals, business requirements, and outcomes:&lt;br /&gt;
&lt;br /&gt;
The organization’s strategies are executed according to plan.&lt;br /&gt;
The organization’s shareholders are satisfied.&lt;br /&gt;
The organization is financially successful.&lt;br /&gt;
Projects are completed on schedule and on budget.&lt;br /&gt;
Project customers are satisfied.&lt;br /&gt;
Project resources are allocated optimally.&lt;br /&gt;
Projects are aligned to the organization’s business strategy.&lt;br /&gt;
The organization works on the right projects.&lt;br /&gt;
&lt;br /&gt;
== What is software failure ==&lt;br /&gt;
Compared with software success, it is relative easier to define software failure. It can be definite as “(1) being over-scheduled by more than 30% and/or, (2) being over-budget by more than 30% and/or, (3) the end product did not meet user requirements. These three criteria cover the schedule, budget, and requirement, all surrounded by quality that should comprise all projects.”[5].&lt;br /&gt;
&lt;br /&gt;
== Factors leading to software failure ==&lt;br /&gt;
&lt;br /&gt;
Most software project can be considered partial failures since only few of them meet the schedule, cost and requirement objective. According to many studies, failure rate of software projects is between 50% - 80%. [6] In most of the cases, the software projects fail because we do not recognize that good engineering principles should be applied to software projects similar to building office buildings. Below are some factors that may lead to the software failure in no particular order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poor user input&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible that a titanic project which meets all the requirements ultimately may fail because the system did not meet the user's needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Vague requirement&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
People cannot design a process that assumes the requirement is stable. Projects can be headed for trouble if architectures and processes are not change-friendly, or if there are poorly established guidelines that determine how and when requirements can be added, removed, and implemented—and who will shoulder the cost of the changes.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poor cost and schedule estimation&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Although it is unfair to call software project a failure when it cannot meet the budget and scheduled goals that were inherently unattainable, every software project has a minimum achievable cost and schedule. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Skills that doesn't match the job&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is an obvious reason; Example: Managers can perform poorly if they lead projects that do not match their strengths.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Communication breakdown&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Communication breakdown may lead to low efficiency and even the project failure. Especially large software project which is done by different groups in various sites, same code may be tested two times because no one knows the other exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poor architecture&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is because people never think ahead about what is likely to change. Once the software is developed in an inflexible way, it may be outdate quickly after it is released and may cause problems because it cannot deal with the continue change incomes. For this reason, we come to realize why OOD is so important in software development.&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;b&amp;gt;Object Oriented Design (OOD) &amp;lt;/b&amp;gt; =&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is the concept that forces programmers to plan out their code in order to have a better flowing program [7]. Simply speaking, OOD is all about [http://en.wikipedia.org/wiki/Object_(computer_science)  objects]. An object can be considered as a “[http://en.wikipedia.org/wiki/Black_box black box]” which receives and sends messages. Code (sequence of computer instructions) and data (information that instructions operates on) are included in this “black box”. [8] Interface is used in the object and everything an object can do is represented by its message interface. OOD mechanisms such as inheritance, polymorphism, information hiding and coupling, can influence quality characteristics like reliability or maintainability [19].&lt;br /&gt;
&lt;br /&gt;
===Language Concepts===&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/b&amp;gt; refers to a tight coupling or association of data structures with the methods or functions that act on the data. This is called a class, or object (an object is often the implementation of a class).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Abstraction Abstraction]&amp;lt;/b&amp;gt; is the ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as private or protected to the owning class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&amp;lt;/b&amp;gt; defines the ability for a class to extend or override functionality of another class. The so called child class has a whole section that is the parent class and then it has its own set of functions and data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Interface_(Java) Interface] &amp;lt;/b&amp;gt; is a definition of functions or methods, and their signatures that are available for use to manipulate a given instance of an object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&amp;lt;/b&amp;gt; refers to the ability to define different functions or classes as having the same name but taking different data types.&lt;br /&gt;
&lt;br /&gt;
===Programming Concepts===&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Reusability Re-usability]&amp;lt;/b&amp;gt; is the ability to reuse code for multiple applications. If a programmer has already written a power function, then it should be written that any program can make a call to that function and it should work exactly the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Privacy_software Privacy]&amp;lt;/b&amp;gt; is important for large programs and preventing loss of data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Software_documentation Documentation]&amp;lt;/b&amp;gt; is commenting of a program in mark up that will not be converted to machine code. This mark up can be as long as the programmer wants, and allows for comprehensive information to be passed on to new programmers. This is important for both the re-usability and the maintainability of programs.&lt;br /&gt;
&lt;br /&gt;
=&amp;lt;b&amp;gt;How to achieve a good OOD&amp;lt;/b&amp;gt;=&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger &lt;br /&gt;
&lt;br /&gt;
At the heart of great design are a set of principles and patterns. Design principles form the foundation of good object-oriented design and design patterns provide general repeatable solutions for common software problems. [10]&lt;br /&gt;
&lt;br /&gt;
==Design principles==&lt;br /&gt;
Design principles are guidelines and heuristics for a good object oriented designs. There are many different design principles of Object-Oriented Design. Here are 4 major principles of them: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Encapsulation&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In a nutshell, [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] is the hiding of data implementation by restricting access to accessors and mutators. An accessor, usually in the form of properties in OOP, is a method that is used to ask an object about itself. Accessor has a get method, which is an accessor method. Mutator is used to modify the state of an object. It is a public method, and hides the implementation of exactly how the data gets modified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Abstraction&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Abstraction_(computer_science) Abstraction] is the development of a software object. It denotes a model, a view, or some other focused-representations for an object we can actually find in the real world. It can be used to decompose complex systems into smaller by software developers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Inheritance&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Objects can relate to each other with either a “has a”, “uses a” or an “is a” relationship.  “Is a” is the [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) inheritance] way of object relationship.[11]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Polymorphism&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Meaning one name, many forms, [http://en.wikipedia.org/wiki/Polymorphism_(computer_science) polymorphism] manifests itself by having multiple methods all with the same name, but slightly different functionality.  There are two basic types of polymorphism: overriding, also called run-time polymorphism, and overloading, which is referred to as compile-time polymorphism.&lt;br /&gt;
&lt;br /&gt;
==Design patterns==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Design_pattern_(computer_science) Design pattern] is a general reusable solution to a commonly occurring problem within a given context. It is a template describing how to solve a problem, which cannot be transformed directly into code. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Many patterns imply object-orientation or more generally mutable state, and so may not be as applicable in functional programming languages, in which data is immutable or treated as such. [12]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are many types of design patterns, like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Creator&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
As one of the most common activities in an object-oriented system, creator pattern maintains a fundamental property of the relationship between objects of particular classes: class is responsible for creating objects. That is to say, creator pattern is responsible for creating an object of class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Controller&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The Controller pattern assigns the responsibility of dealing with system events to a non-UI class that represents the overall system or a use case scenario. A Controller object is a non-user interface object responsible for receiving or handling a system event. [13]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;High Cohesion&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
High cohesion means that the responsibilities of a given element are strongly related and highly focused. It is an evaluative pattern generally used in support of Low Coupling, which can keep objects appropriately focused, manageable and understandable. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Indirection&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
By assigning the responsibility of mediation between two elements to an intermediate object, the Indirection pattern supports low coupling and reuse potential between them. An example of this is the introduction of a controller component for mediation between data (model) and its representation (view) in the Model-view-controller pattern. [13]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Protected Variations&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
By wrapping the focus of instability with an interface and using polymorphism to create various implementations of this interface, the Protected Variations pattern protects elements from the variations on other elements, like objects, systems and subsystems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Effective Use Cases==&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design ofa system [22]. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.[22]&lt;br /&gt;
&lt;br /&gt;
==Tips for a good OOD==&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Use Lots of Objects&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
By adding lots of objects, it is easy to make each object has and only has one job. Once you understand the architecture, it helps to avoid changing massive amounts of code when we modify the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Use Interfaces to Make APIs Predictable&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Interfaces allow for strict type hinting, and by type hinting you can ensure that certain methods are always available for your use. [14]Each interface will provide the model to utilize. The utilization of a particular interface will cause the implementations of a few methods.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Use Dependency Injection&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Using dependency injection can make testing and feature addition easier. While, it makes testing impossible by instantiating objects directly in the code, or grabbing objects out of singletons. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Create Loosely Coupled Classes&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
When a developer gives each object only one responsibility, they tightly couple objects together. Objects will often request information from other objects, and while this is not avoidable in all situations, these tightly coupled classes that rely on one another’s functionality makes pulling those objects apart impossible.[14]&lt;br /&gt;
&lt;br /&gt;
=Poor OOD Leads to Software Failures=&lt;br /&gt;
In technical term, software failure is possibly due to software bugs or the poor software design, such as bad OOD. In the figure 2, we can see the cyclic behavior of failure. A fault or bug will cause errors. And errors in the system lead to the subsequent failure. In most of the cases, the software system comprises multiple components in which one failure may result in bugs or errors in another component. &lt;br /&gt;
[[File:failure.jpg|center|]]&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2 cyclic Fault behavior&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factors leading to Poor OOD ==&lt;br /&gt;
&lt;br /&gt;
Bad practice in code will always lead to the poor OOD. Here are some common ones[15]:&lt;br /&gt;
&lt;br /&gt;
===Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]===&lt;br /&gt;
Goal of Design: &amp;lt;b&amp;gt;A class should have only one reason to change&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider the example below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class TravelDetails {&lt;br /&gt;
  List&amp;lt;String&amp;gt; modes; //a list of modes of transport used for corresponding 'locations'&lt;br /&gt;
  List&amp;lt;String&amp;gt; locations; //locations along the travel. First entry is the source and the last entry is the destination&lt;br /&gt;
&lt;br /&gt;
  List&amp;lt;String&amp;gt; getViaTouristPlaces() {...}&lt;br /&gt;
  double getDistance(String location1, String location2) {...}&lt;br /&gt;
  double calculateCost() {...}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In above example, TravelDetails class is responsible for the modes of transport, locations and the cost of travel violating the single responsibility principle. Instead, it can be redesigned as shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Location {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class TransportMode {&lt;br /&gt;
  TransportType type;&lt;br /&gt;
  double getCost(double distance) {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Journey {&lt;br /&gt;
  Location source, destination;&lt;br /&gt;
  TransportMode mode;&lt;br /&gt;
  double getDistance() {...}&lt;br /&gt;
  double getCost() { mode.getCost( getDistance() ) }&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class TravelDetails {&lt;br /&gt;
  List&amp;lt;Journey&amp;gt; journey;&lt;br /&gt;
  List&amp;lt;Location&amp;gt; getViaTouristPlaces() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The system is now split into multiple classes - Location, TransportMode, Journey, TravelDetails. 'Location' is only concerned with details of a particular location. 'TransportMode' represents details about the type of transport used. Any changes to the cost of transport mode, availability is confined to this class. A 'Journey' represents travel from a source to a destination through the 'mode' type of transport. Finally, the whole trip consists of a list of 'Journey'.&lt;br /&gt;
&lt;br /&gt;
===Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]===&lt;br /&gt;
Consider example below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Employee {&lt;br /&gt;
  String name, id;&lt;br /&gt;
  String getDetails() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Manager {&lt;br /&gt;
  String name, id;&lt;br /&gt;
  String getDetails() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is clear from the example above that Employee class and Manager class have common functionality between them. This can be extracted out as a separate class as shown below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Person {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Employee extends Person {...}&lt;br /&gt;
&lt;br /&gt;
Class Manager extends Person {...}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overuse of Inheritance===&lt;br /&gt;
Too much inheritance instead of composition, i.e. Classes that derive from a sub-type purely so they get functionality for free.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Location {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Journey {&lt;br /&gt;
  Location source, destination;&lt;br /&gt;
  double getDistance() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Flight extends Journey {...}&lt;br /&gt;
Class Bus extends Journey {...}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above example, instead of having a sub-class for Flight, class Journey can have a new field which is TransportMode which represents different modes of transport such as flight, bus, train etc.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Location {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class TransportMode {&lt;br /&gt;
  TransportType type;&lt;br /&gt;
  double getCost(double distance) {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Journey {&lt;br /&gt;
  Location source, destination;&lt;br /&gt;
  TransportMode mode;&lt;br /&gt;
  double getDistance() {...}&lt;br /&gt;
  double getCost() { mode.getCost( getDistance() ) }&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software design anti-patterns===&lt;br /&gt;
In software engineering, an anti-pattern (or anti-pattern) is a pattern that may be commonly used but is ineffective and/or counterproductive in practice[16].Many anti-pattern ideas amount to little more than mistakes, rants, unsolvable problems, or bad practices to be avoided if possible. &lt;br /&gt;
&lt;br /&gt;
Anti-patterns, like their design pattern counterparts, define an industry vocabulary for the common defective processes and implementations within organizations.[17] In OOP, the anti-patterns of software design and object-oriented design are dangerous. They will result in bugs and errors in practice, and then finally lead to the failures of software. Here are the examples:[18]&lt;br /&gt;
&lt;br /&gt;
*Abstraction inversion: Not exposing implemented functionality required by users, so that they re-implement it using higher level functions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interface foo {&lt;br /&gt;
      int bar();&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
class myClass1 implements foo {&lt;br /&gt;
    // No member variables.&lt;br /&gt;
&lt;br /&gt;
    int bar() {&lt;br /&gt;
        // Implementation&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // No other methods.&lt;br /&gt;
}&lt;br /&gt;
  &lt;br /&gt;
class myClass2 implements foo {&lt;br /&gt;
    // No member variables.&lt;br /&gt;
&lt;br /&gt;
    int bar() {&lt;br /&gt;
        // Implementation&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // No other methods.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Ambiguous viewpoint: Presenting a model (usually Object-oriented analysis and design (OOAD)) without specifying its viewpoint&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For example, defining a class model for a telephone exchange system will vary significantly depending upon the focus provided by the &lt;br /&gt;
following perspectives:&lt;br /&gt;
&lt;br /&gt;
  -  Telephone user, who cares about the ease of making calls and receiving itemized bills.&lt;br /&gt;
  -  Telephone operator, who cares about connecting users to required numbers.&lt;br /&gt;
  -  Telephone accounting department, which cares about the formulae for billing and records of all calls made by users.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Big ball of mud: A system with no recognizable structure&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;Big ball of mud&amp;quot; systems have usually been developed over a long period of time, with different individuals &lt;br /&gt;
working on various pieces and parts. Systems developed by people with no formal architecture or programming training &lt;br /&gt;
often fall into this pattern.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Database-as-IPC: Using a database as the message queue for routine interprocess communication where a much more lightweight mechanism would be suitable&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Storing a list of messages to send: whether it’s emails, SMS messages, or friend requests, if you’re storing a list &lt;br /&gt;
of messages in a table and then looking through the list for messages that need to be sent, you’ve created a job queue.&lt;br /&gt;
&lt;br /&gt;
In this type of structure, Polling, Locking and Data growth cause problems&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Gold plating: Continuing to work on a task or project well past the point at which extra effort is adding value&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
After having met the requirements, the developer works on further enhancing the product, thinking the customer would&lt;br /&gt;
be delighted to see additional or more polished features, rather than what was asked for or expected. The customer &lt;br /&gt;
might be disappointed in the results, and the extra effort by the developer might be futile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Inner-platform effect: A system so customizable as to become a poor replica of the software development platform&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example: In plugin-based software such as some text editors and web browsers which often have people creating plugins that &lt;br /&gt;
recreate software that would normally run on top of the operating system itself. The Firefox add-on mechanism has &lt;br /&gt;
been used to develop a number of FTP clients and file browsers, which effectively replicate some of the features &lt;br /&gt;
of the operating system, albeit on a more restricted platform&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Input kludge: Failing to specify and implement the handling of possibly invalid input&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For example, if a computer program accepts free text input from the user, an ad hoc algorithm will mishandle many &lt;br /&gt;
combinations of legal and illegal input strings. Input kludges are usually difficult for a programmer to detect in &lt;br /&gt;
a unit test, but very easy for the end user to find. The evidence exists that the end user can easily crash software &lt;br /&gt;
that fails to correctly handle user input&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Interface bloat: Making an interface so powerful that it is extremely difficult to implement&amp;lt;br&amp;gt;&lt;br /&gt;
Example:[[File:InterfaceBloat.jpeg|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
*Magic pushbutton: Coding implementation logic directly within interface code, without using abstraction&amp;lt;br&amp;gt;&lt;br /&gt;
Boreland Delphi example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
procedure TForm1.Button1Click(Sender: TObject); &lt;br /&gt;
var&lt;br /&gt;
 reg:TRegistry;&lt;br /&gt;
begin&lt;br /&gt;
 reg:=TRegistry.Create;&lt;br /&gt;
 try&lt;br /&gt;
   reg.RootKey:=HKey_Current_User;&lt;br /&gt;
   if reg.OpenKey('\\Software\\MyCompany',true) then&lt;br /&gt;
   begin&lt;br /&gt;
     reg.WriteString('Filename',edit1.text);&lt;br /&gt;
   end;&lt;br /&gt;
 finally&lt;br /&gt;
   reg.Free;&lt;br /&gt;
 end;&lt;br /&gt;
end;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Race hazard: Failing to see the consequence of different orders of events&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If the two threads run simultaneously without locking or synchronization, the outcome of the operation could be wrong&lt;br /&gt;
&lt;br /&gt;
Integer i = 0;&lt;br /&gt;
T1 reads the value of i into a register : 0&lt;br /&gt;
T2 reads the value of i into a register : 0&lt;br /&gt;
T1 increments the value of i : 0 + 1 = 1&lt;br /&gt;
T2 increments the value of i : 0 + 1 = 1&lt;br /&gt;
The final value of i is 1 instead of the expected result of 2.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Stovepipe system: A barely maintainable assemblage of ill-related components&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A simple example of a stovepipe system is one that implements its own user IDs and passwords, instead of relying on &lt;br /&gt;
a common user ID and password shared with other systems.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Object oriented design anti-patterns ===&lt;br /&gt;
*Anemic Domain Model: The use of domain model without any business logic. The domain model's objects cannot guarantee their correctness at any moment, because their validation and mutation logic is placed somewhere outside (most likely in multiple places).&amp;lt;br&amp;gt;&lt;br /&gt;
[http://vitamic.wordpress.com/2007/01/04/anemic-domain-model-illustrated/     Example]&lt;br /&gt;
*BaseBean: Inheriting functionality from a utility class rather than delegating to it&lt;br /&gt;
*Call super: Requiring subclasses to call a superclass's overridden method&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Call_super#Example   Example]&lt;br /&gt;
*Circle-ellipse problem: Subtyping variable-types on the basis of value-subtypes&amp;lt;br&amp;gt;&lt;br /&gt;
[http://pawasranjan.github.com/cse230/lecture/drawbacks-of-object-orientation.html    Example]&lt;br /&gt;
*Circular dependency: Introducing unnecessary direct or indirect mutual dependencies between objects or software modules&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class A&lt;br /&gt;
{&lt;br /&gt;
  public A()&lt;br /&gt;
  {&lt;br /&gt;
    myB.DoSomething();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  private B myB = new B();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class B&lt;br /&gt;
{&lt;br /&gt;
  public B()&lt;br /&gt;
  {&lt;br /&gt;
    myA.DoSomething();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  private A myA = new A();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Constant interface: Using interfaces to define constants&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Constants {&lt;br /&gt;
 &lt;br /&gt;
        double PI = 3.14159;&lt;br /&gt;
        double PLANCK_CONSTANT = 6.62606896e-34;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
public class Calculations implements Constants {&lt;br /&gt;
 &lt;br /&gt;
        public double getReducedPlanckConstant() {&lt;br /&gt;
                return PLANCK_CONSTANT / (2 * PI);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternative:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public final class Constants {&lt;br /&gt;
 &lt;br /&gt;
        private Constants() {&lt;br /&gt;
                // restrict instantiation&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        public static final double PI = 3.14159;&lt;br /&gt;
        public static final double PLANCK_CONSTANT = 6.62606896e-34;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*God object: Concentrating too many functions in a single part of the design (class)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public void ExporterExcelParFonds(ParametresExecution parametres)&lt;br /&gt;
    {&lt;br /&gt;
        ApplicationExcel appExcel = null;&lt;br /&gt;
        LogTool.Instance.ExceptionSoulevee = false;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        bool inclureReferences = parametres.inclureReferences;&lt;br /&gt;
        bool inclureBornes = parametres.inclureBornes;&lt;br /&gt;
        DateTime dateDebut = parametres.date;&lt;br /&gt;
        DateTime dateFin = parametres.dateFin;&lt;br /&gt;
&lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            LogTool.Instance.AfficherMessage(Variables.msg_GenerationRapportPortefeuilleReference);&lt;br /&gt;
&lt;br /&gt;
            bool fichiersPreparesAvecSucces = PreparerFichiers(parametres, Sections.exportExcelParFonds);&lt;br /&gt;
            if (!fichiersPreparesAvecSucces)&lt;br /&gt;
            {&lt;br /&gt;
                parametres.afficherRapportApresGeneration = false;&lt;br /&gt;
                LogTool.Instance.ExceptionSoulevee = true;&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {  .....................&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Call :  PortefeuillesReference pr = new PortefeuillesReference();&lt;br /&gt;
        pr.ExporterExcelParFonds(parametres);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Object cesspool: Reusing objects whose state does not conform to the (possibly implicit) contract for re-use&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.patrickdelancy.com/2012/07/object-cesspool-anti-pattern/#.UGWaP02HKao   Example]&lt;br /&gt;
*Object orgy: Failing to properly encapsulate objects permitting unrestricted access to their internals&amp;lt;br&amp;gt;&lt;br /&gt;
*Poltergeists: Objects whose sole purpose is to pass information to another object&amp;lt;br&amp;gt;&lt;br /&gt;
[http://sourcemaking.com/files/sm/images/antipatterns/img_34.jpg  Example]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class PEACH_CANNER_CONTROLLER is a Poltergeist because:&lt;br /&gt;
&lt;br /&gt;
    -   It has redundant navigation paths to all other classes in the system.&lt;br /&gt;
    -   All of its associations are transient.&lt;br /&gt;
    -   It has no state.&lt;br /&gt;
    -   It is a temporary, short-duration class that pops into existence only to invoke other classes through temporary associations.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Sequential coupling: A class that requires its methods to be called in a particular order&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C program where set of procedure calls must take place in a particular order&lt;br /&gt;
&lt;br /&gt;
Overall(...)&lt;br /&gt;
{&lt;br /&gt;
p1(...) ;&lt;br /&gt;
p2(...) ;&lt;br /&gt;
// ...&lt;br /&gt;
pN(...) ;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Yo-yo problem: A structure (e.g., of inheritance) that is hard to understand due to excessive fragmentation&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How to Prevent Bad OOD=&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to riecognize and plan for the scope of this change [23]. If preventive measure are taken software failure can be avoided and organisations can benefit from OOD. Assessing quality of sojtware at the design level will provide ease and higher accuracy for users[25]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the methods are listed below.&lt;br /&gt;
&lt;br /&gt;
==Identifying Code Smells==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Code_smell Code Smells]or Bad smells are used to identify problematic classes in object-oriented design[20]. They can also be used to measure the evolvability of software [21]. code smells are broadly classified into 5 categories [21].&lt;br /&gt;
&lt;br /&gt;
[[File:bad-code-smells.jpg|center|border|600px|An image showing classification of code smells]]&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1: An image showing classification of code smells&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;100px&amp;quot; | Group Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;225px&amp;quot; | Smells in Group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;700px&amp;quot; | Discussion&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Bloaters&amp;lt;/b&amp;gt; || -Long Method&amp;lt;br&amp;gt;-Large Class&amp;lt;br&amp;gt;-Primitive Obsession&amp;lt;br&amp;gt;-Long Parameter List&amp;lt;br&amp;gt;-DataClumps&amp;lt;br&amp;gt; || Bloater smells represents something that has grown so large that it cannot be effectively handled.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;It seems likely that these smells grow a little bit at a time. Hopefully nobody designs, e.g., Long Methods.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Primitive Obsession is actually more of a symptom that causes bloats than a bloat itself. The same holds for Data Clumps. When a Primitive Obsession exists, there are no small classes for small entities (e.g. phone numbers). Thus, the functionality is added to some other class, which increases the class and method size in the software. With Data Clumps there exists a set of primitives that always appear together (e.g. 3 integers for RGB colors). Since these data items are not encapsulated in a class this increases the sizes of methods and classes. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Object-Orientation Abusers&amp;lt;/b&amp;gt; || -Switch Statements&amp;lt;br&amp;gt;-Temporary Field&amp;lt;br&amp;gt;-Refused Bequest&amp;lt;br&amp;gt;-Alternative Classes with Different Interfaces&amp;lt;br&amp;gt; || The common denominator for the smells in the Object-Orientation Abuser category is that they represent cases where the solution does not fully exploit the possibilities of object-oriented design.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For example, a Switch Statement might be considered acceptable or even good design in procedural programming, but is something that should be avoided in object-oriented programming. The situation where switch statements or type codes are needed should be handled by creating subclasses. Parallel Inheritance Hierarchies and Refused Bequest smells lack proper inheritance design, which is one of the key elements in object-oriented programming. The Alternative Classes with Different Interfaces smell lacks a common interface for closely related classes, so it can also be considered a certain type of inheritance misuse. The Temporary Field smell means a case in which a variable is in the class scope, when it should be in method scope. This violates the information hiding principle.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Change Preventers&amp;lt;/b&amp;gt; || -Divergent Change&amp;lt;br&amp;gt;-Shotgun Surgery&amp;lt;br&amp;gt;-Parallel Inheritance Hierarchies&amp;lt;br&amp;gt; || Change Preventers are smells is that hinder changing or further developing the software&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;These smells violate the rule suggested by Fowler and Beck which says that classes and possible changes should have a one-to-one relationship. For example, changes to the database only affect one class, while changes to calculation formulas only affect the other class.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The Divergent Change smell means that we have a single class that needs to be modified by many different types of changes. With the Shotgun Surgery smell the situation is the opposite, we need to modify many classes when making a single change to a system (change several classes when changing database from one vendor to another)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Parallel Inheritance Hierarchies, which means a duplicated class hierarchy, was originally placed in OO-abusers. One could also place it inside of The Dispensables since there is redundant logic that should be replaced.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Dispensables&amp;lt;/b&amp;gt; || -Lazy class&amp;lt;br&amp;gt;-Data class&amp;lt;br&amp;gt;-Duplicate Code&amp;lt;br&amp;gt;-Dead Code&amp;lt;br&amp;gt;-Speculative Generality&amp;lt;br&amp;gt; || The common thing for the Dispensable smells is that they all represent something unnecessary that should be removed from the source code.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;This group contains two types of smells (dispensable classes and dispensable code), but since they violate the same principle, we will look at them together. If a class is not doing enough it needs to be removed or its responsibility needs to be increased. This is the case with the Lazy class and the Data class smells. Code that is not used or is redundant needs to be removed. This is the case with Duplicate Code, Speculative Generality and Dead Code smells. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Couplers&amp;lt;/b&amp;gt; || -Feature Envy&amp;lt;br&amp;gt;-Inappropriate Intimacy&amp;lt;br&amp;gt;-Message Chains&amp;lt;br&amp;gt;-Middle Man&amp;lt;br&amp;gt; || This group has four coupling-related smells.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;One design principle that has been around for decades is low coupling (Stevens et al. 1974) . This group has 3 smells that represent high coupling. Middle Man smell on the other hand represent a problem that might be created when trying to avoid high coupling with constant delegation. Middle Man is a class that is doing too much simple delegation instead of really contributing to the application.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The Feature Envy smell means a case where one method is too interested in other classes, and the Inappropriate Intimacy smell means that two classes are coupled tightly to each other. Message Chains is a smell where class A needs data from class D. To access this data, class A needs to retrieve object C from object B (A and B have a direct reference). When class A gets object C it then asks C to get object D. When class A finally has a reference to class D, A asks D for the data it needs. The problem here is that A becomes unnecessarily coupled to classes B, C, and D, when it only needs some piece of data from class D. The following example illustrates the message chain smell: A.getB().getC().getD().getTheNeededData()&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Of course, I could make an argument that these smells should belong to the Object-Orientation abusers group, but since they all focus strictly on coupling, I think it makes the taxonomy more understandable if they are introduced in a group of their own.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;center&amp;gt;Table 1: Code Smells Clasification&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MOOD (Metrics for Object Oriented Design) ==&lt;br /&gt;
&lt;br /&gt;
Impact of Object-Oriented design on software quality characteristics can be experimentally evaluated. A suite of metrics for OO-design, called MOOD, was adopted to measure the use of OO design mechanisms [24]. The FCM (Factors, Criteria, Measurement) model indicates that software quality depends on the software quality measurement.[25]&lt;br /&gt;
&lt;br /&gt;
                                        Factors ---&amp;gt; Criteria ---&amp;gt; Measurement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Motivations behind the MOOD set definition include:&lt;br /&gt;
&lt;br /&gt;
* Coverage of basic structural mechanisms of the object-oriented paradigm such as encapsulation, inheritance, polymorphism and message-passing.&lt;br /&gt;
* Formal definition to avoid subjectivity of measurement and thus allow replicability.&lt;br /&gt;
* Size independence to allow inter-projecl comparison,thus fostering cumulative knowledge.&lt;br /&gt;
* Language independence to broaden the applicability of this metric set by allowing comparison of heterogeneous system implementations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;MOOD includes the following metrics:&lt;br /&gt;
&lt;br /&gt;
* Method Hiding Factor (MHF)&lt;br /&gt;
* Attribute Hiding Factor (AHF)&lt;br /&gt;
* Method Inheritance Factor (MIF)&lt;br /&gt;
* Attribute Inheritance Factor (AIF)&lt;br /&gt;
* Polymorphism Factor (POF)&lt;br /&gt;
* Coupling Factor (COF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Each of these metrics refers to a basic structural mechanism of the object-oriented paradigm as encapsulation (MHF and AHF), inheritance (MIF and AIF), polymorphism (POF) and message-passing (COF). The MOOD metrics definitions make no reference to specific language constructs. However, since each language has its own constructs that allow for implementation of OO mechanisms&lt;br /&gt;
in more or less detail.&lt;br /&gt;
&lt;br /&gt;
= Well-Known Software Failures =&lt;br /&gt;
&lt;br /&gt;
*Microsoft Zune's New Year Crash. [http://www.thestreet.com/story/10455712/microsoft-zunes-new-year-crash.html Article] [http://www.zuneboards.com/forums/showthread.php?t=38143 Bug]&lt;br /&gt;
*Air-Traffic Control System in LA Airport. [http://spectrum.ieee.org/aerospace/aviation/lost-radio-contact-leaves-pilots-on-their-own Article]&lt;br /&gt;
*Northeast Blackout. [http://www.securityfocus.com/news/8032 Article]&lt;br /&gt;
*NASA Mars Climate Orbiter. [http://www.cse.lehigh.edu/~gtan/bug/localCopies/marsOrbiter Article]&lt;br /&gt;
*Denver Airport Baggage-handling System. &lt;br /&gt;
*USS Yorktown Incident [http://www.cse.lehigh.edu/~gtan/bug/localCopies/yorktown/yorktown.htm Article]&lt;br /&gt;
*Ariane 5 Explosion [http://www.around.com/ariane.html Article]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
[1] http://www.zdnet.com/blog/projectfailures/cio-analysis-defining-it-project-success-and-failure/12524&amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.42spikes.com/post/What-is-Software-Success.aspx&amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://www.crcpress.com/product/isbn/9781439838129&amp;lt;br&amp;gt;&lt;br /&gt;
[4] J. C. Laprie (Ed.). Dependability: Basic Concepts and Terminology.  Springer-Verlag, Wein, New York, 1992.&amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://ac-support.europe.umuc.edu/~meinkej/inss690/wilson.htm&amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.it-cortex.com/Stat_Failure_Rate.htm&amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.selectbs.com/process-maturity/what-is-object-oriented-design&amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://softwaredesign.com/objects.html&amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://www.selectbs.com/process-maturity/what-is-object-oriented-design&amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.objectmentor.com/omSolutions/oops_what.html&amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://codebetter.com/raymondlewallen/2005/07/19/4-major-principles-of-object-oriented-programming&amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://webcache.googleusercontent.com/search?q=cache:TwYgDNxgxUMJ:en.wikipedia.org/wiki/Design_pattern_%28computer_science%29+object+oriented+design+patterns&amp;amp;cd=3&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;gl=us&amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29&amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.brandonsavage.net/five-tips-to-make-good-object-oriented-code-better&amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://stackoverflow.com/questions/345698/what-are-the-tell-tale-signs-of-bad-object-oriented-design&amp;lt;br&amp;gt;&lt;br /&gt;
[16] Budgen, D. (2003). Software design. Harlow, Eng.: Addison-Wesley. &amp;quot;As described in Long (2001), design anti-patterns are 'obvious, but wrong, solutions to recurring problems'&amp;quot;p. 225. ISBN 0-201-72219-4.&amp;lt;br&amp;gt;&lt;br /&gt;
[17] http://sourcemaking.com/antipatterns &amp;lt;br&amp;gt;&lt;br /&gt;
[18] http://en.wikipedia.org/wiki/Anti-pattern&amp;lt;br&amp;gt;&lt;br /&gt;
[19] Evaluating the Impact of Object-Oriented Design on Software Quality. Fernando Brito e Abreu and WalcClio Melo. 0-8186-7364-8196 0 1996 IEEE, Proceedings of METRICS ’96&amp;lt;br&amp;gt;&lt;br /&gt;
[20] An Investigation of Bad Smells in Object-Oriented Design, Raed Shatnawi and Wei Li, Proceedings of the Third International Conference on Information Technology: New Generations (ITNG'06) 0-7695-2497-4/06 © 2006 IEEE&amp;lt;br&amp;gt;&lt;br /&gt;
[21] Subjective evaluation of software evolvability using code smells: An empirical study, Mika V. Mantyla &amp;amp; Casper Lassenius Published online: 27 May 2006&amp;lt;br&amp;gt;&lt;br /&gt;
[22] Essential Use Cases and Responsibility in ObjectOriented Development, Robert Biddle, James Noble, Ewan Tempero, Copyright © 2001&amp;lt;br&amp;gt;&lt;br /&gt;
[23] The Reality of Ob j ect-Oriented Technology in the Corporation, Jean Scholtz&amp;lt;br&amp;gt;&lt;br /&gt;
[24] Evaluating the Impact of Object-Oriented Design on Software Quality, Fernando Brito e Abreu and WalcClio Melo, 0-8186-7364-8196 0 1996 IEEE Proceedings of METRICS ’96.&amp;lt;br&amp;gt;&lt;br /&gt;
[25] Quality Metrics of Object Oriented Design for Software Development and Re-development, K. Liu, S. Zhou and H. Yang, 0-7695-0825-i/00 © 2000 IEEE&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w44_as&amp;diff=69568</id>
		<title>CSC/ECE 517 Fall 2012/ch1b 1w44 as</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/ch1b_1w44_as&amp;diff=69568"/>
		<updated>2012-11-16T13:10:20Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Effective Use Cases */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt; &lt;br /&gt;
=&amp;lt;b&amp;gt;Introduction&amp;lt;/b&amp;gt; =&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
== An example of Object Oriented Design==&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Person {&lt;br /&gt;
    String id;&lt;br /&gt;
    String name;&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Course {...}&lt;br /&gt;
&lt;br /&gt;
Class Student extends Person {&lt;br /&gt;
    List&amp;lt;Course&amp;gt; registeredCourses;&lt;br /&gt;
    Instructor advisor;&lt;br /&gt;
    int semester;&lt;br /&gt;
    ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Instructor extends Person {&lt;br /&gt;
    List&amp;lt;Course&amp;gt; coursesTaught;&lt;br /&gt;
    List&amp;lt;Student&amp;gt; students;&lt;br /&gt;
    ....&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Student student = new Student(...);&lt;br /&gt;
student.getRegisteredClasses();&lt;br /&gt;
student.getAdvisor();&lt;br /&gt;
Instructor instructor = new Instructor(...);&lt;br /&gt;
instructor.getCoursesTaught();&lt;br /&gt;
instructor.getStudents();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In above example, two objects are created, one for the Student and another for Instructor. The main observation to be made is that the Student object interacts with the Instructor object to obtain the advisor's information. Similarly, the Instructor object interacts with the Student object to obtain the student information.&lt;br /&gt;
&lt;br /&gt;
== Advantages of Object Oriented Design ==&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Traits of a poor Object Oriented Design ==&lt;br /&gt;
* Not following Single Responsibility Principle [[#Violating_the_Single_Responsibility_Principle_.28SRP.29| (SRP)]].&lt;br /&gt;
* Violating the DRY principle [[#Violating_the_Don.27t_Repeat_Yourself_principle_.28DRY.29| (DRY)]].&lt;br /&gt;
* Anti-Patterns [[#Software_design_anti-patterns| (Anti-Patterns)]].&lt;br /&gt;
* Misnomer: The name of variables, methods, Classes and instance objects are not indicative of the data and functionality that they represent.&lt;br /&gt;
* More functionality in a single method.&lt;br /&gt;
* Repeated use of switch/case statements on the same enumerated member (sign of sub-classes needing extraction).&lt;br /&gt;
* Lots of member variables that are used for processing, not to capture state (might indicate need to extract a method object).&lt;br /&gt;
* Long chains of member access.&lt;br /&gt;
* Use of too many design patterns in a small space.&lt;br /&gt;
* Some repeated pattern of action, process or structure that initially appears to be beneficial, but ultimately produces more bad consequences than beneficial results.&lt;br /&gt;
* A base class down-casting itself to a derived class. Like, excessive use of switch statements, or derived classes that override everything&lt;br /&gt;
* Overuse of inheritance mechanisms.&lt;br /&gt;
* No proper documentation.&lt;br /&gt;
&lt;br /&gt;
Next, we will define the success and failure of a Software and discuss basic concepts involved of Object Oriented Design. In the later part, we discuss in-depth with examples of how poor designs lead to software failures. Finally, we discuss about methodology to avoid poor object oriented designs.&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;b&amp;gt;Software &amp;lt;i&amp;gt;success&amp;lt;/i&amp;gt; and &amp;lt;i&amp;gt;failure&amp;lt;/i&amp;gt;&amp;lt;/b&amp;gt; = &lt;br /&gt;
&lt;br /&gt;
== What is software success ==&lt;br /&gt;
The general definition of software project success is - projects delivered on time, in scope (software quality is satisfied) and within planned costs. [1] It is just a most simplistic definition of software project success because it merely relies on the schedule and budget. In fact, it is hard to tell whether software is a success or failure one, because business success, at sometime, is more essential than technical success. [2] This means that the software which is being implemented must create value that business needed, such as making profit, rather than simply achieve the software goal and requirement.&lt;br /&gt;
&lt;br /&gt;
In ''The Strategic Project Office'', written by J. Kent Crawford, [3] we can find some more specific success criteria mentioned to address alignment between project goals, business requirements, and outcomes:&lt;br /&gt;
&lt;br /&gt;
The organization’s strategies are executed according to plan.&lt;br /&gt;
The organization’s shareholders are satisfied.&lt;br /&gt;
The organization is financially successful.&lt;br /&gt;
Projects are completed on schedule and on budget.&lt;br /&gt;
Project customers are satisfied.&lt;br /&gt;
Project resources are allocated optimally.&lt;br /&gt;
Projects are aligned to the organization’s business strategy.&lt;br /&gt;
The organization works on the right projects.&lt;br /&gt;
&lt;br /&gt;
== What is software failure ==&lt;br /&gt;
Compared with software success, it is relative easier to define software failure. It can be definite as “(1) being over-scheduled by more than 30% and/or, (2) being over-budget by more than 30% and/or, (3) the end product did not meet user requirements. These three criteria cover the schedule, budget, and requirement, all surrounded by quality that should comprise all projects.”[5].&lt;br /&gt;
&lt;br /&gt;
== Factors leading to software failure ==&lt;br /&gt;
&lt;br /&gt;
Most software project can be considered partial failures since only few of them meet the schedule, cost and requirement objective. According to many studies, failure rate of software projects is between 50% - 80%. [6] In most of the cases, the software projects fail because we do not recognize that good engineering principles should be applied to software projects similar to building office buildings. Below are some factors that may lead to the software failure in no particular order:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poor user input&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
It is possible that a titanic project which meets all the requirements ultimately may fail because the system did not meet the user's needs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Vague requirement&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
People cannot design a process that assumes the requirement is stable. Projects can be headed for trouble if architectures and processes are not change-friendly, or if there are poorly established guidelines that determine how and when requirements can be added, removed, and implemented—and who will shoulder the cost of the changes.  &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poor cost and schedule estimation&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Although it is unfair to call software project a failure when it cannot meet the budget and scheduled goals that were inherently unattainable, every software project has a minimum achievable cost and schedule. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Skills that doesn't match the job&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is an obvious reason; Example: Managers can perform poorly if they lead projects that do not match their strengths.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Communication breakdown&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Communication breakdown may lead to low efficiency and even the project failure. Especially large software project which is done by different groups in various sites, same code may be tested two times because no one knows the other exist.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Poor architecture&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
This is because people never think ahead about what is likely to change. Once the software is developed in an inflexible way, it may be outdate quickly after it is released and may cause problems because it cannot deal with the continue change incomes. For this reason, we come to realize why OOD is so important in software development.&lt;br /&gt;
&lt;br /&gt;
= &amp;lt;b&amp;gt;Object Oriented Design (OOD) &amp;lt;/b&amp;gt; =&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is the concept that forces programmers to plan out their code in order to have a better flowing program [7]. Simply speaking, OOD is all about [http://en.wikipedia.org/wiki/Object_(computer_science)  objects]. An object can be considered as a “[http://en.wikipedia.org/wiki/Black_box black box]” which receives and sends messages. Code (sequence of computer instructions) and data (information that instructions operates on) are included in this “black box”. [8] Interface is used in the object and everything an object can do is represented by its message interface. OOD mechanisms such as inheritance, polymorphism, information hiding and coupling, can influence quality characteristics like reliability or maintainability [19].&lt;br /&gt;
&lt;br /&gt;
===Language Concepts===&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/b&amp;gt; refers to a tight coupling or association of data structures with the methods or functions that act on the data. This is called a class, or object (an object is often the implementation of a class).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Abstraction Abstraction]&amp;lt;/b&amp;gt; is the ability to protect some components of the object from external entities. This is realized by language keywords to enable a variable to be declared as private or protected to the owning class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&amp;lt;/b&amp;gt; defines the ability for a class to extend or override functionality of another class. The so called child class has a whole section that is the parent class and then it has its own set of functions and data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Interface_(Java) Interface] &amp;lt;/b&amp;gt; is a definition of functions or methods, and their signatures that are available for use to manipulate a given instance of an object.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&amp;lt;/b&amp;gt; refers to the ability to define different functions or classes as having the same name but taking different data types.&lt;br /&gt;
&lt;br /&gt;
===Programming Concepts===&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Reusability Re-usability]&amp;lt;/b&amp;gt; is the ability to reuse code for multiple applications. If a programmer has already written a power function, then it should be written that any program can make a call to that function and it should work exactly the same.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Privacy_software Privacy]&amp;lt;/b&amp;gt; is important for large programs and preventing loss of data.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;[http://en.wikipedia.org/wiki/Software_documentation Documentation]&amp;lt;/b&amp;gt; is commenting of a program in mark up that will not be converted to machine code. This mark up can be as long as the programmer wants, and allows for comprehensive information to be passed on to new programmers. This is important for both the re-usability and the maintainability of programs.&lt;br /&gt;
&lt;br /&gt;
=&amp;lt;b&amp;gt;How to achieve a good OOD&amp;lt;/b&amp;gt;=&lt;br /&gt;
“Good design and programming is not learned by generalities, but by seeing how significant programs can be made clean, easy to read, easy to maintain and modify human-engineered, efficient, and reliable, by the application of good and programming practices. Careful study and imitation of good designs and programs significantly improves development skills.”--Kernighan &amp;amp; Plauger &lt;br /&gt;
&lt;br /&gt;
At the heart of great design are a set of principles and patterns. Design principles form the foundation of good object-oriented design and design patterns provide general repeatable solutions for common software problems. [10]&lt;br /&gt;
&lt;br /&gt;
==Design principles==&lt;br /&gt;
Design principles are guidelines and heuristics for a good object oriented designs. There are many different design principles of Object-Oriented Design. Here are 4 major principles of them: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Encapsulation&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
In a nutshell, [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation] is the hiding of data implementation by restricting access to accessors and mutators. An accessor, usually in the form of properties in OOP, is a method that is used to ask an object about itself. Accessor has a get method, which is an accessor method. Mutator is used to modify the state of an object. It is a public method, and hides the implementation of exactly how the data gets modified.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Abstraction&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Abstraction_(computer_science) Abstraction] is the development of a software object. It denotes a model, a view, or some other focused-representations for an object we can actually find in the real world. It can be used to decompose complex systems into smaller by software developers.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Inheritance&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Objects can relate to each other with either a “has a”, “uses a” or an “is a” relationship.  “Is a” is the [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) inheritance] way of object relationship.[11]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Polymorphism&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Meaning one name, many forms, [http://en.wikipedia.org/wiki/Polymorphism_(computer_science) polymorphism] manifests itself by having multiple methods all with the same name, but slightly different functionality.  There are two basic types of polymorphism: overriding, also called run-time polymorphism, and overloading, which is referred to as compile-time polymorphism.&lt;br /&gt;
&lt;br /&gt;
==Design patterns==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Design_pattern_(computer_science) Design pattern] is a general reusable solution to a commonly occurring problem within a given context. It is a template describing how to solve a problem, which cannot be transformed directly into code. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Many patterns imply object-orientation or more generally mutable state, and so may not be as applicable in functional programming languages, in which data is immutable or treated as such. [12]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are many types of design patterns, like&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Creator&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
As one of the most common activities in an object-oriented system, creator pattern maintains a fundamental property of the relationship between objects of particular classes: class is responsible for creating objects. That is to say, creator pattern is responsible for creating an object of class.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Controller&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
The Controller pattern assigns the responsibility of dealing with system events to a non-UI class that represents the overall system or a use case scenario. A Controller object is a non-user interface object responsible for receiving or handling a system event. [13]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;High Cohesion&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
High cohesion means that the responsibilities of a given element are strongly related and highly focused. It is an evaluative pattern generally used in support of Low Coupling, which can keep objects appropriately focused, manageable and understandable. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Indirection&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
By assigning the responsibility of mediation between two elements to an intermediate object, the Indirection pattern supports low coupling and reuse potential between them. An example of this is the introduction of a controller component for mediation between data (model) and its representation (view) in the Model-view-controller pattern. [13]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Protected Variations&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
By wrapping the focus of instability with an interface and using polymorphism to create various implementations of this interface, the Protected Variations pattern protects elements from the variations on other elements, like objects, systems and subsystems.&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Effective Use Cases==&lt;br /&gt;
Essential [http://en.wikipedia.org/wiki/Use_case use cases] are abstrat, lightweight, technology-free dialogues of user intension and system responsibility, that effectively capture requirements for design ofa system [22]. Working with essential use cases yeilds further benefits: analysts can take advantage of recurring patterns in essential use cases and the crucial common vocabulary of responsibilities lets designers trace directly from the essential use cases to the objects in their design.[22]&lt;br /&gt;
&lt;br /&gt;
==Tips for a good OOD==&lt;br /&gt;
There are some tips that can be used in designing to enhance and improve the object-oriented projects.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Use Lots of Objects&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
By adding lots of objects, it is easy to make each object has and only has one job. Once you understand the architecture, it helps to avoid changing massive amounts of code when we modify the code.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Use Interfaces to Make APIs Predictable&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Interfaces allow for strict type hinting, and by type hinting you can ensure that certain methods are always available for your use. [14]Each interface will provide the model to utilize. The utilization of a particular interface will cause the implementations of a few methods.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Use Dependency Injection&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Using dependency injection can make testing and feature addition easier. While, it makes testing impossible by instantiating objects directly in the code, or grabbing objects out of singletons. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;b&amp;gt;Create Loosely Coupled Classes&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
When a developer gives each object only one responsibility, they tightly couple objects together. Objects will often request information from other objects, and while this is not avoidable in all situations, these tightly coupled classes that rely on one another’s functionality makes pulling those objects apart impossible.[14]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=Poor OOD Leads to Software Failures=&lt;br /&gt;
In technical term, software failure is possibly due to software bugs or the poor software design, such as bad OOD. In the figure 2, we can see the cyclic behavior of failure. A fault or bug will cause errors. And errors in the system lead to the subsequent failure. In most of the cases, the software system comprises multiple components in which one failure may result in bugs or errors in another component. &lt;br /&gt;
[[File:failure.jpg|center|]]&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 2 cyclic Fault behavior&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Factors leading to Poor OOD ==&lt;br /&gt;
&lt;br /&gt;
Bad practice in code will always lead to the poor OOD. Here are some common ones[15]:&lt;br /&gt;
&lt;br /&gt;
===Violating the Single Responsibility Principle [http://en.wikipedia.org/wiki/Single_responsibility_principle (SRP)]===&lt;br /&gt;
Goal of Design: &amp;lt;b&amp;gt;A class should have only one reason to change&amp;lt;/b&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Consider the example below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class TravelDetails {&lt;br /&gt;
  List&amp;lt;String&amp;gt; modes; //a list of modes of transport used for corresponding 'locations'&lt;br /&gt;
  List&amp;lt;String&amp;gt; locations; //locations along the travel. First entry is the source and the last entry is the destination&lt;br /&gt;
&lt;br /&gt;
  List&amp;lt;String&amp;gt; getViaTouristPlaces() {...}&lt;br /&gt;
  double getDistance(String location1, String location2) {...}&lt;br /&gt;
  double calculateCost() {...}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In above example, TravelDetails class is responsible for the modes of transport, locations and the cost of travel violating the single responsibility principle. Instead, it can be redesigned as shown below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Location {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class TransportMode {&lt;br /&gt;
  TransportType type;&lt;br /&gt;
  double getCost(double distance) {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Journey {&lt;br /&gt;
  Location source, destination;&lt;br /&gt;
  TransportMode mode;&lt;br /&gt;
  double getDistance() {...}&lt;br /&gt;
  double getCost() { mode.getCost( getDistance() ) }&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class TravelDetails {&lt;br /&gt;
  List&amp;lt;Journey&amp;gt; journey;&lt;br /&gt;
  List&amp;lt;Location&amp;gt; getViaTouristPlaces() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The system is now split into multiple classes - Location, TransportMode, Journey, TravelDetails. 'Location' is only concerned with details of a particular location. 'TransportMode' represents details about the type of transport used. Any changes to the cost of transport mode, availability is confined to this class. A 'Journey' represents travel from a source to a destination through the 'mode' type of transport. Finally, the whole trip consists of a list of 'Journey'.&lt;br /&gt;
&lt;br /&gt;
===Violating the Don't Repeat Yourself principle [http://en.wikipedia.org/wiki/Don't_repeat_yourself (DRY)]===&lt;br /&gt;
Consider example below:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Employee {&lt;br /&gt;
  String name, id;&lt;br /&gt;
  String getDetails() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Manager {&lt;br /&gt;
  String name, id;&lt;br /&gt;
  String getDetails() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
It is clear from the example above that Employee class and Manager class have common functionality between them. This can be extracted out as a separate class as shown below.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Person {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Employee extends Person {...}&lt;br /&gt;
&lt;br /&gt;
Class Manager extends Person {...}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Overuse of Inheritance===&lt;br /&gt;
Too much inheritance instead of composition, i.e. Classes that derive from a sub-type purely so they get functionality for free.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Location {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Journey {&lt;br /&gt;
  Location source, destination;&lt;br /&gt;
  double getDistance() {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Flight extends Journey {...}&lt;br /&gt;
Class Bus extends Journey {...}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In the above example, instead of having a sub-class for Flight, class Journey can have a new field which is TransportMode which represents different modes of transport such as flight, bus, train etc.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class Location {&lt;br /&gt;
  String name;&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class TransportMode {&lt;br /&gt;
  TransportType type;&lt;br /&gt;
  double getCost(double distance) {...}&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
Class Journey {&lt;br /&gt;
  Location source, destination;&lt;br /&gt;
  TransportMode mode;&lt;br /&gt;
  double getDistance() {...}&lt;br /&gt;
  double getCost() { mode.getCost( getDistance() ) }&lt;br /&gt;
  ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Software design anti-patterns===&lt;br /&gt;
In software engineering, an anti-pattern (or anti-pattern) is a pattern that may be commonly used but is ineffective and/or counterproductive in practice[16].Many anti-pattern ideas amount to little more than mistakes, rants, unsolvable problems, or bad practices to be avoided if possible. &lt;br /&gt;
&lt;br /&gt;
Anti-patterns, like their design pattern counterparts, define an industry vocabulary for the common defective processes and implementations within organizations.[17] In OOP, the anti-patterns of software design and object-oriented design are dangerous. They will result in bugs and errors in practice, and then finally lead to the failures of software. Here are the examples:[18]&lt;br /&gt;
&lt;br /&gt;
*Abstraction inversion: Not exposing implemented functionality required by users, so that they re-implement it using higher level functions&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
interface foo {&lt;br /&gt;
      int bar();&lt;br /&gt;
  }&lt;br /&gt;
  &lt;br /&gt;
class myClass1 implements foo {&lt;br /&gt;
    // No member variables.&lt;br /&gt;
&lt;br /&gt;
    int bar() {&lt;br /&gt;
        // Implementation&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // No other methods.&lt;br /&gt;
}&lt;br /&gt;
  &lt;br /&gt;
class myClass2 implements foo {&lt;br /&gt;
    // No member variables.&lt;br /&gt;
&lt;br /&gt;
    int bar() {&lt;br /&gt;
        // Implementation&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    // No other methods.&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Ambiguous viewpoint: Presenting a model (usually Object-oriented analysis and design (OOAD)) without specifying its viewpoint&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For example, defining a class model for a telephone exchange system will vary significantly depending upon the focus provided by the &lt;br /&gt;
following perspectives:&lt;br /&gt;
&lt;br /&gt;
  -  Telephone user, who cares about the ease of making calls and receiving itemized bills.&lt;br /&gt;
  -  Telephone operator, who cares about connecting users to required numbers.&lt;br /&gt;
  -  Telephone accounting department, which cares about the formulae for billing and records of all calls made by users.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Big ball of mud: A system with no recognizable structure&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&amp;quot;Big ball of mud&amp;quot; systems have usually been developed over a long period of time, with different individuals &lt;br /&gt;
working on various pieces and parts. Systems developed by people with no formal architecture or programming training &lt;br /&gt;
often fall into this pattern.&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Database-as-IPC: Using a database as the message queue for routine interprocess communication where a much more lightweight mechanism would be suitable&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Storing a list of messages to send: whether it’s emails, SMS messages, or friend requests, if you’re storing a list &lt;br /&gt;
of messages in a table and then looking through the list for messages that need to be sent, you’ve created a job queue.&lt;br /&gt;
&lt;br /&gt;
In this type of structure, Polling, Locking and Data growth cause problems&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Gold plating: Continuing to work on a task or project well past the point at which extra effort is adding value&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
After having met the requirements, the developer works on further enhancing the product, thinking the customer would&lt;br /&gt;
be delighted to see additional or more polished features, rather than what was asked for or expected. The customer &lt;br /&gt;
might be disappointed in the results, and the extra effort by the developer might be futile&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Inner-platform effect: A system so customizable as to become a poor replica of the software development platform&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Example: In plugin-based software such as some text editors and web browsers which often have people creating plugins that &lt;br /&gt;
recreate software that would normally run on top of the operating system itself. The Firefox add-on mechanism has &lt;br /&gt;
been used to develop a number of FTP clients and file browsers, which effectively replicate some of the features &lt;br /&gt;
of the operating system, albeit on a more restricted platform&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Input kludge: Failing to specify and implement the handling of possibly invalid input&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
For example, if a computer program accepts free text input from the user, an ad hoc algorithm will mishandle many &lt;br /&gt;
combinations of legal and illegal input strings. Input kludges are usually difficult for a programmer to detect in &lt;br /&gt;
a unit test, but very easy for the end user to find. The evidence exists that the end user can easily crash software &lt;br /&gt;
that fails to correctly handle user input&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Interface bloat: Making an interface so powerful that it is extremely difficult to implement&amp;lt;br&amp;gt;&lt;br /&gt;
Example:[[File:InterfaceBloat.jpeg|thumb|center]]&lt;br /&gt;
&lt;br /&gt;
*Magic pushbutton: Coding implementation logic directly within interface code, without using abstraction&amp;lt;br&amp;gt;&lt;br /&gt;
Boreland Delphi example&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
procedure TForm1.Button1Click(Sender: TObject); &lt;br /&gt;
var&lt;br /&gt;
 reg:TRegistry;&lt;br /&gt;
begin&lt;br /&gt;
 reg:=TRegistry.Create;&lt;br /&gt;
 try&lt;br /&gt;
   reg.RootKey:=HKey_Current_User;&lt;br /&gt;
   if reg.OpenKey('\\Software\\MyCompany',true) then&lt;br /&gt;
   begin&lt;br /&gt;
     reg.WriteString('Filename',edit1.text);&lt;br /&gt;
   end;&lt;br /&gt;
 finally&lt;br /&gt;
   reg.Free;&lt;br /&gt;
 end;&lt;br /&gt;
end;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Race hazard: Failing to see the consequence of different orders of events&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
If the two threads run simultaneously without locking or synchronization, the outcome of the operation could be wrong&lt;br /&gt;
&lt;br /&gt;
Integer i = 0;&lt;br /&gt;
T1 reads the value of i into a register : 0&lt;br /&gt;
T2 reads the value of i into a register : 0&lt;br /&gt;
T1 increments the value of i : 0 + 1 = 1&lt;br /&gt;
T2 increments the value of i : 0 + 1 = 1&lt;br /&gt;
The final value of i is 1 instead of the expected result of 2.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Stovepipe system: A barely maintainable assemblage of ill-related components&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
A simple example of a stovepipe system is one that implements its own user IDs and passwords, instead of relying on &lt;br /&gt;
a common user ID and password shared with other systems.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Object oriented design anti-patterns ===&lt;br /&gt;
*Anemic Domain Model: The use of domain model without any business logic. The domain model's objects cannot guarantee their correctness at any moment, because their validation and mutation logic is placed somewhere outside (most likely in multiple places).&amp;lt;br&amp;gt;&lt;br /&gt;
[http://vitamic.wordpress.com/2007/01/04/anemic-domain-model-illustrated/     Example]&lt;br /&gt;
*BaseBean: Inheriting functionality from a utility class rather than delegating to it&lt;br /&gt;
*Call super: Requiring subclasses to call a superclass's overridden method&amp;lt;br&amp;gt;&lt;br /&gt;
[http://en.wikipedia.org/wiki/Call_super#Example   Example]&lt;br /&gt;
*Circle-ellipse problem: Subtyping variable-types on the basis of value-subtypes&amp;lt;br&amp;gt;&lt;br /&gt;
[http://pawasranjan.github.com/cse230/lecture/drawbacks-of-object-orientation.html    Example]&lt;br /&gt;
*Circular dependency: Introducing unnecessary direct or indirect mutual dependencies between objects or software modules&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
class A&lt;br /&gt;
{&lt;br /&gt;
  public A()&lt;br /&gt;
  {&lt;br /&gt;
    myB.DoSomething();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  private B myB = new B();&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
class B&lt;br /&gt;
{&lt;br /&gt;
  public B()&lt;br /&gt;
  {&lt;br /&gt;
    myA.DoSomething();&lt;br /&gt;
  }&lt;br /&gt;
&lt;br /&gt;
  private A myA = new A();&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
*Constant interface: Using interfaces to define constants&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public interface Constants {&lt;br /&gt;
 &lt;br /&gt;
        double PI = 3.14159;&lt;br /&gt;
        double PLANCK_CONSTANT = 6.62606896e-34;&lt;br /&gt;
}&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
public class Calculations implements Constants {&lt;br /&gt;
 &lt;br /&gt;
        public double getReducedPlanckConstant() {&lt;br /&gt;
                return PLANCK_CONSTANT / (2 * PI);&lt;br /&gt;
        }&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Alternative:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public final class Constants {&lt;br /&gt;
 &lt;br /&gt;
        private Constants() {&lt;br /&gt;
                // restrict instantiation&lt;br /&gt;
        }&lt;br /&gt;
 &lt;br /&gt;
        public static final double PI = 3.14159;&lt;br /&gt;
        public static final double PLANCK_CONSTANT = 6.62606896e-34;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*God object: Concentrating too many functions in a single part of the design (class)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
public void ExporterExcelParFonds(ParametresExecution parametres)&lt;br /&gt;
    {&lt;br /&gt;
        ApplicationExcel appExcel = null;&lt;br /&gt;
        LogTool.Instance.ExceptionSoulevee = false;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
        bool inclureReferences = parametres.inclureReferences;&lt;br /&gt;
        bool inclureBornes = parametres.inclureBornes;&lt;br /&gt;
        DateTime dateDebut = parametres.date;&lt;br /&gt;
        DateTime dateFin = parametres.dateFin;&lt;br /&gt;
&lt;br /&gt;
        try&lt;br /&gt;
        {&lt;br /&gt;
            LogTool.Instance.AfficherMessage(Variables.msg_GenerationRapportPortefeuilleReference);&lt;br /&gt;
&lt;br /&gt;
            bool fichiersPreparesAvecSucces = PreparerFichiers(parametres, Sections.exportExcelParFonds);&lt;br /&gt;
            if (!fichiersPreparesAvecSucces)&lt;br /&gt;
            {&lt;br /&gt;
                parametres.afficherRapportApresGeneration = false;&lt;br /&gt;
                LogTool.Instance.ExceptionSoulevee = true;&lt;br /&gt;
            }&lt;br /&gt;
            else&lt;br /&gt;
            {  .....................&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Call :  PortefeuillesReference pr = new PortefeuillesReference();&lt;br /&gt;
        pr.ExporterExcelParFonds(parametres);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Object cesspool: Reusing objects whose state does not conform to the (possibly implicit) contract for re-use&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.patrickdelancy.com/2012/07/object-cesspool-anti-pattern/#.UGWaP02HKao   Example]&lt;br /&gt;
*Object orgy: Failing to properly encapsulate objects permitting unrestricted access to their internals&amp;lt;br&amp;gt;&lt;br /&gt;
*Poltergeists: Objects whose sole purpose is to pass information to another object&amp;lt;br&amp;gt;&lt;br /&gt;
[http://sourcemaking.com/files/sm/images/antipatterns/img_34.jpg  Example]&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
Class PEACH_CANNER_CONTROLLER is a Poltergeist because:&lt;br /&gt;
&lt;br /&gt;
    -   It has redundant navigation paths to all other classes in the system.&lt;br /&gt;
    -   All of its associations are transient.&lt;br /&gt;
    -   It has no state.&lt;br /&gt;
    -   It is a temporary, short-duration class that pops into existence only to invoke other classes through temporary associations.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Sequential coupling: A class that requires its methods to be called in a particular order&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
C program where set of procedure calls must take place in a particular order&lt;br /&gt;
&lt;br /&gt;
Overall(...)&lt;br /&gt;
{&lt;br /&gt;
p1(...) ;&lt;br /&gt;
p2(...) ;&lt;br /&gt;
// ...&lt;br /&gt;
pN(...) ;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*Yo-yo problem: A structure (e.g., of inheritance) that is hard to understand due to excessive fragmentation&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= How to Prevent Bad OOD=&lt;br /&gt;
&lt;br /&gt;
One of the major causes of limited success in adopting object-oriented methodologies is the failure of management and design teams to riecognize and plan for the scope of this change [23]. If preventive measure are taken software failure can be avoided and organisations can benefit from OOD. Assessing quality of sojtware at the design level will provide ease and higher accuracy for users[25]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some of the methods are listed below.&lt;br /&gt;
&lt;br /&gt;
==Identifying Code Smells==&lt;br /&gt;
[http://en.wikipedia.org/wiki/Code_smell Code Smells]or Bad smells are used to identify problematic classes in object-oriented design[20]. They can also be used to measure the evolvability of software [21]. code smells are broadly classified into 5 categories [21].&lt;br /&gt;
&lt;br /&gt;
[[File:bad-code-smells.jpg|center|border|600px|An image showing classification of code smells]]&lt;br /&gt;
&amp;lt;center&amp;gt;Figure 1: An image showing classification of code smells&amp;lt;/center&amp;gt;&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
{| border=&amp;quot;1&amp;quot; cellpadding=&amp;quot;2&amp;quot;&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;100px&amp;quot; | Group Name&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;225px&amp;quot; | Smells in Group&lt;br /&gt;
! scope=&amp;quot;col&amp;quot; width=&amp;quot;700px&amp;quot; | Discussion&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Bloaters&amp;lt;/b&amp;gt; || -Long Method&amp;lt;br&amp;gt;-Large Class&amp;lt;br&amp;gt;-Primitive Obsession&amp;lt;br&amp;gt;-Long Parameter List&amp;lt;br&amp;gt;-DataClumps&amp;lt;br&amp;gt; || Bloater smells represents something that has grown so large that it cannot be effectively handled.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;It seems likely that these smells grow a little bit at a time. Hopefully nobody designs, e.g., Long Methods.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Primitive Obsession is actually more of a symptom that causes bloats than a bloat itself. The same holds for Data Clumps. When a Primitive Obsession exists, there are no small classes for small entities (e.g. phone numbers). Thus, the functionality is added to some other class, which increases the class and method size in the software. With Data Clumps there exists a set of primitives that always appear together (e.g. 3 integers for RGB colors). Since these data items are not encapsulated in a class this increases the sizes of methods and classes. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Object-Orientation Abusers&amp;lt;/b&amp;gt; || -Switch Statements&amp;lt;br&amp;gt;-Temporary Field&amp;lt;br&amp;gt;-Refused Bequest&amp;lt;br&amp;gt;-Alternative Classes with Different Interfaces&amp;lt;br&amp;gt; || The common denominator for the smells in the Object-Orientation Abuser category is that they represent cases where the solution does not fully exploit the possibilities of object-oriented design.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;For example, a Switch Statement might be considered acceptable or even good design in procedural programming, but is something that should be avoided in object-oriented programming. The situation where switch statements or type codes are needed should be handled by creating subclasses. Parallel Inheritance Hierarchies and Refused Bequest smells lack proper inheritance design, which is one of the key elements in object-oriented programming. The Alternative Classes with Different Interfaces smell lacks a common interface for closely related classes, so it can also be considered a certain type of inheritance misuse. The Temporary Field smell means a case in which a variable is in the class scope, when it should be in method scope. This violates the information hiding principle.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Change Preventers&amp;lt;/b&amp;gt; || -Divergent Change&amp;lt;br&amp;gt;-Shotgun Surgery&amp;lt;br&amp;gt;-Parallel Inheritance Hierarchies&amp;lt;br&amp;gt; || Change Preventers are smells is that hinder changing or further developing the software&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;These smells violate the rule suggested by Fowler and Beck which says that classes and possible changes should have a one-to-one relationship. For example, changes to the database only affect one class, while changes to calculation formulas only affect the other class.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The Divergent Change smell means that we have a single class that needs to be modified by many different types of changes. With the Shotgun Surgery smell the situation is the opposite, we need to modify many classes when making a single change to a system (change several classes when changing database from one vendor to another)&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Parallel Inheritance Hierarchies, which means a duplicated class hierarchy, was originally placed in OO-abusers. One could also place it inside of The Dispensables since there is redundant logic that should be replaced.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Dispensables&amp;lt;/b&amp;gt; || -Lazy class&amp;lt;br&amp;gt;-Data class&amp;lt;br&amp;gt;-Duplicate Code&amp;lt;br&amp;gt;-Dead Code&amp;lt;br&amp;gt;-Speculative Generality&amp;lt;br&amp;gt; || The common thing for the Dispensable smells is that they all represent something unnecessary that should be removed from the source code.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;This group contains two types of smells (dispensable classes and dispensable code), but since they violate the same principle, we will look at them together. If a class is not doing enough it needs to be removed or its responsibility needs to be increased. This is the case with the Lazy class and the Data class smells. Code that is not used or is redundant needs to be removed. This is the case with Duplicate Code, Speculative Generality and Dead Code smells. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;b&amp;gt;The Couplers&amp;lt;/b&amp;gt; || -Feature Envy&amp;lt;br&amp;gt;-Inappropriate Intimacy&amp;lt;br&amp;gt;-Message Chains&amp;lt;br&amp;gt;-Middle Man&amp;lt;br&amp;gt; || This group has four coupling-related smells.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;One design principle that has been around for decades is low coupling (Stevens et al. 1974) . This group has 3 smells that represent high coupling. Middle Man smell on the other hand represent a problem that might be created when trying to avoid high coupling with constant delegation. Middle Man is a class that is doing too much simple delegation instead of really contributing to the application.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;The Feature Envy smell means a case where one method is too interested in other classes, and the Inappropriate Intimacy smell means that two classes are coupled tightly to each other. Message Chains is a smell where class A needs data from class D. To access this data, class A needs to retrieve object C from object B (A and B have a direct reference). When class A gets object C it then asks C to get object D. When class A finally has a reference to class D, A asks D for the data it needs. The problem here is that A becomes unnecessarily coupled to classes B, C, and D, when it only needs some piece of data from class D. The following example illustrates the message chain smell: A.getB().getC().getD().getTheNeededData()&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;Of course, I could make an argument that these smells should belong to the Object-Orientation abusers group, but since they all focus strictly on coupling, I think it makes the taxonomy more understandable if they are introduced in a group of their own.&lt;br /&gt;
|}&lt;br /&gt;
&amp;lt;center&amp;gt;Table 1: Code Smells Clasification&amp;lt;/center&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== MOOD (Metrics for Object Oriented Design) ==&lt;br /&gt;
&lt;br /&gt;
Impact of Object-Oriented design on software quality characteristics can be experimentally evaluated. A suite of metrics for OO-design, called MOOD, was adopted to measure the use of OO design mechanisms [24]. The FCM (Factors, Criteria, Measurement) model indicates that software quality depends on the software quality measurement.[25]&lt;br /&gt;
&lt;br /&gt;
                                        Factors ---&amp;gt; Criteria ---&amp;gt; Measurement&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Motivations behind the MOOD set definition include:&lt;br /&gt;
&lt;br /&gt;
* Coverage of basic structural mechanisms of the object-oriented paradigm such as encapsulation, inheritance, polymorphism and message-passing.&lt;br /&gt;
* Formal definition to avoid subjectivity of measurement and thus allow replicability.&lt;br /&gt;
* Size independence to allow inter-projecl comparison,thus fostering cumulative knowledge.&lt;br /&gt;
* Language independence to broaden the applicability of this metric set by allowing comparison of heterogeneous system implementations.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;MOOD includes the following metrics:&lt;br /&gt;
&lt;br /&gt;
* Method Hiding Factor (MHF)&lt;br /&gt;
* Attribute Hiding Factor (AHF)&lt;br /&gt;
* Method Inheritance Factor (MIF)&lt;br /&gt;
* Attribute Inheritance Factor (AIF)&lt;br /&gt;
* Polymorphism Factor (POF)&lt;br /&gt;
* Coupling Factor (COF)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br&amp;gt;Each of these metrics refers to a basic structural mechanism of the object-oriented paradigm as encapsulation (MHF and AHF), inheritance (MIF and AIF), polymorphism (POF) and message-passing (COF). The MOOD metrics definitions make no reference to specific language constructs. However, since each language has its own constructs that allow for implementation of OO mechanisms&lt;br /&gt;
in more or less detail.&lt;br /&gt;
&lt;br /&gt;
= Well-Known Software Failures =&lt;br /&gt;
&lt;br /&gt;
*Microsoft Zune's New Year Crash. [http://www.thestreet.com/story/10455712/microsoft-zunes-new-year-crash.html Article] [http://www.zuneboards.com/forums/showthread.php?t=38143 Bug]&lt;br /&gt;
*Air-Traffic Control System in LA Airport. [http://spectrum.ieee.org/aerospace/aviation/lost-radio-contact-leaves-pilots-on-their-own Article]&lt;br /&gt;
*Northeast Blackout. [http://www.securityfocus.com/news/8032 Article]&lt;br /&gt;
*NASA Mars Climate Orbiter. [http://www.cse.lehigh.edu/~gtan/bug/localCopies/marsOrbiter Article]&lt;br /&gt;
*Denver Airport Baggage-handling System. &lt;br /&gt;
*USS Yorktown Incident [http://www.cse.lehigh.edu/~gtan/bug/localCopies/yorktown/yorktown.htm Article]&lt;br /&gt;
*Ariane 5 Explosion [http://www.around.com/ariane.html Article]&lt;br /&gt;
&lt;br /&gt;
= References =&lt;br /&gt;
[1] http://www.zdnet.com/blog/projectfailures/cio-analysis-defining-it-project-success-and-failure/12524&amp;lt;br&amp;gt;&lt;br /&gt;
[2] http://www.42spikes.com/post/What-is-Software-Success.aspx&amp;lt;br&amp;gt;&lt;br /&gt;
[3] http://www.crcpress.com/product/isbn/9781439838129&amp;lt;br&amp;gt;&lt;br /&gt;
[4] J. C. Laprie (Ed.). Dependability: Basic Concepts and Terminology.  Springer-Verlag, Wein, New York, 1992.&amp;lt;br&amp;gt;&lt;br /&gt;
[5] http://ac-support.europe.umuc.edu/~meinkej/inss690/wilson.htm&amp;lt;br&amp;gt;&lt;br /&gt;
[6] http://www.it-cortex.com/Stat_Failure_Rate.htm&amp;lt;br&amp;gt;&lt;br /&gt;
[7] http://www.selectbs.com/process-maturity/what-is-object-oriented-design&amp;lt;br&amp;gt;&lt;br /&gt;
[8] http://softwaredesign.com/objects.html&amp;lt;br&amp;gt;&lt;br /&gt;
[9] http://www.selectbs.com/process-maturity/what-is-object-oriented-design&amp;lt;br&amp;gt;&lt;br /&gt;
[10] http://www.objectmentor.com/omSolutions/oops_what.html&amp;lt;br&amp;gt;&lt;br /&gt;
[11] http://codebetter.com/raymondlewallen/2005/07/19/4-major-principles-of-object-oriented-programming&amp;lt;br&amp;gt;&lt;br /&gt;
[12] http://webcache.googleusercontent.com/search?q=cache:TwYgDNxgxUMJ:en.wikipedia.org/wiki/Design_pattern_%28computer_science%29+object+oriented+design+patterns&amp;amp;cd=3&amp;amp;hl=en&amp;amp;ct=clnk&amp;amp;gl=us&amp;lt;br&amp;gt;&lt;br /&gt;
[13] http://en.wikipedia.org/wiki/GRASP_%28object-oriented_design%29&amp;lt;br&amp;gt;&lt;br /&gt;
[14] http://www.brandonsavage.net/five-tips-to-make-good-object-oriented-code-better&amp;lt;br&amp;gt;&lt;br /&gt;
[15] http://stackoverflow.com/questions/345698/what-are-the-tell-tale-signs-of-bad-object-oriented-design&amp;lt;br&amp;gt;&lt;br /&gt;
[16] Budgen, D. (2003). Software design. Harlow, Eng.: Addison-Wesley. &amp;quot;As described in Long (2001), design anti-patterns are 'obvious, but wrong, solutions to recurring problems'&amp;quot;p. 225. ISBN 0-201-72219-4.&amp;lt;br&amp;gt;&lt;br /&gt;
[17] http://sourcemaking.com/antipatterns &amp;lt;br&amp;gt;&lt;br /&gt;
[18] http://en.wikipedia.org/wiki/Anti-pattern&amp;lt;br&amp;gt;&lt;br /&gt;
[19] Evaluating the Impact of Object-Oriented Design on Software Quality. Fernando Brito e Abreu and WalcClio Melo. 0-8186-7364-8196 0 1996 IEEE, Proceedings of METRICS ’96&amp;lt;br&amp;gt;&lt;br /&gt;
[20] An Investigation of Bad Smells in Object-Oriented Design, Raed Shatnawi and Wei Li, Proceedings of the Third International Conference on Information Technology: New Generations (ITNG'06) 0-7695-2497-4/06 © 2006 IEEE&amp;lt;br&amp;gt;&lt;br /&gt;
[21] Subjective evaluation of software evolvability using code smells: An empirical study, Mika V. Mantyla &amp;amp; Casper Lassenius Published online: 27 May 2006&amp;lt;br&amp;gt;&lt;br /&gt;
[22] Essential Use Cases and Responsibility in ObjectOriented Development, Robert Biddle, James Noble, Ewan Tempero, Copyright © 2001&amp;lt;br&amp;gt;&lt;br /&gt;
[23] The Reality of Ob j ect-Oriented Technology in the Corporation, Jean Scholtz&amp;lt;br&amp;gt;&lt;br /&gt;
[24] Evaluating the Impact of Object-Oriented Design on Software Quality, Fernando Brito e Abreu and WalcClio Melo, 0-8186-7364-8196 0 1996 IEEE Proceedings of METRICS ’96.&amp;lt;br&amp;gt;&lt;br /&gt;
[25] Quality Metrics of Object Oriented Design for Software Development and Re-development, K. Liu, S. Zhou and H. Yang, 0-7695-0825-i/00 © 2000 IEEE&amp;lt;br&amp;gt;&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69567</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69567"/>
		<updated>2012-11-16T13:05:49Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Design Patterns */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
Design principles are guidelines and heuristics for a good object oriented designs. There are many different design principles of Object-Oriented Design. Here are 4 major principles of them:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29 Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_%28object-oriented_programming%29 Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 Polymorphism]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69566</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69566"/>
		<updated>2012-11-16T13:05:11Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Currying */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
Design principles are guidelines and heuristics for a good object oriented designs. There are many different design principles of Object-Oriented Design. Here are 4 major principles of them:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29 Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_%28object-oriented_programming%29 Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 Polymorphism]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Design Patterns==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Design_pattern_(computer_science) Design pattern] is a general reusable solution to a commonly occurring problem within a given context. It is a template describing how to solve a problem, which cannot be transformed directly into code. Object-oriented design patterns typically show relationships and interactions between classes or objects, without specifying the final application classes or objects that are involved. Many patterns imply object-orientation or more generally mutable state, and so may not be as applicable in functional programming languages, in which data is immutable or treated as such. [12]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
There are many types of design patterns, like:&lt;br /&gt;
*Creator&lt;br /&gt;
*Controller&lt;br /&gt;
*High Cohesion&lt;br /&gt;
*Indirection&lt;br /&gt;
*Protected Variations&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69565</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69565"/>
		<updated>2012-11-16T13:01:24Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object Oriented Design (OOD) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/OOD Object Oriented Design (OOD)] is a methodology to develop a solution by creating structured objects which interact with each other through well defined interfaces. The object interaction involves invocation of required services and exchange of corresponding data. An object contains data and set of methods or procedures which act on that data. Access to data can be controlled based on access specifiers. The input to the problem is passed to the object through method invocations which are defined by the interfaces. Interfaces define the procedure name and the parameters. The object implements the methods of the  interfaces and also encapsulate data needed for solving the problem which can include instances of other objects.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#An_example_of_Object_Oriented_Design Here] is an example of Object Oriented Design.&lt;br /&gt;
 &lt;br /&gt;
Advantages of Object Oriented Design:&lt;br /&gt;
* Code Reusablility&amp;lt;br&amp;gt;&lt;br /&gt;
* Real-World Modeling&amp;lt;br&amp;gt;&lt;br /&gt;
* Robustness and Reliability&amp;lt;br&amp;gt;&lt;br /&gt;
* Less Maintenance&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Traits of a poor Object Oriented Design are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Traits_of_a_poor_Object_Oriented_Design here].&lt;br /&gt;
&lt;br /&gt;
Little about Software success and Software failure is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w44_as#Software_success_and_failure here].&lt;br /&gt;
&lt;br /&gt;
The 5 Basic Concepts of Object Oriented Design are the implementation level features that are built into the programming language. These features are often referred to by these common names:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Interface_(Java) Interface]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_(computer_science) Polymorphism]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
There are several concepts that were derived from the new languages once they became popular. The new standards that came around pushed on three major things: &lt;br /&gt;
*[http://en.wikipedia.org/wiki/Reusability Re-usability]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Privacy_software Privacy]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Software_documentation Documentation]&lt;br /&gt;
&lt;br /&gt;
Design principles are guidelines and heuristics for a good object oriented designs. There are many different design principles of Object-Oriented Design. Here are 4 major principles of them:&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Encapsulation_%28object-oriented_programming%29 Encapsulation]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Abstraction_%28computer_science%29 Abstraction]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Inheritance_%28object-oriented_programming%29 Inheritance]&lt;br /&gt;
*[http://en.wikipedia.org/wiki/Polymorphism_%28computer_science%29 Polymorphism]&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69564</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69564"/>
		<updated>2012-11-16T11:56:15Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object Oriented Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Design (OOD)==&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69563</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69563"/>
		<updated>2012-11-16T11:54:11Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Behavior-Driven Design */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Behaviour Driven Design( abbreviated '''BDD''') is a [http://en.wikipedia.org/wiki/Software_development_methodology software development methodology] which involves incorporating [http://en.wikipedia.org/wiki/Stakeholder stakeholder’s] point of view in the development of the software. The software is implemented by taking into consideration its behavior as described by its stakeholders.&lt;br /&gt;
&lt;br /&gt;
BDD was developed by [http://dannorth.net/introducing-bdd Dan North ] .BDD comes under [http://en.wikipedia.org/wiki/Agile_software_development agile development]. Agile development came into picture to overcome the reasons for software project failure.Some of the reasons for software project failure are:&amp;lt;ref name=&amp;quot;video&amp;quot;&amp;gt;http://www.youtube.com/watch?v=q_A5kAMygOI&amp;lt;br&amp;gt;&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Lack of understanding of user requirements.&lt;br /&gt;
* Changing requirements&lt;br /&gt;
* Pressure to meet the project deadline.&lt;br /&gt;
* Budget and time constraints&lt;br /&gt;
* Difficulty in software development and management&lt;br /&gt;
* Miscommunication or lack of communication between stakeholders.&lt;br /&gt;
&lt;br /&gt;
Agile development involves stakeholder participation throughout the lifetime of the product.&lt;br /&gt;
BDD helps achieve this objective of agile development.[http://en.wikipedia.org/wiki/User_story User stories] are written in BDD to describe the feature that is to be implemented.User stories can then be used to write tests to check  the behaviour desired by the stakeholder.[http://en.wikipedia.org/wiki/Test-driven_development Test Driven Development] approach can then be used to implement the system.&lt;br /&gt;
&lt;br /&gt;
BDD is explained in detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Understanding_BDD here].&lt;br /&gt;
&lt;br /&gt;
[http://jbehave.org/ JBehave] and [http://dannorth.net/2007/06/17/introducing-rbehave/ RBehave] are the two popular [http://en.wikipedia.org/wiki/Software_framework frameworks] that support BDD. &lt;br /&gt;
&lt;br /&gt;
The steps for the BDD approach is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Frameworks_for_BDD here].&lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of BDD and User Stories are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w69_mv#Advantages_of_BDD_and_User_Stories here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69562</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69562"/>
		<updated>2012-11-16T11:31:20Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Code Reuse */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Behavior-Driven Design==&lt;br /&gt;
 &lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69561</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69561"/>
		<updated>2012-11-16T11:27:38Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Generic Programming in Object Oriented Languages and Systems */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
Generic Programming is a programming paradigm for developing efficient and reusable software libraries. The Generic Programming process focuses on finding commonality among similar implementations of the same algorithm, then providing suitable abstractions so that a single, generic algorithm can cover many concrete implementations. This process is repeated until the generic algorithm has reached a suitable level of abstraction, where it provides maximal re-usability while still yielding efficient, concrete implementations.&lt;br /&gt;
&lt;br /&gt;
In the simplest definition, generic programming is a style of computer programming in which algorithms are written in terms of to-be-specified-later types that are then instantiated when needed for specific types provided as parameters. This approach, pioneered by Ada in 1983, permits writing common functions or types that differ only in the set of types on which they operate on, thus reducing duplication. Such software entities are known as generics in Ada, Eiffel, Java and .NET; parametric polymorphism in ML, Scala and Haskell ; templates in C++; and parameterized types in the influential 1994 book, Design Patterns.&lt;br /&gt;
&lt;br /&gt;
The term generic programming was originally coined by David Musser and Alexander Stepanov in a more specific sense than the above, to describe an approach to software decomposition whereby fundamental requirements on types are abstracted from across concrete examples of algorithms and data structures and formalized as concepts, analogously to the abstraction of algebraic theories in abstract algebra. Early examples of this programming approach were implemented in Scheme and Ada, although the best known example is the Standard Template Library (STL) in which is developed a theory of iterators which is used to decouple sequence data structures and the algorithms operating on them.&lt;br /&gt;
&lt;br /&gt;
Generics in .NET framework is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_.NET_framework here].&lt;br /&gt;
&lt;br /&gt;
Generics in JAVA is given  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_Java here].&lt;br /&gt;
&lt;br /&gt;
Generics in C++ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w47_sk#Generics_in_C.2B.2B here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69560</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69560"/>
		<updated>2012-11-16T11:22:40Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Access Control in Object Oriented Languages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Generic Programming in Object Oriented Languages and Systems==&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69559</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69559"/>
		<updated>2012-11-16T11:19:03Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Collection Framework */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
A Collection is a data structure representing a group of data items sharing common properties (or state) and behaviour. Generally data items represents object of same type and their behaviour is governed by the set of operation that can be performed on them. An Array also represents a group of related objects but Array are not considered as collection because an array can only hold a fixed number of items however size of collection is variable, or dynamic. In sum, a collection can be viewed as a single object containing multiple numbers of elements. Few collection types include trees, sets, ArrayList, Dictionary etc.&lt;br /&gt;
&lt;br /&gt;
In order to create, manage and manipulate collection, we have collection framework which depicts representation and manipulation of collection elements independent of their implementation details. It defines application programming interfaces (API’s) consisting of classes and interfaces for manipulating data in collection. &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Advantages_of_collection_framework Here] are few advantages of collection framework. &lt;br /&gt;
&lt;br /&gt;
Elements of collection framework: &lt;br /&gt;
a) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Collection Interfaces]&lt;br /&gt;
b) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Collection_Interfaces_and_Implementations Implementations]&lt;br /&gt;
c) [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Algorithm_in_Collection_Framework Algorithm]&lt;br /&gt;
&lt;br /&gt;
Implementation of Collection framework in .NET is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w30_rp#Implementation_of_Collection_in_.NET here].&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69558</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69558"/>
		<updated>2012-11-16T11:10:17Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Scaffolding */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Collection Framework==&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69557</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69557"/>
		<updated>2012-11-16T11:07:20Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object-Relational Mapping */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Currying==&lt;br /&gt;
&lt;br /&gt;
Currying is a term which is associated with Mathematics and computer science. Currying is the mathematical process of using a function with multiple arguments such that a string of multiple functions with single argument can be called to realize the same function. In other words, currying is defined as delayed function of incomplete arguments which works normally when arguments are supplied. &lt;br /&gt;
Back in 1924 Moses Ilyich Schönfinkel, a Russian logician, discovered this property of function. But this discovery of his was later re discovered and built upon by Haskell Curry , an American mathematician and logician. In honor of the contributions made by Haskell Curry the technique was named after him.&lt;br /&gt;
Definition of currying is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#What_is_currying.3F here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Applications_of_currying Here] are few applications of currying.&lt;br /&gt;
Differences between Partial functions and Currying are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w35_sa#Difference_between_Partial_functions_and_Currying here]. &lt;br /&gt;
The main advantage of currying is that it provides a way to proof read the functions and check whether all have been applied uniformly on all the arguments. There are other advantages as well like decreasing the amount of complicated codes and hence high level of maintainability. This when compared to partials becomes more accurate for same reason. But as the cliche goes, every coin has two sides, there are few disadvantages of currying as well. The major disadvantage of currying is that it has performance issues. The code is though simple but might result in lengthy ones when compared to partials and hence calling the curried functions might fetch slow performance rate. &lt;br /&gt;
Uncurrying is de-functaionlization of curried functions. It takes additional parameters along with curried function to return the actual function with all the arguments. Multiple iterations might be required to get back the original (uncurried) function.&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69556</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69556"/>
		<updated>2012-11-16T10:57:07Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Object Oriented Programming */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms. &lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
Re- implantation of methods in PHP 5 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_PHP_5 here].&lt;br /&gt;
&lt;br /&gt;
Re- implantation of methods in Objective-C is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Objective-C here].&lt;br /&gt;
Re-implementation of Methods in Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-implementation_of_Methods_in_Python here].&lt;br /&gt;
Re- implantation of methods in Perl is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w34_vd#Re-_implantation_of_methods_in_Perl here].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
	<entry>
		<id>https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69555</id>
		<title>CSC/ECE 517 Fall 2012/Table Of Contents</title>
		<link rel="alternate" type="text/html" href="https://wiki.expertiza.ncsu.edu/index.php?title=CSC/ECE_517_Fall_2012/Table_Of_Contents&amp;diff=69555"/>
		<updated>2012-11-16T10:44:04Z</updated>

		<summary type="html">&lt;p&gt;Skillam: /* Ruby */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Introduction=&lt;br /&gt;
&lt;br /&gt;
This wiki page will give you the outline of the topics from Wiki 1a and 1b. A brief introduction to the topics covered(in 1a and 1b) and the links to the appropriate topic is available on this page.&lt;br /&gt;
&lt;br /&gt;
==Object Oriented Programming==&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Object-oriented_Programming ''Object-oriented programming (OOP)''] is a programming language model organized around &amp;quot;objects&amp;quot; rather than &amp;quot;actions&amp;quot; and data rather than logic.&lt;br /&gt;
An introduction to Object Oriented Programming and its primary concepts like abstraction,polymorphism,encapsulation and inheritance are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#What_is_Object_Oriented_Programming.3F here].Features and advantages of Object oriented programming is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Features_of_Object-oriented_Programming here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Functional_Programming Functional programming] is a programming paradigm that treats computation as the evaluation of mathematical functions and avoids state and mutable data. Functional programming decomposes a problem into a set of functions.It is the opposite of object oriented Programming.&lt;br /&gt;
Advantages of functional programming are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Advantages_of_Functional_Programming here].&lt;br /&gt;
We can perform functional programming on an object-oriented programming language because of the following reasons:&lt;br /&gt;
*Object can have constant state.&lt;br /&gt;
*Method can depend only on its arguments and context available at method definition time.&lt;br /&gt;
&lt;br /&gt;
Combining both of these paradigms will not only provide us a robust design structure, but also will enable the programmers to develop solutions to complex problems quickly and effectively.More details can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Mixing_Functional_and_Object-Oriented_Programming here].&lt;br /&gt;
&lt;br /&gt;
Some of the basic features of Functional Programming which can be combined with Object Oriented paradigm are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Lambda_Calculus Lambda Calculus]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Currying Currying]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Pattern_Matching Powerful pattern matching]&lt;br /&gt;
&lt;br /&gt;
A number of programming languages support mixing of both functional and object-oriented code. Three of these (Scala, Ruby, and Conjure), are described in more detail [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w8_aa#Examples_of_Mixing here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In any programming language, the [http://en.wikipedia.org/wiki/Data_type data type] refers to the class of data which contains specific type or range of values. Data types are used along with variables used in the program. The data type tells us what kind of values the variable can store, what is the range of the values and how much space the values take in memory etc.&lt;br /&gt;
&lt;br /&gt;
The [http://en.wikipedia.org/wiki/Primitive_data_type primitive data types] refer to the built-in data types which are supported by the programming language. Often 'data types' and 'primitive data types' are used interchangeably. But not all data types are primitive. Programming languages have some non-primitive data types or derived data types which are provided by the language by making use of its primitive data types.&lt;br /&gt;
&lt;br /&gt;
The common built-in data types or primitive data types are integers, floating point numbers, characters, strings and boolean.&lt;br /&gt;
* Integers - Integers represent the whole numbers which can be positive or negative or zero, e.g. 9999, 0, -25, etc. &lt;br /&gt;
* Floating point numbers - Floating point numbers represent the numbers which are fractions or contain floating-decimal points, e.g. -3.002, 2.5, 22.0, etc.&lt;br /&gt;
* Characters - Characters represent any single letter, number, space, punctuation mark, or symbol that can be typed on a computer, e.g. 'a', '9', ' ', '!' , '\n', etc.&lt;br /&gt;
* Strings - Strings represent the sequences of characters or simply any text, e.g. &amp;quot;Hello!&amp;quot;, &amp;quot;9 am to 6 pm&amp;quot;, etc. &lt;br /&gt;
* Booleans - Booleans represent the true or false values. Sometimes, instead of true and false, 1 and 0 are used to represent the boolean values.&lt;br /&gt;
&lt;br /&gt;
Many [http://en.wikipedia.org/wiki/Object-oriented_programming object-oriented programming] languages provide support for primitive data types while some object-oriented programming languages provide support for primitive objects along with primitive types.&lt;br /&gt;
&lt;br /&gt;
Primitive objects refer to the objects of built-in classes which provide more functionality than the primitive types. Some object-oriented programming languages provide support for only primitive objects (i.e., in such languages all primitive types are objects).&lt;br /&gt;
&lt;br /&gt;
Different object-oriented programming languages implement these primitive data types and primitive objects in a different manner.&lt;br /&gt;
&lt;br /&gt;
Primitive objects in different OO languages like C++,JAVA,C#,JavaScript,Ruby are explained [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Primitive_objects_in_different_OO_languages here].&lt;br /&gt;
&lt;br /&gt;
Advantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Efficiency efficiency]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Simplicity simplicity].&lt;br /&gt;
&lt;br /&gt;
Disadvantages of using primitive data types are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Lack_of_inheritance_capability lack of inheritance capability]*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Not_Scalable not scalable]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Utility_Functions Utility functions]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Null_Values Null values]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w21_aa#Unexpected_results_due_to_method_overriding Unexpected results due to method overriding].&lt;br /&gt;
&lt;br /&gt;
Inheritance is an object oriented programming concept for code reuse. It says that we can define a subclass on a parent class and that will inherit its parent’s attributes and behavior &amp;lt;ref name=&amp;quot;inheritance&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Inheritance_(computer_science) Inheritance]&amp;lt;/ref&amp;gt;. Consider the following example given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Inheritance here].&lt;br /&gt;
&lt;br /&gt;
In some cases object [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch3_S30_SK#Decomposition composition] is an alternative to class inheritance to achieve code re-usability. Here, new complex functionality is achieved by assembling or composing objects &amp;lt;ref name=&amp;quot;objectcomposition&amp;quot;&amp;gt;[http://en.wikipedia.org/wiki/Object_composition Object Composition]&amp;lt;/ref&amp;gt;. Unlike inheritance, composition relies on reuse of interface rather than implementation. Consider the new object as a large container &amp;lt;ref name=&amp;quot;Design Principles&amp;quot;&amp;gt;[http://www.artima.com/lejava/articles/designprinciples4.html Design Principles]&amp;lt;/ref&amp;gt;. Complex functionality is achieved in this larger container by placing smaller closed containers inside it. Every smaller object has its own independent implementation hidden from the outer container. Thus composition provides encapsulation in the true sense. This is why composition is also called the black box approach for code reuse. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Composition here].&lt;br /&gt;
&lt;br /&gt;
Another concept related to object composition is that of Aggregation. Suppose we also use a class Person in the Chair class to represent the person occupying the chair &amp;lt;ref name=&amp;quot;compositionaggregation&amp;quot;&amp;gt;[http://www.adobe.com/devnet/actionscript/learning/oop-concepts/composition-and-aggregation.html Composition and Aggregation]&amp;lt;/ref&amp;gt;. Then this person is not initialized in the Chair class as a person has an existence irrespective of the chair, whereas the seat, backrest and legs do not have any existence without the chair.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch6_6a_PC Delegation] is a way of making composition as powerful for reuse as inheritance &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. Delegation involved two objects: a delegator who delegates a operation to another object, the delegatee. This can be compared to inheritance where a subclass &amp;quot;defers&amp;quot; request to the parent class for a method which is not overridden in the subclass &amp;lt;ref name=&amp;quot;Delegation&amp;quot;&amp;gt;[http://www.whigg.cas.cn/resource/program/CPP/201010/P020101022562155422801.pdf Design Patterns]&amp;lt;/ref&amp;gt;. The advantage of delegation over inheritance is that delegation allows composition behavior to occur dynamically at run-time, whereas inheritance causes the relationship to be established statically at compile-time. Although, overuse or delegation may make the code hard to understand and may invite runtime inefficiencies.&lt;br /&gt;
&lt;br /&gt;
Few drawbacks/disadvantages of inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#Let_us_convince_ourselves_that_Inheritance_is_bad_at_certain_places here].&lt;br /&gt;
&lt;br /&gt;
After knowing the concepts above, few questions arise:&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Inheritance_instead_of_Composition.2FAggregation When to use Inheritance instead of Composition/Aggregation?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Composition.2FAggregation_instead_of_Inheritance When to use Aggregation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#When_to_use_Delegation_instead_of_Inheritance When to use Delegation instead of Inheritance?]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Introduction''Multiple Inheritance''] is one of the features of a few Object-oriented (OO) languages in which a class inherits properties (variables &amp;amp; methods) from more than one parent class . The former is called a sub or child class and the latter is called a super class or ancestor class.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Usage_guide_lines Here] are the usage guidelines of multiple inheritance.A real world example of multiple inheritance is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#A_Real_World_Example here].&lt;br /&gt;
C++ supports multiple inheritance. A detailed explantion is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_C.2B.2B here].&lt;br /&gt;
JAVA doesn't support multiple inheritance but with the use of the concept called interface, multiple inheritance can be simulated. A more detailed explanation is available [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_Inheritance_in_Java here].&lt;br /&gt;
Ruby doesn't support multiple inheritance but provides a similar feature using [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Modules modules] and  [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Mixins mixins].&lt;br /&gt;
Advantages of Mixins are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Advantages_of_mixins here].&lt;br /&gt;
Object oriented languages support inheritance through different mechanisms. Methods from parent classes can be re-implemented in child classes to improve the behavior of the child class without having to re-write the whole class or define a completely new method. As method re-implementation in descendant classes is achieved differently in different classes it is crucial to understand these mechanisms.&lt;br /&gt;
A brief explanation of Multiple inheritance in Scala and Python is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w23_as#Multiple_inheritance_in_other_languages here].&lt;br /&gt;
Advantages and disadvantages of Multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Advantages here].&lt;br /&gt;
Because of few drawbacks(which are discussed above), few languages have implemented concepts like [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Modules Modules] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Mixin_inheritance Mixins] to emulate the power of multiple inheritance.&lt;br /&gt;
Multiple Inheritance is supported by several object oriented languages such as C++, Ruby, Perl, Python etc.Implementation of multiple inheritance in each of these languages is compared [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w14_gv#Comparison_between_C.2B.2B.2FJava.2FPython.2FRuby here].&lt;br /&gt;
&lt;br /&gt;
The Object-Oriented programming paradigm has two ways for specifying objects,[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Specifying_Objects Set based language - object specification and Protocol based language - object specification].&lt;br /&gt;
&lt;br /&gt;
The ‘extend’ feature in computer programming languages allows the programmer to dynamically extend the functionality of an object at run-time, as opposed to extending functionality at compile time. This feature can be found in most Object Oriented Programming (OOP) Languages, some of which are Java, JavaScript, and Ruby. Some OOP languages do not support the 'extend' feature, such as C++. &lt;br /&gt;
Languages Using 'extend' Functionality are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Java JAVA],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#JavaScript JavaScript],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Ruby Ruby].&lt;br /&gt;
Advantages and disadvantages of 'extend' functionality are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w17_ir#Advantages_.26_Disadvantages here].&lt;br /&gt;
&lt;br /&gt;
==Access Control in Object Oriented Languages==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;In object oriented programming &amp;lt;ref name=&amp;quot;Object oriented programming&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Object-oriented_programming Object Oriented Programming]&amp;lt;/ref&amp;gt;, access control refers to the control of visibility of data and methods. The main idea behind access control is to restrict access to certain parts of the code to external entities. Access control implements and handles O-O features like encapsulation &amp;lt;ref name = &amp;quot;Encapsulation&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Encapsulation_(object-oriented_programming) Encapsulation]&amp;lt;/ref&amp;gt; and inheritance &amp;lt;ref name = &amp;quot;Inheritance&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Inheritance_(object-oriented_programming) Inheritance] &amp;lt;/ref&amp;gt; by providing varying levels of access to code. The use of access control becomes necessary in any practical environment where selective access is a key criterion. For example, only the instructor can be allowed to modify grades of students but all students should be given access to retrieve and view their respective grades.&amp;lt;/p&amp;gt;  &lt;br /&gt;
&amp;lt;p&amp;gt;Access control in different object oriented languages and the underlying details will be covered in this topic.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Each O-O language has a specific implementation of access control mechanisms. However, a plethora of the most widely used O-O languages share similar features while implementing access control. Access control mechanisms are applicable to class members like variables and functions. Some level of access control can be applied at the class level. The three basic types of access control implementation which is common to some static and dynamic O-O languages &amp;lt;ref name = &amp;quot;Static and Dynamic Languages&amp;quot;&amp;gt; [http://en.wikipedia.org/wiki/Type_system#Static_and_dynamic_typing Static and Dynamic Languages] &amp;lt;/ref&amp;gt; [like C++, C#, Java and Ruby] are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Public]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Private]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Overview_of_Access_Control_Mechanisms Protected]&lt;br /&gt;
&lt;br /&gt;
Programming languages implement access control in different ways. The most prominent two ways are encapsulation and inheritance. Few of the languages that use access control and their implementation is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Access_Control_in_O-O_Features here].&lt;br /&gt;
&lt;br /&gt;
A comparison table of access control mechanisms among different O-O languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Comparison_among_different_O-O_languages here].&lt;br /&gt;
&lt;br /&gt;
As a good programming practice, these [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Basic_guidelines_on_the_usage_of_Access_Control guidelines] can be used to implement access control mechanisms. &lt;br /&gt;
&lt;br /&gt;
The two most commonly used design patterns to handle access control are:&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Private_class_data_design_pattern Private class data design pattern].&lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Decorator_design_pattern Decorator design pattern]. &lt;br /&gt;
&lt;br /&gt;
Advantages and disadvantages of Access Control are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w15_rt#Advantages_and_disadvantages_of_Access_Control here].&lt;br /&gt;
&lt;br /&gt;
==Ruby==&lt;br /&gt;
Ruby is a dynamic, reflective, object oriented programming language which was first developed in mid 90s by Yukihiro &amp;quot;Matz&amp;quot; Matsumoto in Japan.[http://en.wikipedia.org/wiki/Ruby_(programming_language)]. It is a cross plat-form interpreted and object-oriented language. It is designed for the principle of least surprise. Matz says &amp;quot;I wanted to minimize my frustration during programming, so I want to minimize my effort in programming. That was my primary goal in designing Ruby. I want to have fun in programming myself. After releasing Ruby and many people around the world got to know Ruby, they said they feel the way I feel. They came up with the phrase the principle of least surprise.&amp;quot;[http://rubylearning.com/satishtalim/ruby_installation.html]&lt;br /&gt;
In 2004, web application framework of Ruby &amp;quot;Ruby on Rails&amp;quot; was introduced by David Heinemeier Hansson.'''Rails''' is a MVC (Model-View-Controller) based architecture for web development based on the Ruby language. Rails 2[http://guides.rubyonrails.org/2_3_release_notes.html] was released in December 2007. Initially Rails 2 supported Ruby 1.8[http://www.ruby-lang.org/en/news/2008/05/31/ruby-1-8-7-has-been-released/]. It now has been updated to support Ruby 1.9.1[http://www.ruby-lang.org/en/news/2009/01/30/ruby-1-9-1-released/].  Rails 3 which brings in many improvements over Rails 2 supports Ruby 1.9 and above. The current stable version of Rails is 3.2.8[http://rubyonrails.org/download] released on Aug 9, 2012.&lt;br /&gt;
&lt;br /&gt;
Differences between Rails 2 vs Rails 3 is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w19_sa#Differences_between_Rails_2_and_Rails_3 here]. With increased complexity of codes, it became essential to design a development environment which will include some intelligence in code writing with increased version control and simpler debugging.&lt;br /&gt;
Popular [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#What_is_an_IDE IDEs] for Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RadRails RadRails],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Netbeans Netbeans],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#Textmate Textmate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RubyMine Rubymine],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#jRuby jRuby] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w29_sa#RDT_.28Ruby_Plugin_for_Eclipse.29 RDT].&lt;br /&gt;
A brief outline is given on [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Object objects],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class classes] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Inheritance inheritance].Ruby can act as a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_set-based_language set-based language] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Ruby_as_a_prototype-based_language prototype-based language].&lt;br /&gt;
&lt;br /&gt;
A Method is a [http://en.wikipedia.org/wiki/Subroutine Subroutine] (or Procedure or Function)  in a class that defines the behaviour exhibited by the associated Class instances at runtime. Methods defined within a Class are bound to the class either by [http://en.wikipedia.org/wiki/Static_binding Static binding] or [http://en.wikipedia.org/wiki/Dynamic_binding_(computer_science) Dynamic binding]. An example of  a method in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Methods here].[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Instance_methods Instance methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Static_methods static methods],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Accessor_methods accessor methods] are different kinds of methods.&lt;br /&gt;
A closure is basically a method/function that has the following two properties:&lt;br /&gt;
*We can pass it around like an object (to be called later)&lt;br /&gt;
*It remembers the values of all the variables that were in scope&amp;lt;ref&amp;gt;http://en.wikipedia.org/wiki/Scope_(computer_science)&amp;lt;/ref&amp;gt; when the function was created. It is then able to access those variables when it is called even though they may no longer be in scope.Closures must be explicitly supported by the language. In order for the language to be able to support closures, it must support [http://en.wikipedia.org/wiki/First-class_function first-class functions].&lt;br /&gt;
A normal function is defined in a particular scope (i.e. in a class) and can only be called within that scope. This function has access to all the variables in the scope that it is defined, like the parameters that are passed into it as well as class variables.&lt;br /&gt;
A closure on the other hand may be defined in one scope and be called in a completely different scope (since we can pass it around before calling it). Because of this, when a closure is created, it retains the values of all the variables that were in scope when the closure was defined. Even if the variables are generally no longer in scope when the closure is called, within the closure they still are. In other words, the closure retains knowledge of its [http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-1-1-3.html lexical environment] at the time it was defined.&lt;br /&gt;
Examples of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Examples here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Instance_Variables Instance variables] in ruby are defined.Advantages of closures are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Advantages_of_Closures here]. Closures in dynamically typed languages are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_DYNAMICALLY_TYPED_LANGUAGES here]. Closures in statically typed languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#CLOSURES_IN_STATICALLY_TYPED_LANGUAGES here].&lt;br /&gt;
The use of closures in other languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w4_aj#Closures_in_other_languages here]. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w32_cm#Challenges_due_to_lack_of_closures_in_Statically_typed_languages here] challenges due to lack of closures in Statically typed languages.&lt;br /&gt;
&lt;br /&gt;
Class variables and class methods in Ruby are defined [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w56_ms#Class_Variables_and_Class_Methods here].The basic syntax to declare them as class variables and instance variables is also given.&lt;br /&gt;
Ruby [http://en.wikipedia.org/wiki/Mixin Modules] are similar to classes in that they hold a collection of methods,constants and other module and class definitions.Modules definition is similar to classes just that we use the keyword module instead of the class keyword.Unlike [http://en.wikipedia.org/wiki/Object-oriented_programming classes], [http://en.wikipedia.org/wiki/Object-oriented_programming objects] cannot be created based on modules nor can it be sub classed.However, it can be specified that the functionality of one module should be added to another class, or a specific object.&lt;br /&gt;
Uses and examples of modules are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Uses_of_modules here].&lt;br /&gt;
The most interesting fact about the use of modules is to define [http://en.wikipedia.org/wiki/Mixin mixins]. When a module is included within a class,all its functionality becomes available to the class.Modules can contain [http://en.wikipedia.org/wiki/Method_(computer_programming)#Class_methods class methods] and [http://www.daniweb.com/software-development/java/threads/303430/what-is-instance-method instance methods]. Mixins are different from #include and multiple inheritance and this is demonstrated [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#How_mixinsis_different_from_.23include_and_multiple_inheritance.3F here]. More about Mixins can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins here].&lt;br /&gt;
&lt;br /&gt;
A method that belongs to a class is called by creating an object of the class and passing the method name to the object as a message. The object then looks up the [http://www.madebydna.com/all/code/2011/06/24/eigenclasses-demystified.html method lookup path] and tries to match the called method with the defined methods in the class. On success, the method is executed and the result is returned.&lt;br /&gt;
If the object does not find a match in its method lookup, in normal circumstances the [http://www.ruby-doc.org/core-1.9.3/NoMethodError.html NoMethodError Exception] is raised .&lt;br /&gt;
In cases where the user wants to handle the methods which are not defined but are still called, “method_missing” can be defined and the user can handle the methods as he/she sees fit. [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Format_for_Defining_method_missing Here] is the format for method missing and Ruby method look up flow.&lt;br /&gt;
Examples of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Examples here].&lt;br /&gt;
Advantages and disadvantages of method missing are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Advantages_of_method_missing here].&lt;br /&gt;
Method missing, one of the dynamic features of Ruby, is not a feature that is unique to Ruby. It exists in Smalltalk, Python, Groovy, some Javascripts and most CLOS (Common Lisp Object System)extensions. In this section we look at the few such similar implementations in other languages. The table [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Similar_functionality_in_other_languages here] gives different ways the functionality related to method_missing is handled in other languages.&amp;lt;ref&amp;gt;http://olabini.com/blog/2010/04/patterns-of-method-missing/&amp;lt;/ref&amp;gt;&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w22_an#Patterns_of_method_missing.5B9.5D Here] are few patterns of method missing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Namespace in [http://en.wikipedia.org/wiki/C%2B%2B C++] is similar to modulesIn general, a [http://en.wikipedia.org/wiki/Namespace namespace] is a container for a set of identifiers (names), and allows the disambiguation of homonym identifiers residing in different namespaces.[http://en.wikipedia.org/wiki/Namespace Namespace] usually group names based on their functionality. Usage of namespaces and its example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Steps_involved here].&lt;br /&gt;
Multiple inheritance in C++ similar to mixins.You can derive a class from any number of base classes. Deriving a class from more than one direct base class is called [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance]. An example is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_4 here].&lt;br /&gt;
Interfaces in JAVA is similar to mixins.A [http://en.wikipedia.org/wiki/Java_(programming_language) Java] interface defines a set of methods but does not implement them.A class that implements the [http://en.wikipedia.org/wiki/Interface_(Java) interface] agrees to implement all of the methods defined in the interface, thereby agreeing to certain behavior, thereby implementing [http://en.wikipedia.org/wiki/Multiple_inheritance multiple inheritance].&lt;br /&gt;
Properties of an interface are:&lt;br /&gt;
*An [http://www.codeproject.com/Articles/10553/Using-Interfaces-in-C interface] is implicitly abstract. You do not need to use the abstract keyword when declaring an interface.&lt;br /&gt;
*Each method in an interface is also implicitly abstract, so the abstract keyword is not needed.&lt;br /&gt;
*Methods in an interface are implicitly public.  &lt;br /&gt;
An example is given over [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_5 here].Comparison between mixins and interfaces and given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w16_br#Mixins_vs._Interfaces here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Comparable Comparable] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Enumerable Enumerable] are commonly used mixins.&lt;br /&gt;
&lt;br /&gt;
Ruby has simplified the way programmers use loops and iterators. Ruby helps programmers to use  Don't Repeat Yourself [http://en.wikipedia.org/wiki/Don%27t_repeat_yourself (DRY)] principle effectively by using blocks and defining iterators over collections.&amp;lt;ref name=&amp;quot;Iterators&amp;quot;&amp;gt;Alan Skorkin. &amp;quot;A wealth of ruby loops and iterators&amp;quot; http://www.skorks.com/2009/09/a-wealth-of-ruby-loops-and-iterators&amp;lt;/ref&amp;gt; This helps in minimizing the development work that programmers often find in any other O-O style programming language. In ruby, these iterators, blocks and functional idioms are explained as:&lt;br /&gt;
&lt;br /&gt;
Iterators are [http://ruby.bastardsbook.com/chapters/collections/ &amp;lt;b&amp;gt;Collection&amp;lt;/b&amp;gt;] defined methods that helps to iterate over all the elements present in a Collection.&amp;lt;ref name =&amp;quot;tutorial_point_i&amp;quot;&amp;gt;&amp;quot;Ruby Iterators&amp;quot; http://www.tutorialspoint.com/ruby/ruby_iterators.htm&amp;lt;/ref&amp;gt; Ruby Collections are basically objects that store a group of data members of various types. Examples of Collection are arrays, hashes etc.&amp;lt;br&amp;gt;&lt;br /&gt;
A block consists of chunks of codes with a name assigned to it.&amp;lt;ref name=&amp;quot;blocks&amp;quot;&amp;gt;&amp;quot;Ruby blocks&amp;quot; http://www.tutorialspoint.com/ruby/ruby_blocks.htm&amp;lt;/ref&amp;gt; For example, &lt;br /&gt;
&lt;br /&gt;
   my_block { puts &amp;quot;Hello World&amp;quot; }&lt;br /&gt;
&lt;br /&gt;
Different types of iterators in Ruby are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_times_iterator times iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_upto_iterator upto iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_step_iterator step iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_each_iterator each iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_collect_iterator collect iterator],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#The_map_iterator map iterator].&lt;br /&gt;
Ruby allows programmers to define their own iterator other than the iterators listed above. For example if a programmer wishes to define an iterator which prints an array in reverse order, then he can do so as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Defining_your_own_iterator here]. &lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Blocks.5B5.5D Blocks] are the most commonly used form of closures in Ruby. We can find them all over the core Ruby libraries. They are nameless functions and can be passed anywhere.A Block consists of a chunk of codes with a name assigned to it.Alternately, a block is a code which is passed to the iterator. These blocks can either be defined by enclosing them in curly braces or by using the do...end syntax as shown [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Blocks here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Procs.5B6.5D Procs] are nameless block of code that can be represented as an object and can be passed around or called at will.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w31_sa#Lambdas Lambdas] are a more strict form of proc.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance] has several disadvantages that can lead to ambiguous code behavior either during compile time or run time.Ruby does not support direct[http://en.wikipedia.org/wiki/Multiple_inheritance Multiple Inheritance]. But, Multiple Inheritance can be achieved in Ruby through Modules. Modules simulate multiple inheritance in Ruby.Given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here] is the Taggable-string example taken from the [http://courses.ncsu.edu/csc517//common/lectures/notes/lec6.pdf Class notes of CSC517, NCSU]. Suppose we want to add tags to Strings, we can define a Taggable module and include it into the class.&lt;br /&gt;
Multiple inheritance may cause name conflicts when a sub-class inherits different super-classes that contain the methods or variables with the same name. This can be resolved in many [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Resolution_of_Name_conflicts_or_Collisions ways].&lt;br /&gt;
Advantages  and disadvantages of multiple inheritance are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Example_8 here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Expression_Orientation Expression orientation&amp;lt;ref name=&amp;quot;saas_video&amp;quot;&amp;gt;&amp;quot;SaaS. 3.6 - Ruby Blocks, Iterators, Functional Idioms &amp;quot; http://www.youtube.com/watch?v=bRn91_Zonh4&amp;lt;/ref&amp;gt; ]in ruby refers to the mechanism of applying a series of operation on collections ( e.g. arrays, hashes etc ) without actually modifying the original collection. For example, consider the sort method in ruby. The sort method when called on an array creates a temporary array having the same elements as that of the original array. It then sorts this temporary array and returns that.&lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w58_am#Functional_Idioms Functional idioms] refers to the various constructs in ruby that mimics [[http://en.wikipedia.org/wiki/Functional_programming Functional Programming Language Functional Programming Language]. Most programmers argue that Ruby is actually an Object Oriented Programming Language and it does not behaves as per the functional programming paradigm.&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Regular_expression Regular expressions] are extremely powerful.[http://en.wikipedia.org/wiki/Ruby_(programming_language) Ruby]was built as a better [http://en.wikipedia.org/wiki/Perl Perl] hence it supports regular expressions.[http://en.wikipedia.org/wiki/Regular_expression Regular expression] is sort of a string used to match to other strings.In ruby regular expressions are written in the format /pattern/modifiers where pattern is the regular expression and modifiers are the series of characters specifying the various options. More on regular expressions can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w37_ss#Regular_Expressions here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/JRuby JRuby] is the Ruby Programming Language on the [http://en.wikipedia.org/wiki/JVM JVM]. &lt;br /&gt;
Ruby is a reflective, dynamic, and interpreted object-oriented scripting language. JRuby is a Java programming language implementation of the Ruby language syntax with all the core libraries plus the  standard libraries. With JRuby, you get all of the advantages of Ruby plus access to the full range of Java platform functionality. This can be achieved using the following two flavors.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* Driving Ruby from Java&lt;br /&gt;
* Driving Java from Ruby&lt;br /&gt;
&lt;br /&gt;
Some examples where this integration can be done are: &lt;br /&gt;
&lt;br /&gt;
* From a JRuby script, you can call the Java platform Math library to access its powerful computational capabilities or call the Java platform Swing library to display a dialog box that requires end-user input before allowing the script to proceed. &amp;lt;br&amp;gt; &lt;br /&gt;
* You can use the [http://en.wikipedia.org/wiki/Scripting_for_the_Java_Platform JSR 223] Scripting APIs or the [http://en.wikipedia.org/wiki/Bean_Scripting_Framework Bean Scripting Framework (BSF)] APIs to call a JRuby script from within a Java application to, for example, invoke back-end processing scripts from a servlet to update or generate web content.   &amp;lt;br&amp;gt;&lt;br /&gt;
More about JRuby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#JRuby_Explained here]. &lt;br /&gt;
Advantages of JRuby over JAVA and Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Advantages_of_JRuby here].&lt;br /&gt;
Few difficulties of JRuby are addressed [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w6_pp#Difficulties_with_JRuby here].&lt;br /&gt;
&lt;br /&gt;
Testing approaches must have a logico-mathematical form, i.e., have one right answer. There are different approaches to software testing and are classified into different levels, depending on the stage of Software Development Life cycle (SDLC) in which it is done. The different levels are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Unit_testing unit testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Integration_testing integration testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#System_Testing  system testing],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Software_performance_testing system integration testing and performance testing]. &lt;br /&gt;
&lt;br /&gt;
Ruby provides a framework in its standard library for setting up, organizing, and running tests called Test::Unit &amp;lt;ref&amp;gt;[http://en.wikibooks.org/wiki/Ruby_Programming/Unit_testing Ruby Unit Testing Framework]&amp;lt;/ref&amp;gt;. Other testing frameworks available for Ruby are Shoulda, RSpec and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Cucumber Cucumber].&lt;br /&gt;
Comparison of Unit Test Frameworks:RSpec,Shoulda and Cucumber is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w3_pl#Comparison_of_Unit_Test_Frameworks_:_Rspec.2C_Shoulda_and_Cucumber here].&lt;br /&gt;
More on testing in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w18_as#Testing_in_Ruby here].&lt;br /&gt;
&lt;br /&gt;
Redirection refers to redirection of incoming request from one page to another. HTTP is stateless, hence redirection with session/flash makes it stateful.As the http requests are stateless,it leads to losing the state of the previous request. Thus Rails provides hash called [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Flash_in_Ruby Flash] which persist until the end of the next request received and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#Session_in_Ruby Session] hash, which unlike flash persists forever. The working,example,advantages and disadvantages of flash/session is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w67_ks#How_it_works here].&lt;br /&gt;
&lt;br /&gt;
==Object-Oriented Domain-Specific Languages (OODSL)==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;p&amp;gt;An OODSL&amp;lt;ref&amp;gt;OODSL 1[http://pg-server.csc.ncsu.edu/mediawiki/index.php?title=User:Snateka&amp;amp;printable=yes]&amp;lt;/ref&amp;gt;&amp;lt;ref&amp;gt;OODSL 2[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2010/ch2_S23_GP]&amp;lt;/ref&amp;gt; is a [http://en.wikipedia.org/wiki/Domain-specific_language&amp;lt;code&amp;gt;Domain-specific language&amp;lt;/code&amp;gt;] (DSL) that exhibits characteristics that have traditionally been attributed to [http://en.wikipedia.org/wiki/Object-oriented_programming#OOP_languages&amp;lt;code&amp;gt;Object-Oriented Languages&amp;lt;/code&amp;gt;] &amp;lt;/p&amp;gt;&lt;br /&gt;
&amp;lt;p&amp;gt;Although OO languages and Domain specific languages have been around for several years, OODSLs are relatively new.&amp;lt;/p&amp;gt;&lt;br /&gt;
&lt;br /&gt;
OO languages can be either general purpose like C++, Java and Ruby, or domain specific, like Jquery and Kiddo. The following example shows how the two kinds of languages would work if used in the real world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
'''The General Purpose Programming way of ordering hash browns at Waffle House'''&amp;lt;ref&amp;gt;Building DSLs [http://www.code-magazine.com/article.aspx?quickid=0902041&amp;amp;page=1]&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Harvest the potato, wash it, and chop it into little pieces. Put the pieces in a pan with oil and fry till they turn golden brown, and then drain the oil away and put them on a plate. Now cut some jalapeno peppers and spread on the potatoes. Then add cheese, which you can get by milking a cow and..... &lt;br /&gt;
&lt;br /&gt;
'''The OODSL way of ordering hash browns at Waffle House'''&lt;br /&gt;
&lt;br /&gt;
I would like it Scattered, Smothered, and Peppered please. Thanks!&lt;br /&gt;
&lt;br /&gt;
For a person who works at Waffle House, or goes there regularly to eat, it is a no brainer that the second method is much more efficient. OODSLs take advantage of the context within which communication takes place. By using implicitly understood jargon, the task at hand can be accomplished in a way that is easier to comprehend for a specialized type of user.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
OODSLs can be of 2 types:&lt;br /&gt;
&lt;br /&gt;
* Internal--Internal OODSLs are languages that are built on top of existing languages. An internal OODSL makes use of the host language syntax to provide the feel of a domain specific language. It is not universally defined as to when a language/library becomes an OODSL. JQuery is one such example. It is a JavaScript library, which offers an easy way to perform functions like element selection. It can also be argued that JavaScript itself is a domain specific language.&lt;br /&gt;
&lt;br /&gt;
* External--External OODSLs are those that are built from scratch. With the current technology, it is far more easy to churn out several internal OODSLs than to build one from scratch. External OODSLs have their own syntax, as well as their own methods of compilation/interpretation.&lt;br /&gt;
&lt;br /&gt;
A brief history on OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#History here]. Languages which incorporate OODSL are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Examples here].&lt;br /&gt;
A running example for creating an OODSL in Groovy is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#A_Running_Example here].&lt;br /&gt;
&lt;br /&gt;
When creating an OODSL, one can either choose to start from scratch or use a tool that is already available. Creating a language from scratch gives the programmer a certain amount of flexibility to define it the way he wants to, but it takes a lot of time. Therefore, in general, software tools are used to aid in the process of creating Domain Specific Languages. This is because it not only saves time, but also helps to make the language easy to use due to familiarity with the syntax of the underlying language. Few tools which are used to create OODSL are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Boo Boo],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Visual_Studio Visual Studio] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#Groovy Groovy]. &lt;br /&gt;
&lt;br /&gt;
Differences between OODSL and non-OODSL is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w9_av#OODSL_vs._non-OODSL here].&lt;br /&gt;
&lt;br /&gt;
==Aspect Oriented Programming (AOP)==&lt;br /&gt;
&lt;br /&gt;
Aspect Oriented Programming (AOP) refers to a new way of designing software. It aims to increase modularity by allowing the separation of cross-cutting concerns. AOP includes programming methods and tools that support the modularization of concerns at the level of the source code. It is not a replacement to popular Object Oriented Programming (OOP), but is complimentary to it.&lt;br /&gt;
The need of AOP with an example(The banking example) is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#Why_do_we_need_AOP.3F_The_banking_example here].&lt;br /&gt;
The advice-related component of an aspect-oriented language defines a join point model (JPM). A JPM defines three things: &lt;br /&gt;
&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Joinpoint] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Pointcut] &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_Concepts Advice] &lt;br /&gt;
&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AspectJ:_AOP_in_Java AspectJ] is AOP in JAVA.&lt;br /&gt;
AOP in Ruby is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby here].&lt;br /&gt;
We saw how AOP can be implemented in Ruby without any extra support in the above sections.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#AOP_in_Ruby  AspectR] is free library which provides API's to the same for Ruby.&lt;br /&gt;
Differences between AspectR and AspectJ is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w27_ms#How_AspectR_is_different_from_AspectJ here].&lt;br /&gt;
&lt;br /&gt;
==Object-Relational Mapping==&lt;br /&gt;
&lt;br /&gt;
Object-Relational Mapping (ORM) is a methodology for managing data between object oriented systems and relational databases. The premise of the concept is to provide a universal method to access data in a database. This is beneficial for all programming languages that can use objects to store and retrieve data from the database. There are many languages that are using ORM as a technique to manage database data. In the rest of the article, we will discuss ORM and some of the languages in use today.&lt;br /&gt;
&lt;br /&gt;
Language extensions for ORM have often been traditionally classified as design patterns or software tools used to perform basic [http://en.wikipedia.org/wiki/Create,_read,_update_and_delete create, read, update and delete (C.R.U.D.)] operations on relational databases, that is, until recent new approaches such as [http://en.wikipedia.org/wiki/ActiveRecord#Ruby ActiveRecord] have grown in popularity.  ActiveRecord is not just a design pattern it is an increase of function to the active record pattern approach by adding [http://en.wikipedia.org/wiki/Inheritance_%28computer_science%29 inheritance] and [http://en.wikipedia.org/wiki/Association_%28object-oriented_programming%29 associations].  Examining ActiveRecord and other language extensions will allow for comparisons of the ease of programming using these language extensions verses the conventional database oriented systems approach.&lt;br /&gt;
&lt;br /&gt;
All too often programmers are faced with the challenge of persisting objects from their program into a datastore.  Custom code is created for this purpose that can be complex or difficult for others to understand as well as not seem natural.  Applications that are designed to persist data have the need to know how the objects correspond to the information stored in these database tables.  [http://en.wikipedia.org/wiki/Ruby_on_Rails Ruby on Rails], first released in 2005, is able to provide a uniform method to help resolve these complicated issues without sacrificing function or knowledge of these objects by using ActiveRecord (AR).  AR is a persistence engine that comes as part of Ruby on Rails.  &amp;quot;''It creates a 'persistable' domain model from business objects and database tables, where logic and data are presented as a unified package''&amp;quot; [http://en.wikipedia.org/wiki/ActiveRecord#Ruby 3].  AR is admired for its simplistic and elegant approach of removing these levels of complexity.  It allows for a 'pluggable' solution to many different popular databases available today to include: [http://en.wikipedia.org/wiki/MySQL MySQL], [http://en.wikipedia.org/wiki/SQLite SQLite], [http://en.wikipedia.org/wiki/Microsoft_SQL_Server SQL Server], [http://en.wikipedia.org/wiki/PostgreSQL PostgreSQL], and [http://en.wikipedia.org/wiki/Oracle_Database Oracle].  &lt;br /&gt;
&lt;br /&gt;
ActiveRecord uses a [http://en.wikipedia.org/wiki/Single_Table_Inheritance Single Table Inheritance] to allow for inheritance capabilities and provides a set of macros for association relationships between classes of objects, such as belongs_to, has_one, has_many, etc.  AR is not only a component of the [http://en.wikipedia.org/wiki/Model-view-controller Model view-controller (MVC)] for Ruby on Rails but it is also a standalone ORM package for Ruby itself.  Ruby, Ruby on Rails, and ActiveRecord continue to grow in popularity due to not only the curiosity of programmers but their ability to improve function and feature sets while maintaining the initial intent of the language, &amp;quot;''trying to make Ruby natural, not simple''&amp;quot; -- Yukihiro “matz” Matsumoto [http://www.ruby-lang.org/en/about/ 8].  Other languages have been able to learn from AR and have tried to add this capability for themselves.  Let’s take a closer look at some other implementations that attempts to duplicate AR’s elegance.&lt;br /&gt;
&lt;br /&gt;
Other examples of Language Extensions are [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#ADO.NET_Entity_Framework ADO.NET Entity Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Django Django],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Enterprise_Objects_Framework Enterprise Objects Framework],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Java.27s_Hibernate Hibernate],[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#JazzRecord_for_JavaScript JazzRecord].&lt;br /&gt;
&lt;br /&gt;
Programming using Language Extensions is given briefly [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w10_pk#Programming_using_Language_Extensions here].&lt;br /&gt;
&lt;br /&gt;
==Model-View-Controller==&lt;br /&gt;
&lt;br /&gt;
A common feature of today’s web applications is to retrieve data from a data store and display it for the user. The system stores the updates in the data store when the user changes the data. The flow of information between the data store and the user interface might compel the computer programmer to tie these two pieces together to reduce the amount of coding.  This approach has significant problems. User interface logic tends to change more frequently than business logic, especially in Web-based applications. If user interface code and business logic are combined in a single object, you have to modify an object containing business logic every time you change the user interface. Also, in most cases, the application displays the same data in different ways. Tight coupling between the presentation and business logic would mean that the same code is repeated at multiple places. This reduces the maintainability and flexibility of the application.&lt;br /&gt;
&lt;br /&gt;
The '''Model-View-Controller '''[http://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller MVC] pattern separates the modeling of the business logic, the presentation, and the actions based on user input into three separate classes:&lt;br /&gt;
&lt;br /&gt;
  * '''Model''': The model manages the behavior and data of the application domain. It responds to requests for the user    &lt;br /&gt;
                 interface(view),and responds to instructions from the controller to change state.&lt;br /&gt;
  * '''View''': The view refers to the user interface and manages the display of information&lt;br /&gt;
  * '''Controller''': The controller interprets the inputs from the user, informing the model and/or the view to change appropriately.&lt;br /&gt;
A brief history and research about MVC architecture is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#History here].&lt;br /&gt;
&lt;br /&gt;
The classical MVC concept is more suited for desktop applications than typical web applications. In desktop applications you have a direct connect between UI components and the responsible controller or presenter. In web applications the HTML for a complete screen is sent to the browser. The user actions in the UI are sent to the web server in the form of a request. This request has to be interpreted and normally the new or updated screen has to be sent to the browser again. The HTML for the complete screen can be understood as a set of widgets (or subviews). For example it can contain a &amp;quot;main menu&amp;quot;, a &amp;quot;news list&amp;quot;, a &amp;quot;basket&amp;quot; etc. The web server always needs to generate the complete view with all its subviews. The working of MVC framework in web application development is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#MVC_pattern_in_web_application_development here].&lt;br /&gt;
Recently MVC has become a very popular strategy for building websites. There are quite a few programming languages for which the MVC-Web framework is now available.&lt;br /&gt;
[http://struts.apache.org/ Struts] for Java, [http://en.wikipedia.org/wiki/Maypole_framework Maypole] for Perl and [http://rubyonrails.org/ Rails] for Ruby are some to name a few. A brief introduction of the MVC pattern in Ruby on Rails and Struts is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Web_frameworks_using_MVC_pattern here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Spring_framework Spring framework] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Java_Server_Faces.28JSF.29 Java Server Faces] are two examples of MVC pattern.&lt;br /&gt;
Advantages and disadvantages of MVC pattern is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w20_pp#Conclusion here].&lt;br /&gt;
&lt;br /&gt;
==Code Reuse==&lt;br /&gt;
&lt;br /&gt;
Code reuse, also known as software reuse is the practice of using the same segment of code in multiple applications. The definition, overview and a brief history of code reuse is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Definition here].&lt;br /&gt;
There are several [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Techniques_.5B4.5D techniques] in code reuse. Code can be reused by using simple coding.&lt;br /&gt;
For example, using a [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Single_lines_of_code single line of code], we can reuse the code.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Procedures.2C_Macros Procedures and macros] are the low level code reuse techniques.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Functions.2Fmethods Methods] can be used in code reuse, a method can be defined and declared multiple times wherever required.&lt;br /&gt;
An individual [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Components software component] is a software package, a Web service, or a module that encapsulates a set of related functions.&lt;br /&gt;
All system processes are placed into separate components so that all of the data and functions inside each component are semantically related. Because of this principle, it is often said that components are modular and cohesive.&lt;br /&gt;
With the help of [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Object_orientation_.5B5.5D Packages,modules and inheritance], we can achieve code reuse.&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Generators.5B6.5D Generators,Software architectures, code scavenging, Transformational systems, Very High Level Languages (VHLL)] are more techniques of code reuse.&lt;br /&gt;
Here are some of the [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Best_practices_.5B7.5D best practices] to be followed to make sure that the code that is being written is reusable.  &lt;br /&gt;
Advantages and disadvantages of code reuse can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Advantages_.5B3.5D here].&lt;br /&gt;
[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w7_am#Trade-offs_for_code_reuse_at_various_levels_of_components_.5B8.5D Here] are few of the tradeoffs for code reuse at various levels of components.&lt;br /&gt;
&lt;br /&gt;
==Scaffolding==&lt;br /&gt;
Scaffold is a temporary platform, either supported from below or suspended from above, on which workers sit or stand when performing tasks at heights above the ground. Because of its nature of its use, it must made sure that it is properly constructed and ensures the safety of those who use it.&lt;br /&gt;
Deriving from the analogy above, scaffolding in web application framework refers to providing a minimal setup for various components that make a web application. These components include but are not limited to databases, application servers and web servers. Such scaffolds are generally standard, bare minimal and reusable components that are automatically generated.&lt;br /&gt;
&lt;br /&gt;
A typical web application contains a database layer for retrieval and storage of information. The basic operations performed to access the database are grouped into the following types, which are commonly referred to as the CRUD functionality.&lt;br /&gt;
&lt;br /&gt;
 Create&lt;br /&gt;
 Read&lt;br /&gt;
 Update&lt;br /&gt;
 Delete&lt;br /&gt;
&lt;br /&gt;
A scaffold for web application will typically provide stubs for performing the above mentioned CRUD functions. This boilerplate code provides the essential infrastructure to develop  a web application in quick time.&lt;br /&gt;
&lt;br /&gt;
MVC framework is a popular web application framework that separates concerns and applications into model, view and controllers. In  MVC, scaffolding will usually create basic model, views and controllers and also the database objects needed.&lt;br /&gt;
The origin and evolution of scaffolding is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Origin_and_Evolution here].&lt;br /&gt;
Scaffolding in MVC based web frameworks is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1a_1w12_mv#Scaffolding_in_MVC_based_Web_Frameworks here].&lt;br /&gt;
Apache Tapestry is an open-source framework for creating dynamic, robust, highly scalable web applications in Java. Tapestry complements and builds upon the standard Java Servlet API, and so it works in any servlet container or application server. Tapestry includes some scaffolding components that generate code at runtime thus allowing an application to be dynamically assembled at runtime. The two main scaffolding components are&lt;br /&gt;
&lt;br /&gt;
BeanEditForm - A component that creates an entire form editing the properties of a particular bean. It generates a simple UI for editing the properties of a JavaBean, with the flavor of UI for each property (text field, checkbox, drop down list) determined from the property type (or by other means, such as an annotation), and the order and validation for the properties determined from annotations on the property's getter and setter methods.&lt;br /&gt;
Grid - A grid presents tabular data. It is a composite component, created in terms of several sub-components. The sub-components are statically wired to the Grid, as it provides access to the data and other models that they need. A Grid may operate inside a form.&lt;br /&gt;
&lt;br /&gt;
==Reflection==&lt;br /&gt;
&lt;br /&gt;
[http://en.wikipedia.org/wiki/Reflection_%28computer_programming%29 Reflection ]is a relatively common [http://en.wikipedia.org/wiki/Computer_programming computer programming] concept where in the program has the inherent ability to examine itself at run time. Based on its observations the program can modify it's behavior for the given situation.The modifications can be any aspect of the programming language .i.e syntax, semantics, or implementation. Precisely, &amp;quot;Reflection&amp;quot; can be defined as a language's ability to inspect and dynamically call [http://en.wikipedia.org/wiki/Class_%28computer_programming%29 classes], methods, attributes, etc. at runtime. More advanced uses of reflection let you list and call methods, [http://en.wikipedia.org/wiki/Constructor_%28object-oriented_programming%29 constructors], etc. A little more introduction about reflection is found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Introduction here].&lt;br /&gt;
There are many challenges faced by designers of reflective languages. They must provide as much leeway as possible for late binging and at the same time they must optimize the compilation of the static components so that they are ready for run-time. Reflection is in essense a connection between the object-level (program) and meta-level (the processor). The ability of the object level to be able to observe and modify the meta-level information is the consequence of this connection. These actions can be termed as [http://en.wikipedia.org/wiki/Type_introspection introspection] (This involves the action of observing the class) and intercession (this involves the operation of modifying the behavior of the class). These actions can  implemented with the implementation of the following components:&lt;br /&gt;
&lt;br /&gt;
* Ability to create [http://en.wikipedia.org/wiki/First-class_object first class objects] ie  [http://en.wikipedia.org/wiki/Reification_(computer_science) reification]. &lt;br /&gt;
&lt;br /&gt;
* Ability to convert a string that denotes a class or a method into its corresponding    reference or invocation.&lt;br /&gt;
&lt;br /&gt;
* Ability to use and create symbolic links to methods and classes.&lt;br /&gt;
&lt;br /&gt;
A brief history of Reflection is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Brief_History_of_Reflection here].&lt;br /&gt;
There are two basic types of reflection. They are:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Behavioral_Reflection Behavioral Reflection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection Structural Reflection]&lt;br /&gt;
&lt;br /&gt;
There are two techniques used by reflective systems: &lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Introspection Introspection]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Intercession Intercession]&lt;br /&gt;
&lt;br /&gt;
A brief comparison between Reflective Languages Features and Reflective Packages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w5_su#Reflective_Languages_Features_VS_Reflective_Packages].&lt;br /&gt;
Features,advantages,disadvantages of reflection in C#,JAVA,Ruby,Smalltalk,PHP is given [expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Structural_Reflection here].&lt;br /&gt;
Applications of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Applications_of_Reflection here].&lt;br /&gt;
Comparison of reflection in different languages is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_ar#Comparison_of_Reflection_in_different_languages here].&lt;br /&gt;
Advantages and disadvantages of reflection are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1b_1w40_as#Advantages_and_Disadvantages_of_reflection here].&lt;br /&gt;
&lt;br /&gt;
==CRC Cards==&lt;br /&gt;
&amp;lt;b&amp;gt; CRC Cards, &amp;lt;/b&amp;gt; also known as [http://en.wikipedia.org/wiki/Class-responsibility-collaboration_card &amp;lt;b&amp;gt; Class-Responsibility-Collaboration &amp;lt;sup&amp;gt;&amp;lt;/sup&amp;gt;&amp;lt;/b&amp;gt;] cards are a brainstorming tool to enable collaboration across different teams or individuals in contribution to design, usually used in Object Oriented Software development. This was  proposed by &amp;lt;b&amp;gt;Ward Cunningham&amp;lt;/b&amp;gt; and &amp;lt;b&amp;gt;Kent Beck&amp;lt;/b&amp;gt;&amp;lt;sup&amp;gt;[http://c2.com/doc/oopsla89/paper.html]&amp;lt;/sup&amp;gt;. The CRC card can be viewed as an index card, with the following details:&lt;br /&gt;
[[Image:crc-card.gif|frame|right|CRC Card Structure]]&lt;br /&gt;
&lt;br /&gt;
:* The Top of the card usually bears the name of the class.&lt;br /&gt;
:* The Left side of the card has the responsibilities of the class.&lt;br /&gt;
:* The Right side of the card has the collaborating classes corresponding to each of the responsibilities listed in the left side.&lt;br /&gt;
&lt;br /&gt;
Thus in general, a CRC session can be viewed as the interaction between a set of collaborating classes for a particular [http://en.wikipedia.org/wiki/Use_case Use case]. &amp;lt;br&amp;gt; &amp;lt;br&amp;gt; According to &amp;lt;sup&amp;gt;[http://www.extremeprogramming.org/rules/crccards.html]&amp;lt;/sup&amp;gt;&amp;lt;i&amp;gt;A CRC session proceeds with someone simulating the system by talking about which objects send messages to other objects. By stepping through the process' weaknesses and problems are easily uncovered. Design alternatives can be explored quickly by simulating the design being proposed.&amp;lt;/i&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===A CRC Example===&lt;br /&gt;
To better understand how the CRC cards work together, let us consider a simple student enrollment problem,where we are required to model the students enrolled in different courses. We can easily define the &amp;lt;b&amp;gt;Student CRC Card&amp;lt;/b&amp;gt; as having attributes such as student name, student id and responsibilities that enable a student to enroll in a course or drop the course. In this particular instance, the collaborating class would be the &amp;lt;b&amp;gt;Course&amp;lt;/b&amp;gt; class. The &amp;lt;b&amp;gt;Course CRC Card&amp;lt;/b&amp;gt; can in turn be visualized as having its own responsibilities, such as having attributes like Course id, course name and the collaborating class would be the &amp;lt;b&amp;gt;Instructor &lt;br /&gt;
class&amp;lt;/b&amp;gt;. The CRC cards for the Student class and the Course Class are shown below.&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
[[Image:Stud_enr_Crc.jpg|frame|center|Student and Course CRC Card]]&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
There are also several practical designs that use the CRC card model to design Object oriented software design. The  [http://www.extremeprogramming.org/example/crcsim.html Simulator for Coffee Maker] explores an [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] approach combined with CRC card technique to come up with a design for the coffee maker.&lt;br /&gt;
&lt;br /&gt;
Another interesting approach using CRC cards is the design for the [http://www.math-cs.gordon.edu/courses/cps211/ATMExample/CRCCards.html ATM Machine]&lt;br /&gt;
&lt;br /&gt;
===Advantages of CRC cards===&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
An example of CRC cards is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#A_CRC_Example here].&lt;br /&gt;
There are a few advantages of CRC cards that make it a preferable model in many designs. Some of the advantages of the CRC card design method are&lt;br /&gt;
&amp;lt;br&amp;gt;&lt;br /&gt;
:* CRC cards can allow designers to easily make audience understand a very complex system. In essence it allows for building more complex designs by slowly building the interactions between the collaborating classes, one by one.&lt;br /&gt;
:* CRC cards are a simple technique and it can be easily used by anyone with very little training and does not require any expensive computing resources(a board or a paper and a pen would suffice).&lt;br /&gt;
:* CRC is fundamentally a brainstorming tool, enabling different people in a team to come up with the design by collaborating, enabling everyone in the team to contribute&lt;br /&gt;
:* CRC can be used with other formal object oriented design methodologies such as [http://en.wikipedia.org/wiki/Extreme_Programming Extreme Programming] (an [http://en.wikipedia.org/wiki/Agile_Modeling Agile] development Technique) and can be used along with modeling languages such as [http://en.wikipedia.org/wiki/Unified_Modeling_Language Unified Modeling Language(UML)]&lt;br /&gt;
CRC cards have limited scope. If we go about designing a huge project, the scope may span many classes and there might be numerous interactions between them. The tedious task here is to maintain the CRC cards and formulate appropriate interaction between them. We need software for CRC Cards for [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Software_for_CRC_Cards these] reasons.[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#Designing_Software Here] are the steps for designing software for CRC cards.&lt;br /&gt;
Software Development Life Cycles are different for a standard development process and for Object Oriented development. This difference needs to be understood in order to know how to meet the benchmarks set for the project. There are multiple processes that are used in software development, the most common ones in use being [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Waterfall_Model Waterfall model] and [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#The_Spiral_Model Spiral model]. The Waterfall model is progression based and the Spiral model is iterative.&lt;br /&gt;
We need to understand that the uniqueness of Object Oriented SDLCs comes from the fact that it is more user centric as compared to standard SDLCs that are more system centric. We will now see which models work for Object Oriented SDLCs (OO SDLCs) and which don’t. CRC cards play a very important role in an Object Oriented SDLC. Thus, figuring out which models work well for OO SDLCs will result in understanding which models use CRC cards and why.&lt;br /&gt;
The strength of OO model depends on the idea that, here, design and deployment come together. In the case of a spiral model, this works to make the spiral tighter. Since the waterfall model places over importance on deliverables and user involvement is minimal, which is one of the key focuses of OO SLDCs using CRC cards, the model is considered ineffective. The Spiral model involves multiple revisions of the same idea. When a set of cards have been developed, it would make sense to refine the idea presented in the card but not to redefine them over and over, which may be the case. This does not serve the purpose of actually convening a CRC discussion among the team to draw up cards corresponding to the user requirement. Moreover, in the case of the Spiral model, we would need to convene multiple such meetings at each iteration, which would drastically bring down the overall productivity of the team.&lt;br /&gt;
CRC cards are used widely for software development processes. More about this can be found [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w11_ap#CRC_Cards_in_Software_Development_Process here].&lt;br /&gt;
&lt;br /&gt;
==Version Control System==&lt;br /&gt;
A [http://en.wikipedia.org/wiki/Revision_control version control] system '''(VCS)''' is a process for managing software codes,files and directory structures and corresponding updates made to them during software development, web development etc. project or during subsequent project maintenances. Version control is also known as revision control, source control or [http://en.wikipedia.org/wiki/Software_configuration_management software configuration management] (SCM)[6].&lt;br /&gt;
Any software development project is a dynamic and fast paced environment. In a typical setting, development for a project is performed simultaneously by many developers. Thus, incorporating all the changes made, either simultaneously or at different times, poses a new type of challenge. &lt;br /&gt;
The need of version control systems is given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Why_version_control_systems_are_needed.3F here].&lt;br /&gt;
VCS' can be broadly categorized into three groups based on the repository model:&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Local_repository_model_.5B1.5D Local repository model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Client-server_model Client-server model]&lt;br /&gt;
*[http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w1_rk#Distributed_model Distributed model]&lt;br /&gt;
&lt;br /&gt;
Criteria for selecting a particular version control system: &lt;br /&gt;
*Size of project&lt;br /&gt;
*Number of developers working on the project&lt;br /&gt;
*Distribution of developers working on the project. &lt;br /&gt;
*Technology used for developing&lt;br /&gt;
*Plug-ins for IDE’s&lt;br /&gt;
*Learning curve&lt;br /&gt;
*Speed&lt;br /&gt;
*Functionality&lt;br /&gt;
*User interfaces (Web and GUI)&lt;br /&gt;
&lt;br /&gt;
Examples of version control systems:&lt;br /&gt;
*[http://www.nongnu.org/cvs/ CVS]&lt;br /&gt;
*[http://www.bitkeeper.com/ Bitkeeper]&lt;br /&gt;
*[http://subversion.apache.org/ Subversion (SVN)]&lt;br /&gt;
*[http://www.monotone.ca/ Monotone]&lt;br /&gt;
*[http://www.perforce.com/ Perforce]&lt;br /&gt;
*[http://git-scm.com/ Git]&lt;br /&gt;
*[http://bazaar.canonical.com/en/ Bazaar]&lt;br /&gt;
*[http://www-01.ibm.com/software/awdtools/clearcase/ Clearcase]&lt;br /&gt;
*[http://mercurial.selenic.com/ Mercurial]&lt;br /&gt;
&lt;br /&gt;
==UML Representation==&lt;br /&gt;
&lt;br /&gt;
The Unified Modeling Language standard specifies graphical notations for object oriented models. Representations of inheritance,composition and aggregation are given [http://expertiza.csc.ncsu.edu/wiki/index.php/CSC/ECE_517_Fall_2012/ch1_1w24_nr#UML_Representation here].&lt;br /&gt;
&lt;br /&gt;
=References=&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Component-based_software_engineering&lt;br /&gt;
&lt;br /&gt;
http://en.wikipedia.org/wiki/Functional_programming&lt;br /&gt;
&lt;br /&gt;
http://docs.python.org/dev/howto/functional.html&lt;br /&gt;
&lt;br /&gt;
http://searchsoa.techtarget.com/definition/object-oriented-programming&lt;/div&gt;</summary>
		<author><name>Skillam</name></author>
	</entry>
</feed>