You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Besides the useful and always regeneratable DTOs, I also saw sometimes the need for some
simple standalone objects that are also customizable on some of the properties and behavior.
Both for plugins or project level.
So what if we could
bin/cake value_object generate [fields]
Outputs standalone VO classes that don't require the plugin anymore.
Similar to bake a migration, one would define fields as
field:type field_other:type_other|null
on that CLI call
|null indicates optional field.
Alternatively, we could also allow/keep a vo.xml file in config, or allow this as input param to easily regenerate if the need arises.
a lot of from/to transformation (inflections) the DTOs can offer (or bloat each object)
BUT on the other side
Immutable first could mean you need to construct it fully with all required fields and we don't need the setters here anymore.
Since it isn't a DTO, but VO, this should be fine.
If we include this there should be the option to include this as require-dev dependency on other plugins, so they can easily generate those for plugins as well, using e.g.
Besides the useful and always regeneratable DTOs, I also saw sometimes the need for some
simple standalone objects that are also customizable on some of the properties and behavior.
Both for plugins or project level.
So what if we could
Similar to bake a migration, one would define fields as
on that CLI call
|null
indicates optional field.Alternatively, we could also allow/keep a
vo.xml
file in config, or allow this as input param to easily regenerate if the need arises.A result could be:
It could NOT have
BUT on the other side
If we include this there should be the option to include this as require-dev dependency on other plugins, so they can easily generate those for plugins as well, using e.g.
or alike.
// @asaliev would do you think?
The text was updated successfully, but these errors were encountered: