Types of design patterns

Database design patterns. “A design pattern is a description of classes and objects communicating with each other adapted to solve a general design problem in a particular context.”

With the use of design patterns, repetition in the search for solutions to problems already known and previously solved is avoided. It allows to formalize a common vocabulary among designers and to standardize the way in which the design is carried out.

Summary

[ hide ]

  • 1 GRASP Standards
  • 2 Types of GRASP patterns
  • 3 GOF patterns
  • 4 Source

GRASP standards

The GRASP patterns (Software Patterns for the General Assignment of Responsibility) constitute a teaching aid, as they help to understand the design of objects. Of the different patterns offered by GRASP, the following have been taken into account for the modeling of the plugin:

GRASP pattern types

Creator Pattern

Creator Pattern:
The Creator pattern guides the assignment of responsibilities and helps identify who should be responsible for creating objects. Task is assigned to a class to create when, contains, adds, composes, stores, or uses another class. The fundamental purpose of this pattern is to find a creator that must connect with the object produced in any event. The use of this pattern is evidenced in the classes, the SQL editor which creates objects of the message and result classes, to carry out its responsibilities.

 

Expert Pattern

Expert Pattern
The expert pattern is used when assigning responsibilities. It offers as a solution to assign responsibilities to the classes that have the necessary information to comply with these, for which they are created without depending on any other. It is a basic principle that is often used in object-oriented design. The use of this pattern is evidenced in the main-Interface class which assigns responsibilities to the editor-graphical and editorSQL classes.

 

Controller Pattern

Controller Pattern
The controller pattern assigns responsibility for handling system events to a class. This pattern is evidenced in the graficalView class, which is in charge of controlling and managing all the tasks of the Field Item and TableItem classes.

 

High Cohesion Pattern

High Cohesion
The high cohesion pattern is the main goal to be sought at all times, it must be taken into account in all design decisions. The high level of cohesion is presented by the classes that have moderate responsibilities in a functional area and collaborate with others to carry out the tasks, not where these classes encompass the volume of responsibilities to be carried out regardless of their complexity. This pattern is evident in the main-Interface and query classes where they collaborate with each other to execute the import query function.

 

Low Coupling Pattern

Low Coupling
Low coupling encourages the assignment of responsibilities in such a way that their inclusion does not increase coupling, that is, it means assigning a responsibility to maintain few dependencies between classes. The use of this pattern can be seen in the Highlighter class and the main-interface since Highlighter has the minimum number of dependencies with other classes.

GOF patterns

The GOF (Gang of Four, “Gang of Four”) patterns compile a series of patterns of designs, grouped into three categories: creation, structure and behavior.

Structural: They describe the classes and objects that can be combined to establish large structures and provide new functionalities. These add-on objects can even be simple objects or compound objects.
Behavior: They help define communication and iteration between the objects of a system. Observer: Defines a one-to-many dependency between objects, so that when an object changes state, all objects are automatically notified and updated.

 

by Abdullah Sam
I’m a teacher, researcher and writer. I write about study subjects to improve the learning of college and university students. I write top Quality study notes Mostly, Tech, Games, Education, And Solutions/Tips and Tricks. I am a person who helps students to acquire knowledge, competence or virtue.

Leave a Comment