OpenMRS Architecture


Contents

Current Architecture

This page describes the current architecture of the OpenMRS application and API. Here is a discussion of OpenMRS Architecture Proposals.

OpenMRS Tier Architecture (incorrect)

Here is the original (incorrect) OpenMRS tier diagram
Here is the original (incorrect) OpenMRS tier diagram

OpenMRS Tier Architecture

The current OpenMRS architecture (from bottom up) is as follows:

Database model 
a lot of work has been invested in this model to create a flexible
DAO Implementations 
all Hibernate code exists at this level
DAO Interfaces 
provides basic [1] and all other needs to read/write data
Service Layer Implementations and Utility classes 
all core business logic, including authentication/authorization are performed at this layer
Service Layer Interfaces and Domain objects 
provides the OpenMRS API
Web Layer 
code is separate from the API — i.e., within a "web" folder. Several tools/technologies are used within this layer: DWR, JSP, JSTL Tags, Spring MVC, Dojo (planning on move to JQuery), etc.

Related notes

  • Modules (much like Eclipse plugins) have access to all layers of the system.
  • Ideally, 99% of all access to the database should occur via the API layer, since the API handles authentication checks, provides the common business logic, and serves as a central location for hooks/triggers that need to alter or track API behavior.

Next Steps

  1. Correct above "incorrect" diagram.
    1. Another Tier Diagram Sample
  2. Generate Application Layers Diagram. — Ben has already made an application layers diagram
    1. Application Layers Sample
  3. Generate Commentary
    1. General introduction to OpenMRS Architecture
    2. Commentary on Tiers
    3. Commentary on Layers

OpenMRS Architecture Navigation