It's been a long time since I've blogged about an OpenMRS dev hint, so prepare to be hit by the firehose. If you're not a dev, you might want to skip this one. :-)
Showing posts with label dev. Show all posts
Showing posts with label dev. Show all posts
Wednesday, March 13, 2013
Friday, November 23, 2012
OpenMRS Style Tip: standardizing our DAOs, and avoiding data-level services
We've developed a new best-practice way of organizing services and DAOs in OpenMRS, and I wanted to share that here.
1. We should have one DAO class for every domain object, and the boilerplate code should be encapsulated in an abstract base class
2. A service can contain multiple DAOs, for related domain functionality:
3. The service methods should expose higher-level functionality, rather than just CRUD
Below are (long) code samples:
Thursday, September 13, 2012
CI!
One software development best-practice is that the first thing you do on a project is set up Continuous Integration or CI.
The idea is that every time a developer commits any code, all components of the project are built and "integrated" together, tests are run, and any failures are reported. As a result, if I make a change to one part of the project that happens to break a different part, I am notified within minutes, so I can fix it ASAP, before it inconveniences the other developers.
So, on this project we were slightly behind in getting this set up, but we're moving on it now:
Expect to see an automatically-updated demo server soon. It will initially be very boring, since the point is to do CI set up before you have any actual functionality. :-)
PS- As a dev-ops note, when you configure Bamboo to use maven on Ubuntu 12.04, you should set the path to "/usr/share/maven", and not to "/usr", because while both of these have the maven executable at the relative path of "bin/mvn", only the first is the proper maven home directory.
The idea is that every time a developer commits any code, all components of the project are built and "integrated" together, tests are run, and any failures are reported. As a result, if I make a change to one part of the project that happens to break a different part, I am notified within minutes, so I can fix it ASAP, before it inconveniences the other developers.
So, on this project we were slightly behind in getting this set up, but we're moving on it now:
Expect to see an automatically-updated demo server soon. It will initially be very boring, since the point is to do CI set up before you have any actual functionality. :-)
PS- As a dev-ops note, when you configure Bamboo to use maven on Ubuntu 12.04, you should set the path to "/usr/share/maven", and not to "/usr", because while both of these have the maven executable at the relative path of "bin/mvn", only the first is the proper maven home directory.
Tuesday, September 11, 2012
Distribution vs Single Installation
A random developer note:
While dicussing CI today, I noticed a key difference between the work I did on the Kenya EMR project, and what we're doing for Mirebalais: Kenya EMR was really about being an OpenMRS distribution, whereas Mirebalais is a single installation.
In Kenya EMR I did a bunch of work around having a maven target that fetched all module dependencies to produce a single zip file that could be distributed to a very large number of servers.
In Mirebalais the point is to use a CI/CD approach to maintain a small number of demo and production servers directly, without the need for a distributable artifact.
Nothing earth-shatteering, just this hadn't occurred to me before.
While dicussing CI today, I noticed a key difference between the work I did on the Kenya EMR project, and what we're doing for Mirebalais: Kenya EMR was really about being an OpenMRS distribution, whereas Mirebalais is a single installation.
In Kenya EMR I did a bunch of work around having a maven target that fetched all module dependencies to produce a single zip file that could be distributed to a very large number of servers.
In Mirebalais the point is to use a CI/CD approach to maintain a small number of demo and production servers directly, without the need for a distributable artifact.
Nothing earth-shatteering, just this hadn't occurred to me before.
Tuesday, September 4, 2012
Dev links
A few links for devs:
- Dev Environment Setup, and Processes, including which modules to fork and which to clone
- Mirebalais Module Architecture, describes how we envision modules fitting together.
Subscribe to:
Posts (Atom)
