I started the second week of GSOCoding with the idea that I must achieve my project as soon as possible. So I started to design a *settings* page for the Sync project.By this time , the second semester have started so I need more time for revising assignments while implementing my GSoC project.There was also this EURO and some local volleyball memorial games,but I decided to think more on my GSoC project than others.I remember there is also an East-Africa Google gadget competition that needs also some posting.So Busy!
I’ve been talking to my mentor who advised to be more open (favor for public discussion) in an open source project.I also faced many internet disconnections so I was afraid of breaking my communication scheme with the mentor.with the help of my mentor I set up two openmrs installation running on the same Tomcat (@my laptoph http://localhost:8080). That simplifies Synchronization testing when I am offline ,so i don’t have to handle two computers as early.To that end,here are some changes I’ve made on the deployment files to create a new web-app : openmrs_child
-Create a new Database with MySQL scripts: drop database if exists openmrs_child;
create database openmrs_child default charset utf8;
use openmrs_child;drop user test_child;
create user test_child identified by ‘test_child’;
grant all on openmrs_child.* to test_child; After run 1.3.0-schema-with-core-and-demo-data.sqlopenmrs_1.1.0-add-synchronization.sql and openmrs_1.1.0-add-guids.sql scripts and its done.
-Change properties at the build.properties file so that:webapp.name=openmrs_child
webapp.display.name=OpenMRS_child.
-Create system env. variable called: OPENMRS_CHILD_BUILD_PROPERTIES_FILE and OPENMRS_CHILD_RUNTIME_PROPERTIES_FILE that links to the %APPDATA%\OpenMRS\OpenMRS_child-build.properties file and %APPDATA%\OpenMRS\OpenMRS_child-runtime.properties respectively.
-Override properties there and in the ant build file (build.xml).Just in 5 minutes of setup & installation I got my two installation running . After doing some synchronization configuration I got my two DB synchronizing bidirectionally. I was a half done.
Later I implemented almost in parallel two testing pages for synchronization,one for settings and one for control,the main ideas was from the lastly build Spring MVC controllers for Sync branch. I think it’s even easier to build controllers for a Service Oriented API . For Example when I want to get a list of Sync records I simply call List<SyncRecord> recordList = Context.getSynchronizationService().getSyncRecords();Thanks to the API developers ! I made a change on how to turn on/off Synchronization via the *settings* page without interacting *manually* with the runtime properties file . I can also deal with the DWRSynchronizationService to synchronize via Ajax .For the next steps I have to implement the ability of selecting which items to synchronize (default is now to *select all*) and also be able to edit Sync Items, i.e. refreshing failed ones;then start sync reporting , i.e. analytics.
An other thing is that I upgraded my Netbeans IDE 6.1 with Eclipse Project Importer Module, so most of times I am coding OpenMRS under Netbeans, I mostly like its JavaScript editing capabilities, but Eclipse still great for its *automatic* imports .
Ah, installation does get easier the more times you do it!
Sounds like Maros is an excellent mentor…or is it that you’re a star student? Would love to see some of your work. Are you just going to be committing directly to the sync branch?