StudentShare
Contact Us
Sign In / Sign Up for FREE
Search
Go to advanced search...
Free

The Observer Is a Well-Known Design Pattern - Research Paper Example

Cite this document
Summary
The paper "The Observer Is a Well-Known Design Pattern" states that there can be serious challenges because of mismatched interfaces used in this translation process. This transformation can be time-consuming because it takes a lot of time in translating one interface into another…
Download full paper File format: .doc, available for editing
GRAB THE BEST PAPER96.9% of users find it useful
The Observer Is a Well-Known Design Pattern
Read Text Preview

Extract of sample "The Observer Is a Well-Known Design Pattern"

?DESIGN PATTERNS Design Patterns Affiliation The Observer Pattern The Observer is a well-known design pattern in which a listof objects depending on an object (which is also acknowledged as a subject) is maintained. In this scenario, the observer is the object which depends on the subject. Additionally, this subject automatically informs all the objects (observers) regarding any changes made to the state. In order to inform other objects or observers regarding something attractive taking place, a subject distributes an announcement or message to the observers that exist on the list of the subject. This notification can encompass particular information and facts regarding the topic of the notification. However, the subject can eliminate any of the observers from the list when there is no need for a specific observer to be informed regarding these events or changes with respect to the matter they are registered with the subject. They are used when there is need maintaining constancy and reliability between connected objects while not affecting coupling characteristics of classes. For instance, these patterns can be used when an object needs to be able to inform other objects without having suppositions on the subject of those objects. Moreover, the observer pattern consists of the following elements (Osmani, 2012): Subject: This component is responsible for managing the operation related to observers, such as facilitating, eliminating, or adding observers into the list (Osmani, 2012). Observer: This component is responsible for offering an up to date interface for observers that need to be informed regarding any change (Osmani, 2012). Concrete Subject: This component is responsible for managing transmission and notifications to objects regarding changes to state. It also maintains the state of ConcreteObservers (Osmani, 2012). ConcreteObserver: This component is responsible for establishing and maintaining a reference to the ConcreteSubject. In addition, it also implements a modern interface for the observer to make sure that state is compatible with the subject (Osmani, 2012). Advantages The observer patterns allow software development teams to think effectively about the associations among various elements of software application (Osmani, 2012; Toal, 2012). These patterns also allow software engineers to recognize what application layers have straight associations which could be alternatively replaced with a set of observers and subjects. In this scenario, these patterns can be effectively employed for splitting a software application into a number of smaller, more freely joined components with the purpose of improving code maintenance as well as competency for re-use (Osmani, 2012; Sud, 2013). These patterns are useful for establishing and maintaining a one-to-many dependency between objects (Marakana Inc., 2013). These patterns provide an excellent communication mechanism for instance, when there is a change in the state all the related objects are notified automatically (Marakana Inc., 2013) Disadvantages As discussed above, these patterns support for decoupling however by decoupling various objects, it can frequently turn out to be hard to get assurance that specific components of a software application are working as they are expected to do (Osmani, 2012; Pierry, 2013). It is believed that in these patterns subscribers are relatively unaware of the subsistence of each other as well as are sightless to the price of switching publishers. Hence, because of this dynamic association between objects, it is difficult to track the update dependence (Osmani, 2012; Sud, 2013). 2. The Factory Pattern The Factory pattern is also one of the most important creational patterns, which is concerned with the concept of developing objects. However, it differentiates with other patterns of the base of a property and that is it doesn't openly require software engineers to make use of use of a constructor. On the other hand, a Factory provides software engineers with a broad interface for developing objects. In this scenario, software engineers can state the type of factory object they want to create. This pattern is mainly used when there is need to create an object process that is comparatively complicated for instance, the creation of an object that completely depends on application configuration or dynamic factors (Osmani, 2012). Advantages The Factory pattern can be helpful in a number of situations such as: When the development process of an object or software component is very complex When software development team wants to create diverse instances of objects relying on the environment they are working in (Osmani, 2012). This pattern is very useful when software development team is working with a number of small objects or software modules that have the similar characteristics (Osmani, 2012). These patterns provide a common interface for developing an object (Marakana Inc., 2013). Defer the real development to subclasses (Marakana Inc., 2013). This pattern restricts the knowledge of concrete instances (Marakana Inc., 2013). This is very useful when customers are unable to foresee the class of objects to generate (Marakana Inc., 2013) Disadvantages When this pattern is implemented for the resolution of the wrong type of problem, it can cause a needlessly complexity to a software application (Osmani, 2012). In view of the fact that the process of creating an object is appropriately abstracted within an interface, which can also cause a variety of issues when conducting unit testing. However, it depends on the fact how complex this process can be (Osmani, 2012). 3. The Adapter Pattern The Adapter pattern is used to interpret an interface for a class or an object into an interface that is consistent with a particular system. Basically, Adapters are used to facilitate classes or objects to work together. However, it can be a serious challenge because of their mismatched interfaces. In addition, the Adapter works by interpreting calls to its interface into calls to the actual interface as well as the code necessary to attain this is typically fairly negligible (Osmani, 2012; Pierry, 2013). Advantages: The Adapter class itself wraps an Adaptee, interpreting all calls initiated by the client into the suitable sequence and format of calls (Pierry, 2013). The Adapter is used to adapt the interface of a class or object into another interface that can be used by a client (Marakana Inc., 2013; Sud, 2013). The Adapter facilitates different objects and classes to work together regardless of their incompatible interfaces (Marakana Inc., 2013; Sud, 2013). They are mainly useful in development to glue elements jointly, in particular when 3rd party libraries and components are employed (Marakana Inc., 2013; Sud, 2013). Disadvantages: There can be serious challenges because of mismatched interfaces used in this translation process (Osmani, 2012). This transformation can be time-consuming because it takes a lot of time in translating the one interface into another (Osmani, 2012). References Marakana Inc. (2013). Java Fundamentals Tutorial : Design Patterns. Retrieved June 03, 2013, from http://marakana.com/bookshelf/java_fundamentals_tutorial/design_patterns.html Osmani, A. (2012). Learning JavaScript Design Patterns. Retrieved May 31, 2013, from A book by Addy Osmani: Volume 1.5.2: http://addyosmani.com/resources/essentialjsdesignpatterns/book/ Pierry, R. (2013). Discover the Design Patterns You're Already Using in the .NET Framework. Retrieved June 03, 2013, from http://msdn.microsoft.com/en-us/magazine/cc188707.aspx#S4 Sud, A. (2013). Design Patterns. Retrieved June 02, 2013, from http://wwwx.cs.unc.edu/~sud/courses/204/patterns.html#Adapter Toal, R. (2012). Design Patterns. Retrieved June 03, 2013, from http://cs.lmu.edu/~ray/notes/designpatterns/ Read More
Cite this document
  • APA
  • MLA
  • CHICAGO
(“Design Patterns Research Paper Example | Topics and Well Written Essays - 1000 words”, n.d.)
Design Patterns Research Paper Example | Topics and Well Written Essays - 1000 words. Retrieved from https://studentshare.org/information-technology/1479561-design-patterns
(Design Patterns Research Paper Example | Topics and Well Written Essays - 1000 Words)
Design Patterns Research Paper Example | Topics and Well Written Essays - 1000 Words. https://studentshare.org/information-technology/1479561-design-patterns.
“Design Patterns Research Paper Example | Topics and Well Written Essays - 1000 Words”, n.d. https://studentshare.org/information-technology/1479561-design-patterns.
  • Cited: 0 times

CHECK THESE SAMPLES OF The Observer Is a Well-Known Design Pattern

Observers Paradox and Ways to minimize its Impact in Collection of Live Speech Data

However, the awareness that the participants are under observation impacts on the way they speak and what they speak about, an effect called the observer's Paradox.... This research seeks to discuss the observer's Paradox in the context of collecting speech data and explore some ways in which a researcher can roll back some of its negative effects in sociolinguistic research.... observer's Paradox is a term attributable to the linguistic researcher, William Labov....
12 Pages (3000 words) Essay

Literature Review: The Use of Patterns in Architecture

A collection of the various patterns is viewed as a pattern language of whose elements or components may be regulated through various rules.... This is largely attributed to the fact that in the society, they lack uniformity and consensus in relation to granularity and coherence in the pattern languages.... As a result, this article establishes a proposal for a single pattern language that will be above the other proposed pattern languages; one that will be uniformly accepted and understood in its various application areas....
8 Pages (2000 words) Essay

How to Maintain the Data of Uses' Lifelogging

In addition, each pattern is aimed at solving a specific problem (Hauck, 2014).... The objective of this paper is to discuss the pattern that can be used for an automatic health monitoring system.... esign PatternsIn the scenario of an automatic health monitoring system, the behavioral pattern is best suited because behavioral patterns are useful for supporting communication between different objects.... In fact, this pattern offers much greater flexibility than other patterns because this pattern allows software developers to decouple objects from each other....
6 Pages (1500 words) Case Study

Patterns and Software Development

29This section will discuss some of the main aspects of the design pattern for the Solent Cinemas booking system: Facade, Observer, and Iterator.... The facade pattern is a design pattern normally employed through object-oriented programming.... This essay analyzes The Facade pattern, which offers an integrated interface to a group of system interfaces in a subsystem.... he Facade pattern offers an integrated interface to a group of system interfaces in a subsystem....
9 Pages (2250 words) Coursework

Designing with Patterns

the observer is a Behavioral Design Pattern and focuses on the communication patterns between objects.... According to the research, the composite is a Structural design pattern that focuses on the relationships/interfaces between entities and objects.... This paper illustrates that the Composite design pattern perfectly suites the requirements of the Solent Cinemas booking system as well as the initial design given in the case study.... This shows a clear parent-child relationship existing between the two classes which are the essence of the composite design pattern....
45 Pages (11250 words) Essay

The Cultural Context and Its Influence on the Design Output of the Middle East

The design process can be defined as a method of thinking creatively and strategically.... The following is a preliminary study of the Middle East region from a historical, political, economic and cultural perspective in order to provide a background for the discussion of cultural context and its influence on the design output of the Middle East....
12 Pages (3000 words) Research Paper

Patterns for Software Design

The author of the "Patterns for Software Design" paper examines the effectiveness and usefulness of each pattern of silent cinema booking systems, pattern envy and pattern ethics, proto-patterns and paternity tests, content patterns, and page structure.... The basic terminology that is enlisted in the software pattern community which entails the general idea of the pattern is articulated that it is propelled to solve equations that may be a headache in designs....
10 Pages (2500 words) Coursework

Analysis and Design Patterns in Computer Science

design pattern is a well-known applicable solution to constantly occurring problems that are related to software design.... An analysis pattern is more often than not represented in form of a group of the same type of objects and will usually have similar attributes the description of an analysis pattern has been widely discussed by scholars but a single definition is yet to be reached (Hunt, 2003).... ne of the proposed definitions of an analysis pattern by Hahsler has its structure as described below....
10 Pages (2500 words) Report
sponsored ads
We use cookies to create the best experience for you. Keep on browsing if you are OK with that, or find out how to manage cookies.
Contact Us