воскресенье, 24 июля 2011 г.

Testing and bugs removing before merging into trunk

Hi there,

Suddenly, this summer came across its middle and brought me onto the straight way of project completion. And, you know, after midterm date, the time passes much more faster then before this. This week was a proof of that fact. May be, that is because I've had a lot of work, but regardless. What interesting happened with me and my project (or together) this week? In few words, I was working on rigorous testing of project functionality and bugs removing. So, let don't jumping ahead, and tell everything one-by-one.

The first and the most important fix within my project was related to changing the way how we are handling our custom localization tool within velocity's ToolContext. As you should have known, earlier ToolContext has been configuring once per session (or more, depends if user wanted to change his preferred language on first page during wizard running). But the main drawback of this was that fact that we shoul keep a map of tool contexts an clients sessions. This isn't appropriate taking into account that fact that in general, only one user will have an opportunity to run installation progress at the same time and others will be able only to review progress of installation. So, we decided to reject the idea of sessions and tool context with a session scope map and use single tool context with localization tool, that has request scope of sorts therein. Let me explain. In this case, tool context object will be one per application, but on receiving each next request, we'll change the locale property of our custom localization tool, which is contained inside corresponding toolbox object (ToolContext, in turn, contains that toolbox). So, I fixed it as told above and tested it. Notably, that result was succesfull, and performance left in appropriate level too.

The next thing, I changed the technical way how we are persisting user selected language. After code review with my mentor I was inclined to use pure JDBC to accomplish it. That is because we have decided, that using of OpenMRS Context object isn't a good practice in this case, specially, when OpenMRS application is not directly started till the moment, when we are saving user's preferred locale.So, I changed it, used raw Connection and PreparedStatement objects to persist user's selected language.

Also, during the code review, we found out that there are some of GUI messages, which aren't localized yet. So, I immediately started performing of corresponding translation and done this task in an hour.

Next, we decided to use chooselang.vm page as default page of installation wizard. And now, when some critical error occurs during wizard running, the user will be redirected to that page, instead of installmethod.vm template page.

May be, this isall that I'd like to tell you about work on my project this week, because rest things are mostly boring routine.

And as for work with community this week, in general I was working on ticket the main aim of which is to prevent multiple users to run installation wizard at the same time. I made couple of patches for that ticket. They should be applied to trunk and will be included into OpenMRS, which is coming soon. But, perhaps, this is a topic of my next week post.

With best regards, Taras Chorny!

Комментариев нет:

Отправить комментарий