0 Bewertungen0% fanden dieses Dokument nützlich (0 Abstimmungen)
17 Ansichten6 Seiten
In past decade, design patterns have been
widely adopted by software industry for reusing expert
design experience. Software developers has been routinely
reusing design patterns to solve their problems that are
frequently encountered by them. Recurring problem can
be solved by expert in pattern document. The reuse of
patterns may help the software architect to avoid mistakes
in software design, thus improving the quality of software
products .High quality software systems typically apply
expert design experience which has been captured as
design patterns. As demonstrated solutions to recurring
problems, design patterns helps us to reuse the expert
experience in designing system software. Which have been
extensively applied in industry. In this paper, an overview
of design patterns like kinds of design patterns and design
pattern mining techniques are discussed.
In past decade, design patterns have been
widely adopted by software industry for reusing expert
design experience. Software developers has been routinely
reusing design patterns to solve their problems that are
frequently encountered by them. Recurring problem can
be solved by expert in pattern document. The reuse of
patterns may help the software architect to avoid mistakes
in software design, thus improving the quality of software
products .High quality software systems typically apply
expert design experience which has been captured as
design patterns. As demonstrated solutions to recurring
problems, design patterns helps us to reuse the expert
experience in designing system software. Which have been
extensively applied in industry. In this paper, an overview
of design patterns like kinds of design patterns and design
pattern mining techniques are discussed.
In past decade, design patterns have been
widely adopted by software industry for reusing expert
design experience. Software developers has been routinely
reusing design patterns to solve their problems that are
frequently encountered by them. Recurring problem can
be solved by expert in pattern document. The reuse of
patterns may help the software architect to avoid mistakes
in software design, thus improving the quality of software
products .High quality software systems typically apply
expert design experience which has been captured as
design patterns. As demonstrated solutions to recurring
problems, design patterns helps us to reuse the expert
experience in designing system software. Which have been
extensively applied in industry. In this paper, an overview
of design patterns like kinds of design patterns and design
pattern mining techniques are discussed.
A Reconnaissance on Design Patterns M.Chaithanya Varma Student of computer science engineering, Sree Vidhyanikethan Engineering college, Tirupati, India ABSTRACT: In past decade, design patterns have been widely adopted by software industry for reusing expert design experience. Software developers has been routinely reusing design patterns to solve their problems that are frequently encountered by them. Recurring problem can be solved by expert in pattern document. The reuse of patterns may help the software architect to avoid mistakes in software design, thus improving the quality of software products .High quality software systems typically apply expert design experience which has been captured as design patterns. As demonstrated solutions to recurring problems, design patterns helps us to reuse the expert experience in designing system software. Which have been extensively applied in industry. In this paper, an overview of design patterns like kinds of design patterns and design pattern mining techniques are discussed. Keywords: Design pattern, design pattern mining, software, reusable, software design pattern. I. INTRODUCTION Now a days a new software is getting invented for every hour. Problems with that software is also designed with in hours. Its hard to find a new solution to every problem occurred with software. So, expert designers reuse their solution for every new problem, design pattern is well-described solution to a common software problem. Design patterns are a popular topic in software development. It results to code maintainability. Design patterns can be used by other developers to find a good solution to the software problems i.e reusability of previous design patterns to find a solution for the new software problem. In software engineering, a design pattern is a general reusable solution to a commonly occurring software problems within a given context in software design. A design pattern is not a finished design that can be transformed directly into machine code. It is a template for how to solve a problem that can be used in many different situations. Patterns are formalized best practices that the developers implement themselves in an application. In this paper, an analysis on design patterns is discussed. Design patterns are applied in object oriented analysis and designing, operating system, java, .net, c, c++etc. Design patterns may help to record capture design decisions, architectural tradeoff and reuse expert experience. Many current software systems are embedding instances of their design patterns in system source code. After applying the patterns and implemented in a system, however, the pattern- related knowledge is generally no longer available in the source or machine code. So, it is hard to trace such a design information in source code. Even though the design information and diagrams are available, it is typically not easy to find the patterns applied in a large software design. Pattern- related knowledge is normally buried under the descriptions because the participants of a design pattern are not tagged with any knowledge on what roles they play in the design patterns. Without such knowledge, software designer cannot communicate with each other in terms of which patterns are used. A software designer may forget the patterns used over a long period of time. Thus, the benefits of applying patterns may be compromised. The important design decisions may be lost. Mining design pattern instances from system source code or design can greatly help to understand the systems and change them in the future. It also helps to trace back to the original architectural design decisions which are generally lost in system source code. The following is the design pattern in UML.
International Journal of Computer Trends and Technology (IJCTT) - volume4 Issue5May 2013 ISSN: 2231-2803 http://www.ijcttjournal.org Page 1437
Design pattern of UML Christopher Alexander defined designed pattern as - 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. A design pattern systematically names, motivates, and explains a general design that addresses a recurring design problem in object-oriented systems. It describes the problem, the solution, when to apply the solution, and its consequences. It also gives implementation hints and examples. The solution is a general arrangement of objects and classes that solve the problem. The solution is customized and implemented to solve the problem in a particular context. 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.
Section II discuss the overview of design patterns, section III discusses the design pattern mining techniques and section IV gives the conclusion.
II.OVERVIEW OF DESIGN PATTERNS Types of design patterns include creational, structural, and behavioral design patterns. 1.Creational 2.Structural 3.Behavioral
Creational patterns: These patterns will create objects, rather than having instantiate objects directly. Which inturn gives the program more flexibility in deciding which objects need to be created for a given case.
Creationalpattern
Structural patterns: These patterns help to compose groups of objects into larger structures, such as complex user interfaces or accounting data.
Structural pattern
Behavioral patterns: These patterns help to define the communication between objects in your system and how the flow is controlled in a complex program. International Journal of Computer Trends and Technology (IJCTT) - volume4 Issue5May 2013 ISSN: 2231-2803 http://www.ijcttjournal.org Page 1438
Behavioral pattern
These design patterns are further divided in the following manner: I.Creational design pattern: 1.Singleton pattern It is used only when once instance of class is created and that instance is available through all the code. A special care is taken in multithreading environments when multiple threads access the same resources through the same singleton object.
2.Factory pattern It is used when a framework delegate the creation of objects derived from a common super class to the factory. 3.Abstract Factory Pattern It is a creational design pattern. An abstract factory is a factory that returns factories. Why is this layer of abstraction useful? A normal factory can be used to create sets of related objects. An abstract factory returns factories. Thus, an abstract factory is used to return factories that can be used to create sets of related objects. 4.Builder pattern is a creational design pattern used to assemble complex objects. With the builder pattern, the same object construction process can be used to create different objects. The builder has 4 main parts 1.Builder 2.ConcreteBuilders 3.Director 4.Product. 5.Prototype Pattern The prototype pattern is a creational design pattern. In the prototype pattern, a new object is created by cloning an existing object. It can be a useful way of creating copies of objects. II.Structural Design Patterns: 1.Adapter Pattern It is a structural design pattern. In the adapter pattern, a wrapper class (adapter) is used translate requests from it to another class( adaptee). In effect, an adapter provides particular interactions with an adaptee that are not offered directly by the adaptee. It has two forms 1.classadapter 2.object adapter 2.Composite Pattern It is a structural design pattern. In the composite pattern, a tree structure exists where identical operations can be performed on leaves and nodes. A node in a tree is a class that can have children and node class is a 'composite' class. A leaf in a tree is a 'primitive' class that does not have children. The children of a composite can be leaves or other composites. 3.Proxy Pattern It is a structural design pattern. In the proxy pattern, a proxy class is used to control access to another class. The reasons for this control can vary. Example, a proxy may avoid instantiation of an object until the object is needed. This can be useful if the object requires a lot of resources to create. Another reason to use a proxy is to control access rights to an object. A client request may require certain credentials in order to access the object. 4.Flyweight Pattern It is a structural design pattern. In the flyweight pattern, instead of creating large numbers of similar objects, objects are reused. This can be used to reduce memory requirements and instantiation time and related costs. 5.Facade Pattern It is a structural design pattern. In the facade pattern, a facade classes is used to provide a single interface to set of classes. The facade simplifies a clients interaction with a complex system by localizing the interactions into a single interface. The client can interact with a single object rather International Journal of Computer Trends and Technology (IJCTT) - volume4 Issue5May 2013 ISSN: 2231-2803 http://www.ijcttjournal.org Page 1439
than being required to interact directly in complicated ways with the objects that make up the subsystem. 6.Bridge Pattern It is a structural design pattern. In the bridge pattern, separation of an abstraction and its implementation and develop separate inheritance structures for both the abstraction and the implementor. 7.Decorator Pattern It is a structural design pattern. Whereas inheritance adds functionality to classes, the decorator pattern adds functionality to objects by wrapping objects in other objects. Each time additional functionality is required, the object is wrapped in another object. III.Behavioral Design Patterns 1.Template Method Pattern It is a behavioral class pattern. A behavioral class pattern uses inheritance for distribution of behavior. In template method pattern, a method (the 'template method') defines the steps of an algorithm. The implementation of these steps can be deferred to subclasses. 2.Mediator Pattern It is a behavioral object design pattern. The mediator pattern centralizes communication between objects into a mediator object. This centralization is useful since it localizes in one place the interactions between objects, which can increase code maintainability, especially as the number of classes in an application increases. 3.Chain of Responsibility Pattern It is a behavioral object design pattern. In the chain of responsibility pattern, a series of handler objects are chained together to handle a request made by a client object. If the first handler cannot handle the request, the request is forwarded to the next handler, and it is passed down to the chain until the request reaches a handler that can handle the request or the chain ends. In this pattern, the client is decoupled from the actual handling of the request, since it does not know which class will actually handle the request. 4.Observer Pattern It is a behavioral object design pattern. In the observer pattern, an object called the subject maintains a collection of objects called observers. When the subject changes, it notifies the observers. Observers can be added or removed from the collection of observers in the subject. The changes in state of the subject can be passed to the observers so that the observers can change their own state to reflect this change. 5.State Pattern It is a behavioral object design pattern. The idea behind the state pattern is for an object to change its behavior depending on its state. In the state pattern, we have a Context class, and this class has a State reference to a Concrete State instance. The State interface declares particular methods that represent the behaviors of a particular state. 6.Visitor Pattern It is a behavioral object design pattern. The visitor pattern is used to simplify operations on groupings of related objects. These operations are performed by the visitor rather than by placing this code in the classes being visited. 7.Iterator Pattern It is a behavioral object design pattern. The iterator pattern allows for the traversal through the elements in a grouping of objects via a standardized interface. An iterator interface defines the actions that can be performed. These actions include being able to traverse the objects and also obtain the objects. 8.Memento Pattern It is a behavioral design pattern. The memento pattern is used to store an object's state so that this state can be restored at a later point. The saved state data in the memento object is not accessible outside of the object to be saved and restored. This protects the integrity of the saved state data. Software Design Principles: 1.Software entities like classes, modules and functions are opened for extension but closed for modifications. 2.High-level modules are not dependent on low-level modules. Rather both depend on abstractions. 3.Abstractions are not dependent on details. Details are dependent on abstractions. 4.Clients are not forced to depend upon interfaces that they don't use. 5.A class have only one reason to change. 6.Derived types are completely substitutable. SECTION III. DESIGN PATTERN MINING TECHNIQUES Designing a software system is hard. Designing high-quality reusable system is even harder. Design patterns may help to design large high-quality
International Journal of Computer Trends and Technology (IJCTT) - volume4 Issue5May 2013 ISSN: 2231-2803 http://www.ijcttjournal.org Page 1440
Block diagram of design pattern systems in forward engineering. On the other hand, pattern- related knowledge is generally not available in software systems. Understanding large software systems is difficult. With the evolution of software systems, design documents may not be consistentwith their source code anymore. Reverse-engineering design information can recover the early decisions and assist the understanding of the systems, and thus, improve the systems with highe quality. Many existing techniques and tools can help in mining software design from system source code. These reverse engineering tools become the foundation for design pattern discovery that typically do not search the source code from scratch. The results of these tools are the source of pattern discovery. Mining the instances of design patterns from system source code can help to understand and trace back to the original design decisions and reengineer the systems.
Design pattern mining International Journal of Computer Trends and Technology (IJCTT) - volume4 Issue5May 2013 ISSN: 2231-2803 http://www.ijcttjournal.org Page 1441
IV. CONCLUSION In this paper, a survey on design pattern is discussed. Design patterns are reusable patterns used by the software developers for finding the solutions to the new problems by using previous solutions. These patterns are saved for finding solutions for the further software problems. There are three kinds of design patterns like creational, structural, behavioral which are further divided in to many categories. Apart from design pattern, design pattern mining is also discussed.