Vendure Engineering Principles #2628
Replies: 3 comments 8 replies
-
Proposal: Prefer Vendure Services over the use of
|
Beta Was this translation helpful? Give feedback.
-
Plugins as the basic unit of extensionYou should aim to structure your application as a set of plugins. Each plugin should be concerned with a specific feature set or unit of functionality. For instance, each of the following would be implemented as a separate plugin:
BenefitsAlthough it is possible to implement a lot of customization by simply adding stuff to the main VendureConfig, encapsulating them in plugins has the following benefits:
The BasePlugin patternSome configuration & extension doesn't really fall neatly into a single "feature". For instance
These types of "global" config could justifiably live at the top-level of the app and go directly in the VendureConfig. However, another approach is to create a |
Beta Was this translation helpful? Give feedback.
-
Use history entriesGive administrators more insight in whats happening by logging events as order or customer history entries. Some examples that might be useful for your administrators:
This can save you, the developer, quite some support questions. Admins can look up this information themselves, and you don't have to check server logs. |
Beta Was this translation helpful? Give feedback.
-
We need your input!
Since Vendure focuses on developer happiness, we'd like to introduce an 'Engineering Principles' section in the docs. This should help developers make design choices when implementing custom functionality in Vendure.
Checkout GitLab's example, or Zalando's Engineering Principles.
What are your best practices?
What best practices do you use when developing custom functionality in Vendure?**
const => {}
instead offunction
, that's fine, but shouldn't really be in the Vendure Engineering PrinciplesThis is just the initial setup, it will be a dynamic document, where contributors can create PR's to discus new best practices before they can be added.
(thumbs up on the comment if you like a proposal)
Beta Was this translation helpful? Give feedback.
All reactions