-
Notifications
You must be signed in to change notification settings - Fork 60
Resources
David Sanders edited this page Jul 15, 2014
·
23 revisions
- Servers that run Java web applications (WARs) are called Servlet Containers
- We use either:
- Spring Framework utilising MVC, dependency injection, etc
- Controllers & actions are setup with annotations rather than the older way of inheriting from Controllers
- Hibernate
- Entities for our module are annotated with JPA annotations while the core code defines the Hibernate configuration file.
- OpenMRS module persistence is setup with 3 layers: Services, Data Access Objects (DAOs) and Entities. When modules are loaded into the core OpenMRS application, the service is added to the core context from which other modules are able to access.
- Tests are setup with JUnit
- Mocking can be achieved with:
- Functional tests use Selenium WebDriver
- AngularJS is used to manage all user interface screens communicating with the server via a RESTful service. Angular provides MVC, templates, data binding, REST abstraction, dependency injection, mocking and more.
- RequireJS is used to manage the dependencies between JavaScript files
- Jasmine BDD framework is used to test client side code and is integrated into the build via the jasmine-maven-plugin
- jQuery-UI for some UI widgets, like dialog boxes
- Run Jasmine unit tests by opening SpecRunner.html
- Gradle is used to manage 3rd party Java dependencies, build & package the module
- Continuous deployment managed by:
- Testing is done in 3 stages:
- Firstly the unit & integration test suites are run on Go (ProposalModule build)
- Functional tests are then run (ProposalModule-CI build)
- After successful completion of the testing a QA may deploy the new changes to QA server (by running ProposalModule-QA build) to validate user stories against the specified acceptance criteria.
- Java development is best done with an IDE:
- Eclipse; or
- The free version of IntelliJ IDEA
- Both IDEs come with a wide range of plugins (such as Maven or Git integration) help facilitate the development process