Design Patterns

Design Patterns
Design patterns play an important part in information technologies and development of modern computing and telecommunication industries. Traditionally, a design pattern is defined as a formal way of documenting a solution to design problem in a particular field of expertise (Hair, et al., 1995). In actuality, the number of design patterns is constantly growing because IT specialists and programmers work on the creation and introduction of new, effective design patterns. At the same time, there are design patterns, which have a good reputation and which have proved to be efficient and reliable. In this regard, it is worth mentioning Ruby, which is often used as an alternative to JAVA and which has already proved its efficiency and reliability gaining the popularity not only among professional programmers but also among amateurs.

Motivation

Ruby is a dynamic, open source programming language with a focus on simplicity and productivity (George, 2004). In fact, the aforementioned characteristics of this programming language are crucial and, it is due to these characteristics, Ruby has gained the large popularity among users. Ruby was created by Yukihiro Matsumoto as an alternative to JAVA and other programming languages, which were and still are popular among programmers and IT specialists as well as amateurs. At the same time, Ruby is not a unique product. In stark contrast, Ruby comprised the best characteristics and features of other programming languages, including Smalltalk, Eiffel, Ada, and Lisp. The creator of Ruby mixed the existing languages distinguishing their best characteristics and implementing them in Ruby. Being created in 1995, Ruby has gained the public approval and became one of the most popular programming language among coders in 2006.

Applicability

Ruby is a creational design pattern. This programming language is focused on object entirely and every bit of information and code can give their own properties and actions in Ruby. Object-oriented properties of Ruby and they are defined by programmers as instance variables and actions are known as methods (Jakobsson and Myers, 2006). At the same time, another factor that contributes to the popularity of Ruby is its flexibility. To put it more precisely, Ruby allows users to alter freely its parts. Therefore, users can introduce any alternation as they wish without affecting the functionality of programs and the language itself. Essential parts of Ruby can be deleted, added upon, removed or redefined respectively to the desire of a programmer. Such flexibility attracts programmers as well as ordinary users, who are just making their first steps in programming.
Structure
Blocks – methods – objects
Participants
Words, syntax, punctuation
Collaborations
The participants interact with each other for through the use of words, syntax and punctuation the programming occurs.
Consequences
Using blocks, methods and objects programmers can develop a program respectively to their goals and wants.
Implementation
Ruby combines functional programming with imperative programming
Sample Code
class Numeric
def plus(x)
self.+(x)
end
end

y = 5.plus 6
# y is now equal to 11
Known Uses

Another advantage of Ruby over other programming languages is its blocks, which are programmers’ closures to any method/action, describing how that method should act. In addition, Ruby allows mixing that attracts programmers and facilitates the use of Ruby. In general, Ruby is not just very flexible but also this programming language is user-friendly that increases its popularity among users.

Related Patterns

It is worth mentioning the fact that Ruby is a good alternative to JAVA. This creational design pattern is flexible and easy to use that increases its popularity and attracts many users worldwide.




References:

Baron, Reuben M. and David A. Kenny. 1986. The Moderator-Mediator Variable Distinction in Social Psychological Research: Conceptual, Strategic, and Statistical Considerations. Journal of Personality and Social Psychology, 51 (6): 1173-1182.
Fornell, Claes and David F. Larcker. 1981. Structural Equation Models with Unobservable Variables and Measurement Error: Algebra and Statistics. Journal of Marketing Research, 18 (3): 382-388.
George, Joey F. 2004. The Theory of Planned Behavior and Internet Purchasing. Internet Research, 14 (3): 198-212.
Ha, Vicki, Farah Al Shaar, Kori Inkpen, and Lina Hdeib. 2006. An Examination of User Perception and Misconception of internet Cookies in CHI 2006. In Gary M. Olson and Robin Jeffries (Eds.), Extended Abstracts on Human Factors in Computing Systems (833-838). Montreal: Association for Computer Machinery.
Hair, Joseph F., Rolph E. Anderston, Ronald L. Tatham, and William Black. 1995. Multivariate Data Analysis with Readings. Upper Saddle River, N J: Prentice-Hall, Inc.
Hinde, Stephen. 2003. Careless about Privacy. Computers & Security, 22 (4): 284- 288.
Ives, Blake, Kenneth R. Walsh, and Helmut Schneider. 2004. The Domino Effect of Password Reuse. Communications of the ACM, 47 (4): 75-78.
Jakobsson, Markus and Steven Myers. 2006. Phishing and Countermeasures: Understanding the Increasing Problem of Electronic Identity Theft. Hoboken, NJ: Wiley- Interscience.
Keller, Punam Anand and Lauren Goldberg Block. 1996. Increasing the Persuasiveness of Fear Appeals: The Effect of Arousal and Elaboration. Journal of Consumer Research, 22 (4): 448-459.
Kim, Young Hoon and Dan J. Kim. 2005. A Study of Online Transaction Self- Efficacy, Consumer Trust, and Uncertainty Reduction in Electronic Commerce Transaction.

Design Patterns 8.1 of 10 on the basis of 3652 Review.