You are on page 1of 2

Introduction to Patterns

• Purpose: Patterns allow the application of proven and tested general solutions
(architecture, design, implementation) during the development of business applications.
• Design Patterns: Provide access to confirmed methodologies for solving various problems,
enabling the utilization of collective knowledge and experience.

Principle of Responsibility Division


• Principle: Divide the application in a way that its components overlap as little as possible
in terms of functionality.
• Application: Initially applied in designing the application itself, which is developed as a
multilayered architecture consisting of presentation layer, business logic layer, data access
layer, etc.
• Individual Layers: The principle is then applied to individual layers.

Presentation Patterns
• Objective: Clear separation of code displaying the user interface and handling user
interactions from the code dealing with presentation logic.
• Variety: Numerous patterns applicable to the presentation layer, including Autonomous
View, MVC, MVP, PM.
• Popularity: Ease of application and maintenance of applications by introducing
components and facilitating testing.

Basic Responsibilities of the Presentation Layer


• State: Represents the current data view on the user interface.
• Logic: Behavior related to data display and manipulation.
• Synchronization: Ensuring data displayed on the user interface aligns with data in the
domain model.

Role of the Model in Presentation Patterns


• Commonality: Models manage behavior, states, and data of the application domain.
• Inclusions: Encompass data and business logic related to loading and managing data,
handling business rules, validation, default values, calculated values, etc.
• Model Function: Manages data and business logic but does not dictate how it will be
displayed or updated.
• Separation: Isolated as a separate component to eliminate code repetition and enable reuse.

In summary, the text delves into the significance of design patterns, particularly focusing on
presentation patterns in software development, emphasizing the importance of structuring
applications to enhance maintainability, testing, and separation of concerns. It highlights the role of
models in managing data and business logic independently from the presentation layer, promoting
code reusability and reducing redundancy.

You might also like