Wiki Spaces
Documentation
Projects
Resources
Get Help from Others
Q&A: Ask OpenMRS
Discussion: OpenMRS Talk
Real-Time: IRC Chat | Slack
The outcome of this project can be viewed/used here: Using the Module Maven Archetype
Primary mentor |
|
Backup mentor |
|
Assigned to |
OpenMRS is built on an extensible architecture. Anyone can create a Modules to add new functionality. A module is able to add new pages, add database tables, modify data, etc. The problem is that the startup time for developers is sometimes prohibitive. See the Creating Your First Module wiki page for the current process.
We recently switched from using ant to build projects to maven. With maven you can create "wizards" or what they call archetypes. The archetype should ask the developer a few simple questions (eg module name, module id, etc) then create the module folder and file project hierarchy with all the right names.
By the time GSOC starts, there will probably be a very basic maven archetype written. See the TRUNK-1733 ticket for more on that. (TODO: link to wiki page for basic archetype when it is completed)
A great example to look at as far as short startup time is the Atlassian SDK for some of their projects. Its as easy as downloading a zip file from them and running one maven command. This command runs a wizard to walk you through creating the the atlassian plugin + running the atlassian project with that plugin already installed and running. Note that this SDK is an end goal for all of OpenMRS, not for this archetype project. This archetype will potentially be one piece of the larger SDK goal.
The purpose of this is to speed up developer startup time when creating modules. Creating a module is currently a laborious process that includes a lot of file renaming and copy/pasting from other module templates. A maven wizard (archetype) that walked a user through creating the different types of modules to create and naming things correctly would help to at least speed up the initial creation time.
The archetype should not be IDE dependent. Use the maven command line tools / execution of the wizard/archetype to do the different types of functions.
There is no need for extra OS dependent scripts. The wiki page about this archetype should tell the user the different options/flags/mavenmodules for how to do the different options.
A utopia would be that someone could simply run "mvn module:module" (or some better maven goal and target name) and the archetype wizard asks them what to name the module, their username, etc, etc, if they want a service, if they want an admin link, etc. The module id/user name/etc data goes into the config.xml file. See the current basic archetype for an example of that. The output is a module filestructure with all those things in it.
A bonus would be able to run them separately so that someone could run that on an already-built module to add in a service, eg.
The archetype should allow for multiple
May 23 - May 30 |
Creation of archetype, which creates a basic module with complete bare bone structure. |
May 31 - June 3 |
Improvising the archetype on suggestions. |
June 4 - June 10 |
Implementation of Service and ServiceImpl in archetype. |
June 11 - June 17 |
Implementation of Dao/hibernateDao in archetype. |
June 18 - June 24 |
Implementation of admin page link in archetype. |
June 25 - July 1st |
Documentation |
July 2th - July 10th |
Polishing the code for Midterm evaluations. |
July 11 - July 16th |
Implementation of Annotation driven mvc pages. |
July 14 |
Presentation on the things completed and yet to be completed. |
July 17th - July 24th |
Code testing |
July 25th - August 15th |
Concentrating on extra credits. |
August 15 - August 22th |
Scrub code, write tests, improve documentation and submit code to mentor. |
August 25 |
Final presentation of project |
1 Comment
Burke Mamlin
Atlassian's SDK provides a very nice way for plugin (e.g., module) developers to build and test their work in different version of the application simply by issuing a maven run command with a version reference. This would be an awesome target for extra credit on this project.