Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Eclipse setup

Please see Eclipse setup page and attached formatter settings (Magnolia.epf).

Intellij setup

Please see Intellij IDEA page and attached formatter settings (Magnolia-IntelliJ-CodeStyle.xml).

Lombok

We use Lombok sparingly in our own implementation details; we try to avoid abusing it for publicly visible code (configured classes).

  • @EqualsAndHashCode are mostly fine
  • @Getter@Setter should be avoided in classes which are not plain stupid POJOs
  • @SneakyThrows should be avoided in best effort

YAML & Magnolia definitions

YAML is a highly-prominent part of Magnolia configuration; we recommend the following throughout YAML definitions:

  • Put the class property (or fieldType) before any other specific property
    • except for names within sequences
  • Indent sequence values (so they don't appear to be on same level as their parent)
Code Block
languageyml
class: info.magnolia.foo.MySmartDefinition
components:
  - name: First component
    class: info.magnolia.foo.MySmartComponent
    description: Some short description of the first component
  - name: Second ...