← Graph

Keep business classes free of framework dependencies

takeaway 2 connections

Carried over from Krzywda's Java/POJO background: business classes should not import or include framework/library code. This applies even to Arkency's own aggregate_root gem — if you can implement the business logic as plain Ruby (e.g. one class per state), prefer that over depending on a library, however small.

type
recommendation
takeaway Keep business classes free of framework dependencies
about
Applies the POJO principle to Ruby business objects.
takeaway Keep business classes free of framework dependencies
from_talk
Recurring principle driving the progression of implementations.

Provenance