Page tree

Versions Compared

Key

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

...

  • Make the objects more DTO-like (less hibernate magic) - ~bwolfe
  • Remove all calls to the database in pojos (no calls to Context) - ~bwolfe
  • Remove ability to traverse entire graph (creator object attribute becomes creatorId integer attribute) - ~bwolfe
  • Never use Sets as the Collection implementation as an attribute on an object (use List) - ~bwolfe
  • Most properties (especially lists) immutable by default – ~bmamlin 
  • Avoid empty constructors & don't allow invalid objects to be created: if "stubs" needed, make them explicit (i.e., a separate object) – ~bmamlin 
  • Use uuids for .equals and .hashcode - ~bwolfe (see
    Jira
    TRUNK-1993
    TRUNK-1993
    serverOpenMRS JIRA
    )
  • Move audit information out of Pojos – ~bmamlin
    • Change voided to be deleted
  • Change retired to be disabled (?  Not sure on the name of this one)
    • -1 from ~bmamlin, since "disabled" suggests a more temporary state than "retired" (enabling sounds good; unretiring sounds bad... which is what we want)
  • Inside every pojo, we need to have constants for the property of pojo. This way we can refer this property in the hibernate criteria using this constants instead of using String. – ~nyoman
    • example: PersonName will have public static final String GIVEN_NAME = "givenName", this way we can access them with PersonName.GIVEN_NAME in the hibernate criteria.
  • Pojos should reflect the real world instead of the data model – e.g., an Obs should be able to have multiple values or be a group of other Obs. -- ~bmamlin

Service Change Wishlist

Similar to the previous list, here is a list of things that people would like to change about our current services (PersonService, PatientService, etc)

...