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

AA - Design Process

The design process started during the first milestone as one might excpent it to. At this point, we all had were just learning squeak and were experimenting around, trying to figure out the simplest way of desigining a UI which will be easy to understand. One thing that we always tried to keep in mind was that the the users of this program might not be frequent computer users. This was a very hsrd thing to do since we were all CS majors and the TAs grading these projects were also CS majors. Anyhow we started coming up with different ideas of what our UI should look like.

We decided to do a Menu driven based UI. We will have buttons for each category. When a user clicks on a button, A menu pops up letting the user select one of the sources from the categories. This seemed like a good idea but as we started to code, we saw that every menu item takes in an action sommand, which is the method to be called when that menu item is selected. It turns out that in the built in squeak popup menu, one cannot pass in arguments along with the function call. So we ended up writing a method for each and every selection in the menu. Also, the only way we could get it to work is by making all of them class methods. We were thinking of writing one method, takes in an argument as to what was selected and forwards the appropriate url. At this point we knew this was not going to fly and we'll have tom come up with something else

So that's when we decided to create the UI that we have now. We decided to create two scroll lists. When a category is clicked, it shows all possible sources in one scroll list. When the user selects the category and decided to add (by clicking add), we put it in the other scroll list. This idea turned out pretty well and we stuck with this UI until the end of the project. For our design, we decided to have just one class take care of it. At first we thought this was not good, but later on we realized that reusing built in squeak stuff as much as you can and not creating a bunch of classes, like most ofour colleagues were doing, would be a good direction to go into.

Next, we had to design the whole system. So we started barinstorming. We started writing down all the potential classes we could think of on index cards. We wrote down what the respnsibility of each class would be. When creating the design, we tried to model our classes on real world objects. We asked the question: what is it that a newspaper has and how is it generated. We went through the process of how a news goes from reporters to newspapers. So we created classes called Reporter, Editor, Publisher, and Newspaper. We decided that our class Newspaper would be the one to start things off. Also we decided to create a class called Newspaper Display. This is not what a news paper has in real world but this is a CS class and sometimes you need to create objects that are not represented in the real world (like a window for example).

We also said we will need a data structure to represent an article so we created a class Article. Article knows it's text, it's images and it's headline so we decided to put those in there. Then we said that a newspaper has a page, which is basically a list of article. A page also knows it's dimensions. A news paper page is divided up into columns, so we have a Column class. Each column knows it's article, how much of an article can it display, and what page is the article continued on. Also we defined responsibilites for Reporter (get articles), Editor (parse articles), and Publisher (display articles).

As the project went on, we made changes to our design, but they were easily implemented. Since we had to do a web interface, We created a class WebServerAction to take care of all the input / output from and to the web. We added methods to publisher so that it can display it either on the web or on the screen. We also created a class called WindowDisplay for any display and we extended SourceDisplay, and NewsDisplay off that class. it made it very easy for us to display anything in a window including the articles.

Lastly for our final project we added a class BookDisplay to create postscript files. So througout the project, we made additions and minor changes to our design but for the most part, our backbone remained pretty constant and the changes were not very difficult to add to our existing design.

Link to this Page