Platform 2.0 FAQ's/Guide for Module Developers


Platform 2.0 is coming out in November and it introduces Java 8 and Hibernate 4 in OpenMRS core. We want to create a FAQ and/or Guide for Module Developers to address any questions they may have regarding developing modules against Platform 2.0 or migrating them to the latest OpenMRS Platform :slight_smile:

I kindly request all Core Developers and Module Developers to brainstorm and reply to this thread with any questions you think would be relevant for this guide. We will make sure to include answers to these questions when releasing Platform 2.0.

P.S. To keep things clean and organized, let’s just post the questions here. To discuss them in detail, we could “Reply as a Linked Topic” and discuss it on a new talk thread



A question put up by @mogoodrich : :slight_smile:

Original Post :

Well, I haven’t given much thought to Platform 2.0 yet but I have noticed one problem in module development that probably applies to Platform 2.0 also. Namely, one has to take some compatibilitys issues into consideration when developing a module for multiple OpenMRS versions. Trying to figure out these things from the sources is tedious and even though there is information available on the subject in the wiki, this information is scattered on multiple pages.

Now, what if we had a single table that listed all the major compatibility considerations a module developer needs to take into account with each OpenMRS version? Some ideas of things to list:

  • setting up Hibernate with mapping files or annotations
  • the Hibernate 4 application context issue
  • application context in general
  • database updates with sqldiff or liquibase
  • setting up integration tests
  • what libraries are available (maybe this one does not make sense as there are so many libraries)
  • Java version

An example that is not necessarily entirely accurate:

  • version 1.6: implement database updates with sqldiff
  • version 1.7: implement database updates preferrably with liquibase but sqldiff works also
  • version 1.8: implement database updates with liquibase

A version list will be a great addition to this documentation, which will enable setting up dependencies in the pom easier. The version list should include:

  • typical packages eg, Hibernate, Spring, Junit, etc
  • reference application modules in case the new module has to depend on any of them

Thanks @maany, this is incredibly important for the community. While I think documenting the process and what issues may arise for module developers preparing for Platform 2.0 is critical, we might benefit from doing this once “informed” by doing some modules ourselves – i.e., plan on getting Platform 2.0 Alpha out ASAP, pick a few key modules to refactor to support Platform 2.0, and then use that experience to inform what we tell module developers.

1 Like