Skip to content

Instantly share code, notes, and snippets.

@ryantheleach
Last active February 24, 2021 19:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryantheleach/f0e51d2e5c33ef5fd0f84e04e4543267 to your computer and use it in GitHub Desktop.
Save ryantheleach/f0e51d2e5c33ef5fd0f84e04e4543267 to your computer and use it in GitHub Desktop.
Design Patterns used in Sponge
Creational Patterns:
AbstractFactory ->
Builder -> Used extensively.
FactoryMethod ->
Prototype -> (Archetype, kinda)
Singleton -> (Main plugin instance)
*Multiton -> CatalogTypes
Structural patterns
Adapter -> Used in the implementation
Bridge ->
Composite ->
Decorator ->
Facade -> 'Sponge' service locator
Flyweight ->
Proxy ->
Behavioural Patterns
Chain of Responsibility -> PhaseTracker
Command ->
Interpreter -> Bytecode itself
Iterator ->
Mediator ->
Memento -> CommandElement State Object
Observer ->
State -> PhaseState w/ PhaseTracker
Strategy -> a few places, ctrl+f strategy in SpongeAPI
Template Method ->
Visitor -> Blockworker
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment