132 Commits

Author SHA1 Message Date
Ilkka Seppälä cd224ea5fe docs: add diagrams for spatial partition, special case, specification, state, step builder, strangler, strategy, subclass sandbox 2025-04-10 21:13:17 +03:00
Ilkka Seppälä 0ca162a55c deps: Refactor dependencies (#3224)
* remove spring dep
move junit, logging, mockito under dep mgmt

* upgrade anti-corruption-layer deps

* async method invocation

* balking, bloc

* bridge to bytecode

* caching

* callback - cqrs

* component - health check

* hexagonal - metadata mapping

* rest of the patterns

* remove checkstyle, take spotless into use
2025-03-29 19:34:27 +02:00
Mehdi Rahimi 49172dd5be fix: Minor misspelling (#3161) 2025-01-13 18:03:54 +02:00
Ilkka Seppälä 6cd2d0353a docs: Content SEO updates (#2990)
* update yaml frontmatter format

* update abstract document

* update abstract factory

* use the new pattern template

* acyclic visitor seo

* adapter seo

* ambassador seo

* acl seo

* aaa seo

* async method invocation seo

* balking seo

* bridge seo

* builder seo

* business delegate and bytecode seo

* caching seo

* callback seo

* chain seo

* update headings

* circuit breaker seo

* client session + collecting parameter seo

* collection pipeline seo

* combinator SEO

* command seo

* cqrs seo

* commander seo

* component seo

* composite seo

* composite entity seo

* composite view seo

* context object seo

* converter seo

* crtp seo

* currying seo

* dao seo

* data bus seo

* data locality seo

* data mapper seo

* dto seo

* decorator seo

* delegation seo

* di seo

* dirty flag seo

* domain model seo

* double buffer seo

* double checked locking seo

* double dispatch seo

* dynamic proxy seo

* event aggregator seo

* event-based asynchronous seo

* eda seo

* event queue seo

* event sourcing seo

* execute around seo

* extension objects seo

* facade seo

* factory seo

* factory kit seo

* factory method seo

* fanout/fanin seo

* feature toggle seo

* filterer seo

* fluent interface seo

* flux seo

* flyweight seo

* front controller seo

* function composition seo

* game loop seo

* gateway seo

* guarded suspension seo

* half-sync/half-async seo

* health check seo

* hexagonal seo

* identity map seo

* intercepting filter seo

* interpreter seo

* iterator seo

* layers seo

* lazy loading seo

* leader election seo

* leader/followers seo

* lockable object seo

* rename and add seo for marker interface

* master-worker seo

* mediator seo

* memento seo

* metadata mapping seo

* microservice aggregator seo

* api gw seo

* microservices log aggregration seo

* mvc seo

* mvi seo

* mvp seo

* mvvm seo

* monad seo

* monitor seo

* monostate seo

* multiton seo

* mute idiom seo

* naked objects & notification seo

* null object seo

* object mother seo

* object pool seo

* observer seo

* optimistic locking seo

* page controller seo

* page object seo

* parameter object seo

* partial response seo

* pipeline seo

* poison pill seo

* presentation model seo

* private class data seo

* producer-consumer seo

* promise seo

* property seo

* prototype seo

* proxy seo

* queue-based load leveling seo

* reactor seo

* registry seo

* repository seo

* RAII seo

* retry seo

* role object seo

* saga seo

* separated interface seo

* serialized entity seo

* serialized lob seo

* servant seo

* server session seo

* service layer seo

* service locator seo

* service to worker seo

* sharding seo

* single table inheritance seo

* singleton seo

* spatial partition seo

* special case seo

* specification seo

* state seo

* step builder seo

* strangler seo

* strategy seo

* subclass sandbox seo

* table module seo

* template method seo

* throttling seo

* tolerant reader seo

* trampoline seo

* transaction script seo

* twin seo

* type object seo

* unit of work seo

* update method seo

* value object seo

* version number seo

* virtual proxy seo

* visitor seo

* seo enhancements

* seo improvements

* SEO enhancements

* SEO improvements

* SEO additions

* SEO improvements

* more SEO improvements

* rename hexagonal + SEO improvements

* SEO improvements

* more SEO stuff

* SEO improvements

* SEO optimizations

* SEO enhancements

* enchance SEO

* improve SEO

* SEO improvements

* update headers
2024-06-08 19:54:44 +03:00
Ilkka Seppälä 201675d7fc docs: update strategy 2024-05-27 13:08:56 +03:00
Ilkka Seppälä 8389456532 refactor: sanitize javadoc 2024-05-23 18:40:52 +03:00
Ilkka Seppälä f3bde28d01 docs: update strategy 2024-05-21 17:38:03 +03:00
k1w1dev ef42e169b9 fix: Fix sonar issues (#2925)
* Remove unused member which was also causing a false positive sonar issue.
Fixes sonar issue https://sonarcloud.io/project/issues?open=AY3gHwu5DIZTZkppqVEG&id=iluwatar_java-design-patterns

* Fixes sonar issue https://sonarcloud.io/project/issues?open=AXK0OzDA-CiGJS70dLki&id=iluwatar_java-design-patterns
related to "Refactor the code of the lambda to not have multiple invocations throwing the same checked exception."

Also, updated the code to use Instant and Duration to deal with time instead of int. Added the awaitility
library to perform assertions in test which is more reliable than using Thread.sleep directly to wait for events to happen.

* checkstyle fix

* Add sneaky throws to fix sonar lint issue. This is fine as the newFile method is not being tested but instead the new SimpleFileWriter(...) is.

* The first booking needs to happen outside the assertions. Fixed other warnings

* Use records to pass around related objects instead of using a large number of
individual params, which sonar did not like.

* Checkstyle fixes

* checkstyle fixes

* Remove complexity to keep sonar happy.

* Split into different methods to reduce complexity. Could be broken down even further but currently Sonar is happy.

* Move files to correct package

* Add valid assertions to tests

* rename constants to avoid confusion

* Sonar warning related to cognitive complexity can be suppressed as the methods are quite generic and not functional enough to be separated out.

* Use constants to keep Sonar happy

* Use correct constant naming conventions

* Use correct constant naming conventions

* Use lombok to define noargsconstructor

* Use a single method to do the logging

* Remove unused constructor and redundant method

* Use a reusable method for logging
2024-05-04 08:20:01 +03:00
Anthony Bosch 239592e5f5 fix: Issue 2368/fix broken tests (#2511)
* fixing typo

* added embedded mongo db to fix MongoBankTest

* cleaning up tests

* added embedded mongo db to fix MongoBankTest

* cleaning up tests
2023-07-02 11:50:21 +03:00
Rahul Raj fb7ec9b375 dependencies: #2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve chec… (#2464)
* #2449 bump maven-checkstyle-plugin from 3.1.0 to 3.2.0 + resolve checkstyle issues

* remove FileSelectorJFrame.java to resolve checkstyle issue

* remove FileSelectorJFrame.java to resolve checkstyle issue

* remove FileSelectorJFrame.java to resolve checkstyle issue

* add refactored file with correct filename to resolve checkstyle issue

* add the test data

* change filenames from JFrame to Jframe for checkstyle

* fix code smell from  sonar report

* add new testcases to improve the test coverage

* remove code smell
2023-02-04 19:20:54 +02:00
Ilkka Seppälä 266ed609ec fix: replace yaml frontmatter tags with tag (#2353) 2022-11-20 16:48:05 +02:00
Robert Volkmann 4cd8149502 refactor: remove code smell java:S5786 (#2159)
https://sonarcloud.io/organizations/iluwatar/rules?open=java%3AS5786&rule_key=java%3AS5786
2022-10-30 18:21:21 +02:00
Ilkka Seppälä 4108f86177 docs: Prepare for new website launch (#2149)
* Changed database implementation. Removed static objects.

* Fix Logs

* Fix 40 errors from checkstyle plugin run. 139 left))

* Fix CacheStore errors from checkstyle plugin 107 left

* Fix last errors in checkstyle.

* Fix sonar issues

* Fix issues in VALIDATE phase

* Fix Bug with mongo connection. Used "Try with resources"

* Add test

* Added docker-compose for mongo db. MongoDb db work fixed.

* Provided missing tests

* Comments to start Application with mongo.

* Fix some broken links

* Remove extra space

* Update filename

* Fix some links in localization folders

* Fix link

* Update frontmatters

* Work on patterns index page

* Work on index page

* Fixes according PR comments. Mainly Readme edits.

* fix frontmatter

* add missing png

* Update pattern index.md

* Add index.md for Chinese translation

* update image paths

* update circuit breaker image paths

* Update image paths for localizations

* add generated puml

* Add missing image

* Update img file extensions

* Update the rest of the EN and ZH patterns to conform with the new website

Co-authored-by: Victor Zalevskii <zvictormail@gmail.com>
2022-10-23 16:29:49 +03:00
Ilkka Seppälä 932836f68b Update license plugin (#2020)
* update license plugin

* suppress linelength and emptylineseparator rules

* fix checkstyle error

Co-authored-by: Subhrodip Mohanta <hello@subho.xyz>
2022-09-14 23:22:24 +05:30
Ilkka Seppälä 2674cb9523 Set version for the next development iteration 2021-11-11 21:49:55 +02:00
Ilkka Seppälä 925755fa35 Reach milestone 1.25.0 2021-11-11 21:47:49 +02:00
Harshal 22ddd57146 sonar fix: Update App.java (#1898) 2021-10-31 09:08:49 +02:00
Subhrodip Mohanta 8aac45ab69 maintenance: Update Spacing of XML (#1866)
PR Set 4 of 4
2021-10-19 20:56:44 +03:00
AndriyPyzh eac85678f0 feature: Added Domain Model pattern (#1795)
* domain-model pattern

* fixed optional get before check isPresent

* readme minor changes

* change currency representation with joda money

* changed names of test methods

* fixed code smells

* Update domain-model/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* Update domain-model/README.md

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>

* updated readme and diagrams

Co-authored-by: Ilkka Seppälä <iluwatar@users.noreply.github.com>
2021-07-22 16:58:21 +03:00
Ilkka Seppälä 04bf566dc1 task: Explanations and grammar fixes for all the GoF patterns (#1791)
* Grammatical fixes to command pattern

* Update bridge pattern readme

* Fixes to builder pattern grammar

* Update chain of responsibility

* Improvements to the composite example

* Fixes to headings

* Minor updates to decorator pattern

* Update facade

* Update factory example

* Update factory method

* Update flyweight

* Interpreter explanation

* Update iterator readme

* Add explanation for mediator pattern

* Grammatical fixes to memento

* Grammar fixes for observer

* Update explanation for the prototype pattern

* Proxy pattern grammar fixes

* Update singleton

* Grammar fixes to state pattern

* Grammar fixes for strategy

* Grammar fixes, template method

* Grammar fixes for visitor

* Fix typo
2021-06-24 18:27:20 +05:30
JackieNim f597fc1b07 fix: Fixed pages showing up in wrong language (#1752)
* Fix languages

* Missed change for version number

* Add language field for presentation

* Revert change in README for double buffer

Co-authored-by: Jackie Nim <=>
2021-05-19 19:49:05 +03:00
Ilkka Seppälä be3250bd0d Set version for the next development iteration 2021-04-05 14:57:36 +03:00
Ilkka Seppälä 1222f12b99 Set version number for milestone 1.24.0 2021-04-05 14:56:36 +03:00
va1m 5cf2fe009b 📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code

* Fix merge conflicts and some sonar issues

Co-authored-by: va1m <va1m@email.com>
2021-03-13 14:19:21 +02:00
Subhrodip Mohanta 7891c2b117 update inception year to 2021 (#1653) 2021-02-14 11:57:57 +02:00
Ilkka Seppälä 0010fb55c5 Merge data transfer object examples (#1635)
* #1617 merge dto pattern examples

* #1617 update license headers

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-25 09:05:04 +05:30
ignite1771 18a1a725ee #1469 Add lambda expressions implementation for Strategy Pattern (#1631)
* #1469 Add Strategy Pattern lambda implementation

After Java 8.
Also take advantage of enum

* #1469 Update class diagrams

* #1469 Update README.md

Add lambda programmatic example

* #1469 Remove unused imports

Co-authored-by: Subhrodip Mohanta <subhrodipmohanta@gmail.com>
2021-01-19 12:06:26 +05:30
Ilkka Seppälä e6ddff5f25 Update README.md 2020-09-13 18:15:17 +03:00
Ilkka Seppälä 723afb85ba Set version for next development iteration 2020-08-25 21:21:36 +03:00
Ilkka Seppälä a0e5d061cb Milestone 1.23.0 2020-08-25 21:20:30 +03:00
Toxic Dreamz 31471acb69 Fixed most reported issues by SonarCloud. 2020-08-15 21:47:39 +04:00
Ilkka Seppälä 417f21ed3d Code cleanup (#1461)
* Code cleanup

* Fix flux tests

* Fix checkstyle errors

* Fix compile error
2020-07-30 20:28:47 +03:00
Ilkka Seppälä d2724e8091 #590 add explanation for Strategy 2020-07-19 17:34:58 +03:00
Ilkka Seppälä 4beb53b8b8 Add references to Refactoring to Patterns book 2020-07-07 18:44:00 +03:00
Ilkka Seppälä a3564a8847 Update links 2020-07-06 13:31:07 +03:00
Anurag Agarwal cd2a2e7711 Java 11 migrate all remaining s (#1120)
* Moves saga to Java 11

* Moves semaphore to Java 11

* Moves servant to Java 11

* Moves serverless to Java 11

* Moves service-layer to Java 11

* Moves service-locator to Java 11

* Moves sharding to Java 11

* Moves singleton to Java 11

* Moves spatial-partition to Java 11

* Moves specification to Java 11

* Moves state to Java 11

* Moves step-builder to Java 11

* Moves strategy to Java 11

* Moves subclass-sandbox to Java 11

* Fixes checkstyle issues
2020-01-04 18:36:08 +02:00
Hemant Bothra 310ae50248 Issue 989 final-batch (#1119)
* Adding support for maven assembly plugin to generate executable jar with all dependencies in built

* Merge branch 'master' into issue-989

# Conflicts:
#	abstract-document/pom.xml
#	pom.xml

* Adding maven assemly plugin for projects with name A

* Update in format as per checkstyle, i.e. Spcae in place of tab with size of 2

* batch set - 2 having all project with B and C

* issue-989 d-e-f

* fixing eip pom and adding g-h-i-l-m-n Skipping naked object as it seems it doesn't have main method, will consider this at end

* Adding for O and P projects Skipping Object-Mother as we don't have main method for same.

* Final batch
2019-12-29 14:41:21 +02:00
Ilkka Seppälä 5681684157 https://github.com/iluwatar/java-design-patterns-web/issues/8 Fix typo in tag 2019-12-13 22:22:11 +02:00
Ilkka Seppälä b2b1ba95eb https://github.com/iluwatar/java-design-patterns-web/issues/8 Update pattern categories and tags 2019-12-13 21:09:28 +02:00
Ilkka Seppälä b09b100614 #1113 Link uml-reverse-mapper created class diagrams to readme, where needed 2019-12-07 20:26:59 +02:00
Ilkka Seppälä 0685a505d3 #1113 Add uml-reverse-mapper plugin 2019-12-07 18:03:49 +02:00
Ilkka Seppälä 6941e65cb4 Set version for next development iteration 2019-11-17 14:45:41 +02:00
Ilkka Seppälä 7d845505b5 Java Design Patterns 1.22.0 2019-11-17 14:44:42 +02:00
Leonóra Dér 3b1a28149b decrease number of checkstyle errors in singleton, strategy and visitor patterns #1021 (#1054)
* fix checkstlye errors - visitor pattern

* fix checkstlye errors - strategy pattern

* fix checkstlye errors - singleton pattern
2019-10-31 19:54:13 +02:00
Leon Mak c8a481bb77 Add java 11 support for #987 (o-t) (#1051)
* Use java 11

* Use .of
- Replace Arrays.asList with List.of
- Replace HashSet<>(List.of()) with Set.of

* Formatting
2019-10-29 08:37:40 +02:00
GVSharma af8c5ed0dd local variable type inference changes (#1040)
local variable type inference changes for strategy design pattern
2019-10-26 18:45:54 +03:00
Alexander Ivanov 4904d7eea0 #1021: Fix checkstyle warnings by changing the license header template (#1027)
* Add custom license header style in order to comply with Google's Checkstyle format

* Update license headers to comply with Google's Checkstyle format
2019-10-22 08:15:35 +03:00
Ilkka Seppälä 9ebbc421dd Update license headers 2019-10-12 20:05:54 +03:00
Ilkka Seppälä b874adc296 Set version for next development iteration 2019-09-08 11:01:12 +03:00
Ilkka Seppälä 9bf7a059b8 Java Design Patterns v1.21.0 2019-09-08 10:49:40 +03:00