Marc Provost
> Home > Projects > Contact Info > Links > About me
Validate the XHTML and CSS of this page.


DSheet: The Designed Spreadsheet



The DSheet project aims to teach undergraduate students how to properly design a relatively complex application. Most software design examples shown to students come from a confusingly wide range of domains and cover only specific problems. The students are never exposed to the principled design and subsequent construction of a full-scale non-trivial application. The main challenge of this project was to find an application that is complex enough to demonstrate all aspects of good software design, while being simple enough to be understood by students without much prior knowledge. We think that commonly known spreadsheets fulfill this objective. We show that a spreadsheet can be divided into several small components. Each component can then be designed independently. This will allow an iterative progression through increasingly complex prototypes. It is possible to demonstrate the use of design patterns in the prototypes and the incremental development necessitates regressive testing. A document containing the complete design, expressed in UML Class Diagrams, Object Interaction Diagrams and DCharts, is available as a teaching tool. A fully tested, complete, and documented implementation of the presented design is also available. We believe that with DSheet, students will be able to understand more clearly the links between the various constructs used while designing a complex application.

DSheet application features:
> Full formula support with functions, references to other cells, evaluation, cycle and error detection.
> Commands: cut, copy, paste, save, open.
> Undo/redo support.
> Good looking GUI supporting cell selection with the mouse or the keyboard and a formula editor.
> The application is extensible. New commands such as search and replace can easily be added with automatic undo/redo support. New formula functions can be added very easily. The GUI is designed to support more advanced features such as customizable fonts and resize of rows and columns.
> More importantly, the application is designed. The design is described using UML Class Diagrams, Object-Interaction Diagrams and Statecharts. A document explains in gory details all the design decisions that were made. A python implementation is available, which is easy to understand. It is well commented, documented with generated html documents and automatically tested.
DSheet academic features:
> Full Top-Down design. From the problem definition down to the implementation.
> Problem definition, requirements specification and architecture design.
> Prototype-based approach: DSheet was divided into components which were incrementally developed, leading to more and more complex prototypes.
> Regressive testing due to prototype-based approach
> Use of a formula parser: Explanation of scanners, grammars, parse trees and the conversion to abstract syntax trees.
> Use of the following Design Patterns in the components: Composite, Visitor, Singleton, Command, Observer.
> The GUI was divided into two distinct parts: static and dynamic. The static part provides an interface for interacting with the GUI. A DChart (which is compiled by scc in the python implementation), uses this interface to express the behavior of the GUI. Thus, the statechart provided in the design is directly used in the implementation. This approach makes the application easy to understand and modify: a change in the design of the statechart is reflected directly in the code.
Design Document:

The design document is always in construction! The essential of the design is described, but there is always place for improvements. DSheet was a side project for me, now I need to continue with my thesis. I will continue to update the document, but suggestions are warmly accepted! I also hope that this project will be useful for others: If you want to use it, please do! I am still young, and I am sure that some experienced programmers/designers could add a lot to DSheet and make it a must for learning software design! If you are interested in this project, please email me. It would be nice to have multiple implementations of the design! Also many more features need to be designed!

> Design Document V0.7 (pdf) (GNU Free Documentation License)
> Latex source (tgz)
Python Implementation:

A python implementation that follows the design specified above was developed. Five prototypes were incrementally built and tested. HTML documentation was generated in the form of epydoc. The code is also well-commented and (I hope) easy to read. A particular attention was given to variable names. The implementation of each prototype is discussed in the design document as an example of a realized design. Each prototype is released under the GNU General Public License.

> Prototype 0: ++Utility (tgz)
> Prototype 1: ++Abstract Syntax Tree (tgz)
> Prototype 2: ++Formula Parser (tgz)
> Prototype 3: ++Data Subject (tgz)
> Prototype 4: ++Graphical User interface (tgz)
> Documentation (tgz html)