Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion src/pages/quick-reference/pages/style-guide.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,21 @@ private String notificationPreference;
private String notificationPreference;
----

=== Domain Entity Definitions

*Do* write simple encapsulated Java objects as view/core domain entity definitions.

*Avoid* writing business logic inside view/core domains.

*Avoid* writing custom getter/setter methods with logic in view/core domains.

*Why?* View and core domains are mean to be POJO's (plain old Java objects) having simple getter/setter methods with the purpose of passing clean and concise data to/from the system. Adding business logic within POJO's can often increase code complexity and cause unexpected/hard-to-find behavior in other layers of an application.

== Testing

=== Response Parsing

Avoid searching for outputs in the server response (`MultiOutput`) by using an index.
*Avoid* searching for outputs in the server response (`MultiOutput`) by using an index.

*Why?* The order of outputs is not guaranteed to always stay the same. Hard-coding index values may lead to brittle test cases.

Expand Down