java設計模式大全 Design pattern samples in Java(最經典最全的資料)__Java

來源:互聯網
上載者:User
Design pattern samples in Java. Build status:

Introduction

Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.

Design patterns can speed up the development process by providing tested, proven development paradigms.

Reusing design patterns helps to prevent subtle issues that can cause major problems, and it also improves code readability for coders and architects who are familiar with the patterns. List of Design Patterns Creational Patterns

Creational design patterns abstract the instantiation process. They help make a system independent of how its objects are created, composed, and represented. Abstract Factory Builder Factory Method Prototype Property Singleton Multiton Object Pool Structural Patterns

Structural patterns are concerned with how classes and objects are composed to form larger structures. Adapter Bridge Composite Decorator Facade Flyweight Proxy Service Locator Servant Event Aggregator Behavioral Patterns

Behavioral patterns are concerned with algorithms and the assignment of responsibilites between objects. Chain of responsibility Command Interpreter Iterator Mediator Memento Observer State Strategy Template method Visitor Null Object Intercepting Filter Specification Dependency Injection Concurrency Patterns

Concurrency patterns are those types of design patterns that deal with the multi-threaded programming paradigm. Double Checked Locking Thread Pool Presentation Tier Patterns

Presentation Tier patterns are the top-most level of the application, this is concerned with translating tasks and results to something the user can understand. Model-View-Controller Model-View-Presenter Flux Architectural Patterns

An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context. Data Access Object Service Layer Integration Patterns

Integration patterns are concerned with how software applications communicate and exchange data. Tolerant Reader Idioms

A programming idiom is a means of expressing a recurring construct in one or more programming languages. Generally speaking, a programming idiom is an expression of a simple task, algorithm, or data structure that is not a built-in feature in the programming language being used, or, conversely, the use of an unusual or notable feature that is built into a programming language. What distinguishes idioms from patterns is generally the size, the idioms tend to be something small while the patterns are larger. Execute Around Poison Pill Callback Lazy Loading Double Dispatch Resource Acquisition Is Initialization Private Class Data Abstract Factory ↑

Intent: Provide an interface for creating families of related or dependent objects without specifying their concrete classes.

Applicability: Use the Abstract Factory pattern when a system should be independent of how its products are created, composed and represented a system should be configured with one of multiple families of products a family of related product objects is designed to be used together, and you need to enforce this constraint you want to provide a class library of products, and you want to reveal just their interfaces, not their implementations

Real world examples:

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.