@@ -53,6 +53,33 @@ Story:
5353
5454Install and try out the module with simple examples to most common development questions.
5555
56+ We would like to encourage following ideas and principles in module development:
57+
58+ * Separate contexts into their own folders (e.g. Greeting, Tracker, ProductVote)
59+ * Basics of DDD in module development
60+ * Controllers are our use cases and entry points
61+ * Services contain business logic
62+ * Infrastructure contains shop framework/database related code
63+ * Layered architecture within those contexts (e.g. Infrastructure, Service, Controller, Subscriber)
64+ * Changing the implementation should not affect other layers
65+ * Interfaces are the contracts between layers
66+ * Data Transfer Objects (DTOs) used for data exchange between layers
67+ * Hexagonal architecture ideas
68+ * Ports(interfaces here) and adapters(implementations here)
69+ * Adapters depend on ports, not the other way round
70+ * Application core is independent of external systems (as much as possible in the current context)
71+ * Dependency injection
72+ * Allows awesome testability and flexibility
73+ * Avoids usage of global state (Registry, oxNew, static calls)
74+ * SOLID principles
75+ * SRP and DIP in focus
76+ * Clean architecture ideas
77+ * Dependencies point inwards
78+ * Business logic is independent of frameworks, databases, UIs
79+ * Avoid the extension of shop core classes as much as possible
80+ * Prefer event listeners, DI service decoration/replacement
81+ * If extension is necessary, follow minimal invasion principle
82+
5683## Examples
5784
5885The repository contains examples of following cases and more:
0 commit comments