|
According to the GSoC timeline, May 26th is the start of the coding phase for students. Checking my email, I could see many students had started coding before this date. I wonder why people decides to hurry up: I hope the reason not to be the omission of a strict design stage. Those days when I just sat down and wrote code are past tense; design phase is necessary even though many people do not enjoy it, usually because it implies to write long and tedious documents to share what you have in mind and you could write in code inmediately. Local statistical studies indicate that approx. 85% of failed software projects in my country are consequence of a non-appropiate requirements and design phase. It seems like the coding phase is not the problem as I know a lot of talented people whose problem is that they hate to write documentation (what includes comments in code). Having in mind that, I decided to invest a significant amount of time and effort on this phase.
Database schema was the first step. I have to say that it was not difficult but really tedious as I got 27 tables. I used phpmyadmin to create the database and generated the diagram using the Designer functionality. Unfortunately the export process was buggy and I had to use the "print screen" button. Not so efficient :-). The gui prototype I elaborated previous week, helped a lot as it provided me a physical representation of what will be implemented. The entities: projects, theses, staff members and publications; all of them associated to a research area item. staff members have n:n relationships with projects, theses and publications. I also considered external authors which do not have a row in the staff members table.
The next step was configuration information. Again, the prototype was the key. This information will be in an array (string keys) defined in file jresearch_config.php. However, certain configuration information will reside in the database, e.g: supported citing styles (APA, MLA, IEEE, etc.). At first I had considered citing styles would be implemented in a single class whose name will also be held in the database. However, at the end of a complete analysis where some colleagues and Neri took part, I have decided to implement the logic of citing styles in several classes, one per citing style and publication type. This provides a great flexibility when extending the functionality of the component by adding new publications types or new citing styles though it increments the number of classes dramatically. The publications types were taken from http://en.wikipedia.org/wiki/BibTeX#Entry_Types and each one is mapped to a different table and class. Of course, inheritance concepts have been applied (What would we do without Object Oriented Paradigm?) both in the database schema and the classes design. Database also includes the information related to the customed citing style, the user can define in the admin interface. Additionally, database schema will suffer a couple of changes due to the decisions made today.
The interface for citing styles is almost ready in my mind, however I could not include it in my first repo commit (http://joomlacode.org/gf/project/gsoc2008/scmsvn/?action=browse&path=%2FJResearch%2F). I will be working on it, but I believe it will have two or three methods as publications have two principal ways of being presented: when cited and when included in the bibliography section at the end of a document.
MVC and Joomla 1.5 took me a complete day of work. I created a mirror of http://dev.joomla.org/component/option,com_jd-wiki/Itemid,32/ in my computer so I could read it at home. Joomla's MVC application is really impressive. The file and code structure for components is remarkably better than the one implemented in Joomla 1.0.x. The tutorials are really clear so it was not difficult to have a skeleton for the project. Based on the functionalities presented in my proposal and the pages of my prototype I could easily identify the controllers, views and models for the frontend interface. Backend MVC design is pending too as I am analyzing if I can reuse code. Neri's advice has been really useful in this stage.
In relation to the supported bibliographical references formats, Neri and I agreed that the component will use Bibutils (http://www.scripps.edu/~cdputnam/software/bibutils/) as I pretend to take advantage of MODS support. In my previous blogs I exposed the advantages of MODS as an intermediate format when making conversions between different formats. The idea is just to implement native support for MODS and use Bibutils for conversions to Bibtex and RIS.
Finally, I will summarize my pending activities:
- Design the part of citation styles, as blog comments indicates it is a key feature.
- Continue with MVC design for backend (frontend is not finished in fact)
- Read about an extra couple of citing styles (Until now, I have read about APA, MLA and Chicago Manual of Style)
- Refresh my knowledge in DHTML
- Once ready the detailed data design, it is time to start with the TinyMCE plugin.
Remember that feedback is always welcome.
|
Monday, 02 June 2008
Sunday, 01 June 2008