Evaluating LIMS Code Dumps

(Ref Id: 1305580854)

First, prepare yourself for quite a bit of reverse engineering. If you are like me you might get an inclination to build/enhance some documentation or a wiki to keep track of the nuts and bolts of the system. I'm going to help you avoid doing this in this article. We'll use the Open-LIMS 0.3.9.6-2 alpha code dump in this article to exemplify this process.

You will need some kind of system to capture facts about the architecture and details about the inner-workings of the system. If the system was written using object-oriented techniques then you are in luck and can utilize Class-Responsibility-Collaboration (CRC) cards. CRCs are mainly used during new system design and development but they can also be used to help understand a system that is in transition, like one that is being built. You can use CRCs to break down a system's architecture in order to more fully understand it. When using this process you want to start somewhere integral to the system and work outwards to deduce which classes have the responsibility for making the critical functionality work (for instance, I started with the Sample class). In the process you will identify the classes and interfaces the core classes depend upon in order to operate.

If you are a developer with experience producing automated class documentation you might be thinking that this is the right place to start. I disagree. CRCs describe responsibility, not necessarily method names. The difference is subtle but important. A responsibility is a plain statement about something the class is expected to do. There is no need to create a 1:1 relationship between implementation and the responsibility on the card. For example, on my Sample_Access CRC card one of my points says 'get/set sample properties'. This basically covers anything that updates one of the database fields on the sample table (core_samples) and is short-hand for a whole set of get and set methods.

An obvious question you might find yourself asking is how will you know that all this effort is bearing fruit? When you are confident producing sequence (or other types of) diagrams using the classes you have described in CRCs without missing anything you will have reached a milestone. Your aim should be to start with the user's request to the controller, back to the model (the database and business logic layer) and then back again to the user output in your diagram.

In doing this be careful about hidden dependencies that the developers may have elected to take advantage of. For instance, in PHP (the native language of the Open-LIMS project) you can simply use the global keyword to grab an instance of a class that was defined somewhere very far away from the current code. Luckily the Open-LIMS developers are using this technique sparingly, mainly to just pass around the database handle, so it is not much of a problem.

What this article describes is commonly known as a bottom-up analysis of a software system. This technique is typically necessary before undertaking a lengthy or complex LIMS customization effort. You should understand the current classes and capabilities of the system, as built, in order to reduce your customization effort. For example, the Open-LIMS system already includes some kind of templating system for building HTML. Knowing this and becoming familiar with the functionality (and limitations) of that sub-system could literally save you weeks of development and testing. From a security perspective, it is necessary to understand how the current system implements security so that you do not violate security requirements when building in your customization. Depending on your laboratory environment you may find that wholesale changes to the out-of-the-box LIMS infrastructure need to be made to match your requirements for security, electronic signatures, and modules. This process will be much easier once you have the architecture of the system fully mapped out.

Go Back

Citation: Evaluating LIMS Code Dumps. (2011). Retrieved Sun Nov 19 12:36:51 2017, from http://www.limsexpert.com/cgi-bin/bixchange/bixchange.cgi?pom=limsexpert3;iid=readMore;go=1305580854