Compare commits
2 Commits
l10n_maste
...
all-contri
Author | SHA1 | Date | |
---|---|---|---|
|
40f3112072 | ||
|
cb81d4e8eb |
@@ -1694,24 +1694,6 @@
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "uh-zz",
|
||||
"name": "Reo Uehara",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/47747828?v=4",
|
||||
"profile": "https://uh-zz.github.io/blog/",
|
||||
"contributions": [
|
||||
"translation"
|
||||
]
|
||||
},
|
||||
{
|
||||
"login": "Fiordy",
|
||||
"name": "Fiordy",
|
||||
"avatar_url": "https://avatars.githubusercontent.com/u/53420573?v=4",
|
||||
"profile": "https://github.com/Fiordy",
|
||||
"contributions": [
|
||||
"doc"
|
||||
]
|
||||
}
|
||||
],
|
||||
"contributorsPerLine": 7,
|
||||
|
@@ -10,12 +10,12 @@
|
||||
[](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
|
||||
[](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
[](#contributors-)
|
||||
[](#contributors-)
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
|
||||
<br/>
|
||||
|
||||
Read in different language : [**zh**](localization/zh/README.md), [**ko**](localization/ko/README.md), [**fr**](localization/fr/README.md), [**tr**](localization/tr/README.md), [**ar**](localization/ar/README.md), [**es**](localization/es/README.md), [**pt**](localization/pt/README.md), [**id**](localization/id/README.md), [**ru**](localization/ru/README.md), [**de**](localization/de/README.md), [**ja**](localization/ja/README.md)
|
||||
Read in different language : [**zh**](localization/zh/README.md), [**ko**](localization/ko/README.md), [**fr**](localization/fr/README.md), [**tr**](localization/tr/README.md), [**ar**](localization/ar/README.md), [**es**](localization/es/README.md), [**pt**](localization/pt/README.md), [**id**](localization/id/README.md), [**ru**](localization/ru/README.md), [**de**](localization/de/README.md)
|
||||
|
||||
<br/>
|
||||
|
||||
@@ -314,8 +314,6 @@ This project is licensed under the terms of the MIT license.
|
||||
<td align="center"><a href="https://github.com/Mozartuss"><img src="https://avatars.githubusercontent.com/u/32893711?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mozartus</b></sub></a><br /><a href="#translation-Mozartuss" title="Translation">🌍</a></td>
|
||||
<td align="center"><a href="https://github.com/ManviGoel26"><img src="https://avatars.githubusercontent.com/u/55682355?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Manvi Goel</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=ManviGoel26" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://github.com/blueberry404"><img src="https://avatars.githubusercontent.com/u/39243539?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anum Amin</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=blueberry404" title="Documentation">📖</a></td>
|
||||
<td align="center"><a href="https://uh-zz.github.io/blog/"><img src="https://avatars.githubusercontent.com/u/47747828?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Reo Uehara</b></sub></a><br /><a href="#translation-uh-zz" title="Translation">🌍</a></td>
|
||||
<td align="center"><a href="https://github.com/Fiordy"><img src="https://avatars.githubusercontent.com/u/53420573?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fiordy</b></sub></a><br /><a href="https://github.com/iluwatar/java-design-patterns/commits?author=Fiordy" title="Documentation">📖</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
|
@@ -87,36 +87,24 @@ public interface KingdomFactory {
|
||||
}
|
||||
|
||||
public class ElfKingdomFactory implements KingdomFactory {
|
||||
|
||||
@Override
|
||||
public Castle createCastle() {
|
||||
return new ElfCastle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public King createKing() {
|
||||
return new ElfKing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Army createArmy() {
|
||||
return new ElfArmy();
|
||||
}
|
||||
}
|
||||
|
||||
public class OrcKingdomFactory implements KingdomFactory {
|
||||
|
||||
@Override
|
||||
public Castle createCastle() {
|
||||
return new OrcCastle();
|
||||
}
|
||||
|
||||
@Override
|
||||
public King createKing() {
|
||||
return new OrcKing();
|
||||
}
|
||||
|
||||
@Override
|
||||
public Army createArmy() {
|
||||
return new OrcArmy();
|
||||
}
|
||||
|
@@ -124,7 +124,3 @@ Now, we can create multiple creatures such as Orcs, tell them to eat and roam, a
|
||||
## Class diagram
|
||||
|
||||

|
||||
|
||||
## Tutorials
|
||||
|
||||
* [Android and Java Concurrency: The Active Object Pattern](https://www.youtube.com/watch?v=Cd8t2u5Qmvc)
|
@@ -138,10 +138,6 @@ This pattern can be used:
|
||||
* When the visited class hierarchy will be frequently extended with new derivatives of the Element class.
|
||||
* When the recompilation, relinking, retesting or redistribution of the derivatives of Element is very expensive.
|
||||
|
||||
## Tutorial
|
||||
|
||||
* [Acyclic Visitor Pattern Example](https://codecrafter.blogspot.com/2012/12/the-acyclic-visitor-pattern.html)
|
||||
|
||||
## Consequences
|
||||
|
||||
The good:
|
||||
|
@@ -105,12 +105,6 @@ Use the Adapter pattern when
|
||||
* you need to use several existing subclasses, but it's impractical to adapt their interface by subclassing every one. An object adapter can adapt the interface of its parent class.
|
||||
* most of the applications using third party libraries use adapters as a middle layer between the application and the 3rd party library to decouple the application from the library. If another library has to be used only an adapter for the new library is required without having to change the application code.
|
||||
|
||||
## Tutorials
|
||||
|
||||
* [Dzone](https://dzone.com/articles/adapter-design-pattern-in-java)
|
||||
* [Refactoring Guru](https://refactoring.guru/design-patterns/adapter/java/example)
|
||||
* [Baeldung](https://www.baeldung.com/java-adapter-pattern)
|
||||
|
||||
## Consequences
|
||||
Class and object adapters have different trade-offs. A class adapter
|
||||
|
||||
|
@@ -134,12 +134,6 @@ Use the Builder pattern when
|
||||
* The algorithm for creating a complex object should be independent of the parts that make up the object and how they're assembled
|
||||
* The construction process must allow different representations for the object that's constructed
|
||||
|
||||
## Tutorials
|
||||
|
||||
* [Refactoring Guru](https://refactoring.guru/design-patterns/builder)
|
||||
* [Oracle Blog](https://blogs.oracle.com/javamagazine/post/exploring-joshua-blochs-builder-design-pattern-in-java)
|
||||
* [Journal Dev](https://www.journaldev.com/1425/builder-design-pattern-in-java)
|
||||
|
||||
## Known uses
|
||||
|
||||
* [java.lang.StringBuilder](http://docs.oracle.com/javase/8/docs/api/java/lang/StringBuilder.html)
|
||||
|
@@ -1,59 +0,0 @@
|
||||
# Java で実装されたデザインパターン
|
||||
|
||||

|
||||
[](https://raw.githubusercontent.com/iluwatar/java-design-patterns/master/LICENSE.md)
|
||||
[](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
|
||||
[](https://sonarcloud.io/dashboard?id=iluwatar_java-design-patterns)
|
||||
[](https://gitter.im/iluwatar/java-design-patterns?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->
|
||||
|
||||
[](#contributors-)
|
||||
|
||||
<!-- ALL-CONTRIBUTORS-BADGE:END -->
|
||||
|
||||
# はじめに
|
||||
|
||||
デザインパターンとは、アプリケーションやシステムを設計する際によくある問題を解決するために、プログラマーが使用できる形式化された最良の手法です。
|
||||
|
||||
デザインパターンは、テストされ、証明された開発パラダイムを提供することで、開発プロセスを高速化することができます。
|
||||
|
||||
デザインパターンを再利用することで、大きな問題を引き起こす微妙な問題を防ぐことができます。
|
||||
また、デザインパターンを熟知したコーダーやアーキテクトにとっても、コードの読みやすさが向上します。
|
||||
|
||||
# はじめる
|
||||
|
||||
このサイトでは、Java のデザインパターンを紹介しています。
|
||||
これらのソリューションは、オープンソースコミュニティの経験豊富なプログラマーやアーキテクトによって開発されています。
|
||||
|
||||
パターンは、ハイレベルの説明またはソースコードを確認することで参照できます。
|
||||
|
||||
ソースコードの例はよくコメントされていて、特定のパターンをどのように実装するかを説明するプログラミングチュートリアルのようなものです。
|
||||
|
||||
私たちは、最も一般的で実績のあるオープンソースの Java 技術を使用しています。
|
||||
|
||||
資料に飛び込む前に、さまざまな[ソフトウェア設計の原則](https://java-design-patterns.com/principles/)に精通している必要があります。
|
||||
|
||||
すべてのデザインは、可能な限りシンプルであるべきです。
|
||||
|
||||
KISS(シンプルにしておけ!この間抜け)、YAGNI(機能は実際に必要となるまでは追加しないのがよい)、そして Do The Simplest Thing That Could Possibly Work(機能する可能性のある中で最もシンプルなことをする)の原則に基づいて設計を始めるべきです。
|
||||
|
||||
複雑さやパターンは、実用的な拡張性が必要な場合にのみ導入すべきです。
|
||||
|
||||
これらの概念を理解した上で、以下のような方法で[デザインパターン](https://java-design-patterns.com/patterns/) を掘り下げていくことができます。
|
||||
|
||||
- 特定のパターンを、パターン名で検索することができます。見つかない場合は、新しいパターンを[ここ](https://github.com/iluwatar/java-design-patterns/issues)で報告してください
|
||||
- `Performance`, `Gang of Four` もしくは`Data access`などのタグを使用。
|
||||
- `Creational`, `Behavioral`などのパターンカテゴリーを使用。
|
||||
|
||||
このサイトで紹介されているオブジェクト指向のソリューションが、あなたのアーキテクチャに役立ち、私たちが開発したように楽しく学ぶことができますように。
|
||||
|
||||
# コントリビュート方法
|
||||
|
||||
プロジェクトに貢献したいとお考えの方は、[開発者 wiki](https://github.com/iluwatar/java-design-patterns/wiki)に関連情報が掲載されています。
|
||||
|
||||
私たちは、[Gitter チャットルーム](https://gitter.im/iluwatar/java-design-patterns)であなたの質問にお答えします。
|
||||
|
||||
# ライセンス
|
||||
|
||||
このプロジェクトは、MIT ライセンスの条件の下でライセンスされています。
|
Reference in New Issue
Block a user