The Source for Java Technology Collaboration


MIFOS Project Home         MIFOS Wiki Home

Technical Orientation

We aim to write code which expresses the design of the system well, in the code itself and to a lesser extent comments, and as a last resort design documents. Therefore, this page is primarily a list of places to look to get started in understanding the design of MIFOS, or a particular part of MIFOS. We recommend a good code browser like Eclipse - features like "open declaration" (F3) or "find references" (control-shift-G) are very helpful in navigating from one part of the code to another.

User interface: struts, JSP, and a number of custom tags. See:

  • src/org/META-INF/struts-config.xml
  • all .jsp files (struts-config.xml maps between URLs and .jsps)
  • *Action and *Form classes (subclasses of the struts classes) (struts-config.xml maps between URLs and action classes)
  • custom tags. In a *Tag class, located in org.mifos.application.*.struts.tags. These subclass one of the javax.servlet.jsp.* classes.

Business logic and database access (the latter via Hibernate):

  • *BusinessService (subclasses of BusinessService). Often just a useless layer. Sometimes has some logic.
  • *BO (subclasses of BusinessObject). These correspond to records in the database, and have hibernate mappings (LoanBO.java and LoanBO.hbm.xml for example).
  • Some *Entity classes. These are just like business objects but the business objects are especially for user visible classes representing key concepts (loan, group, savings account, etc) and entities are for datums which are subordinate to one of the key concepts (for example, account entries).
  • *Persistence (subclasses of Persistence). Here's where we query the database (wrappers around hibernate calls) and the like.

Obsolete (remnants of the so-called M1 code)

  • Some *Entity classes (especially those which are subclasses of EntityDataMaster). For most purposes should be replaced by enums (for example, InterestType in place of InterestTypesEntity)
  • PersistenceService and subclasses (these just delegate to Persistence subclasses)

Not sure

  • *View classes (subclasses of View)

Tests

Most tests written in junit. The ones in FastTests are generally written in a better style (that is, just test one class, and avoid lots of dependencies on far-off parts of the code, databases, etc). See tests which refer to TestDatabase and DatabaseSetup for some examples of how the tests deal with the database.

We also want a few web tests (scripts which talk to a running mifos system). Web tests are a good sanity check that the application is working, and provide an end to end test (testing all parts of the application). However, it is hard to test every feature of mifos this way (web tests, compared with junit tests, tend to be slow to run and hard to write). We wrote some web tests in 2006 with Watir (see the test/testscripts directory). There was also at least one of them ported to Selenium (with Selenium remote control and Ruby) - see mailing list archives from roughly September 2006. Selenium and Watir are at openqa.org

See also

Topic TechnicalOrientation . { Edit | Ref-By | Printable | Diffs r22 < r21 < r20 < r19 < r18 | More }
 XML java.net RSS

Revision r22 - 03 Aug 2007 - 17:32:10 - Main.vanmh
Parents: WebHome > MIFOS