Wiki Spaces

Documentation
Projects
Resources

Get Help from Others

Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack

Documentation

Page tree

Versions Compared

Key

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

...

  • Lessen the hibernate 'magic'.  Never return a hibernate magical object - Ben Wolfe
  • Get rid of the need for sessions (opensession/closesession).  This goes with previous point about hibernate magical objects. - Ben Wolfe
  • Get rid of the static Context.  Inject everything like standard spring apps in order to take advantage of other tools, mocks in unit tests, etc - Ben Wolfe
  • Do not return retired metadata by default – ~bmamlin
    • In API 1.x, metadata lists – e.g., getConceptAnswers() – include retired values by default, which can encourage use of values that are no longer valid.
  • More use of final keyword for parameters – ~bmamlin
  • Attention to multithreading support – ~bmamlin
  • Use Long instead of Integer for internal identifiers -- ~bmamlin
    • Part of our goal for supporting 2+ million patients in OpenMRS will require supporting tables that contain over 2 billion rows
  • Follow lessons given byBloch's Google Tech Talk (slides) – ~bmamlin 
    • Don't let implementation details "leak" into API
    • Self-Explanatory, Consistency, Symmetry
    • Strong javadocs
    • Avoid long parameter lists (break up method or create helper class to hold parameters)
    • Avoid return values that demand exception processing (return zero-length array or empty value, not null)
    • Favor unchecked exceptions