View this PageEdit this PageAttachments to this PageHistory of this PageHomeRecent ChangesSearch the SwikiHelp Guide
Hotspots: Admin Pages | Turn-in Site |
Current Links: Cases Final Project Summer 2007

Naila Farooqui (gte009y): Milestone 1

A Simple Drawing Editor

Task: We were required to create a simple drawing editor. The requirements indicated that with this drawing editor, we should be able to draw lines, circles, and rectangles. It also required a stop functionality which would end our program.

My Thought Pattern .....

When attempting this assignment, I didn't think of "design" at all. I actually treated this assignment as an introduction to Squeak ..where I wanted to try things in Squeak. Therefore, my approach was instinctive and lacked any kind of useful organization. I started with creating a Shapes class, which ended up being the only class I had for M1. Hence, one could have easily caught one of the major flaws with my approach–the use of a God class. All of my methods were within this one class and I failed to decompose the task at hand into smaller parts and then integrate those parts together–one of the basic design goals of an OO approach.

Problems with my design and how I could have improved it ...

To reiterate, I had a God class, which is a terrible design approach. Object Oriented Programming focuses on dividing independent components and then coupling/integrating them through useful delegation, message sends, or inheritance (whichever may be most appropriate). Hence, I could have easily separated the model and the view. Right away, I should have seen that I required some kind of user interface and the UI didn't need to know a lot of the internal functionality.

Secondly, not only did I combine everything into one class, I copied a lot of code between separate methods. Instead, I should have created independent methods that had the code I wanted to reuse, and simply called that method or better yet, I should have used inheritance. For instance, I had to figure out a way to respond to two mouse clicks in order to create any of the three shapes. Therefore, I should have written a method, getTwoPoints, which would return an array of two points–the first one being the first mouse click and the second being the second mouse click. Once I had those two points, I could have sent the two points to another method (such as draw), which would then draw the shape based on those two points.

Finally, I spent a lot of time trying to make my program "work" and didn't focus on making it usability efficient. I should have analyzed users and gained information on their expectations of a drawing editor instead of taking certain decisions based on my own instincts. For example, I created a panel of buttons on the left side of my UI. However, I didn't analyze the possibilities of placing that panel on the top or the bottom or on the right side. This shows poor design techniques. Our goal is to design products for our user, not for ourselves, which is why it is very important to always keep the user in mind.

Link to this Page