← Back to team overview

dhis2-devs team mailing list archive

Re: Coding layout - Community-Based Health Information System (CBHIS)

 

Hi Abyot

Good to see you back :-)

2009/5/25 Abyot Gizaw <abyota@xxxxxxxxx>:
> Hi All,
>
> In a sort of lose coupling of DHIS2 and CBHIS, I am planning the following
> coding layout for the CBHIS.
>
> dhis-cbhis-api
> dhis-cbhis-service
> dhis2-cbhis-web-(datarecording/report/administration/......)

A few thoughts and opinions.  Feel free to disagree.

If you follow the approach above then try to implement some sort of
relationship between modules and packages.  I think a module can
implement a number of packages, but packages should not be split
between modules.  We have a lot of that at present which is confusing.
 All of a package should be defined in one module.

Be clear what goes in the api and what goes in the service layer -
current rule of thumb seems to be that the api should be free-standing
(outside of "technology-choice" implementation lbraries).  A
consequence being that the only dependency you would expect to see in
the api pom.xml would be probably junit (lets provide unit tests for
the api).  If its about spring, hibernate, jdbc, jsf or what have you
it belongs in a different package in the service module.

Use the api to enforce business rules which are not enforced via the
database.  We don't do enough of that at present.  The API sometimes
assumes that its users are always benign.  Don't do this.  Expect the
worst and code for it.  Part of the api should be a definition of
exceptions.

Is there a really good reason to have dhis-cbhis-api or should cbhis
be a package within dhis-api?  I would lean towards having one dhis2
API.

Regards
Bob

> dhis-support-xxxxx and dhis-i18n-xxxx and others will be shared from the
> DHIS2 base framework.
>
>
> Any comments or suggestions would be appreciated.
>
> Thank you
> Abyot.
>
> _______________________________________________
> Mailing list: https://launchpad.net/~dhis2-devs
> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~dhis2-devs
> More help   : https://help.launchpad.net/ListHelp
>
>



Follow ups

References