Tuesday, July 28, 2009

Critical path gets revamped

Critical path, one of the most essential features in a project planning software, was announced a few years ago as a new feature of GanttProject. However, it has never worked properly. Here is how GanttProject 2.0.8 calculates the critical path in HouseBuildingSample project (critical tasks are in red):

The critical path is obviously wrong. Construction phase supertask is a chain of the critical path but its subtask are not included. Foundation building is a successor of Architectural design subtasks with no float, so they also should've been included in the critical path.
Working on new iText based PDF export I recently opened in my text editor the code of critical path algorithm implementation. Sighed and removed it completely. Spent a few evenings on the new implementation which would take into account supertasks, dependency lags, different kinds of dependencies, etc. Wrote a number of unit tests. As a result, here is how GanttProject 2.0.10 renders HouseBuildingSample critical path (critical tasks are red and textured):


The release candidate build of GP 2.0.10 is about to be published. Stay tuned!

Sunday, July 5, 2009

Export to PDF with iText

It is important to be able to export project data to some pritable format. PDF export feature appeared in GanttProject at the very early days, and it is one of the most popular features in our product. However, there is a number of problems with PDF export implementation in GP. The most important is probably this landscape export bug which is difficult to reproduce yet is really annoying when it appears. It is a bug in Apache FOP library which GP uses for PDF renderig and which had no updates for years.

A few weeks ago I started playing with iText library and the second build of GanttProject 2.0.10 which was published on Friday includes an experimental plugin which exports to PDF using iText. My opinion is that it is just better than our traditional PDFexport. It is faster, it produces more visually appealing documents, it allows for scalable graphics rendering, and it doesn't suffer from that "No meaningful layout" problem in landscape mode (which is now default). Besides, now you can choose document page format and substitute fonts if you don't have those specified in iText export theme.


I plan to work on iText based export a little bit more and ship its beta version with GanttProject 2.0.10 in addition to FOP based. After that, its development will continue in Loire code where it will replace FOP export completely.