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

Deciding how to "webify" your project

Ok, so we said, what do we need to do? We needed to do two things 1) be able to deselect sites from the choices already made on the computer (ie take away articles to streamline the paper) and 2) display a paper. Looking at what we had already in our project, we saw that we already had a basic text-only newspaper. This was a major portion of our work done for us! This text contained all the information about the story that we needed already: the website address it came from, the title of the story, the url of an image associated with the story if there was one, and the text of the story.
All of these were actually contained separately (as strings) in instances of our Ourwebsite class from when we parsed the HTML in the first place–our linear text was just an amalgmation of these individual pieces, as such:


So we decided that in order to put these together in a nice looking way, what we needed to do was put the pieces together in an HTML formatted way, as this would 1) make it look nice and 2) be easy.
We realized that since we had all these pieces as strings, with some nifty string concatenation, we could insert the HTML tags in the appropriate places. We decided to go with a standard article format for ease of coding. So, we decided to do this:


This served our purposes very well. The end HTML file looked like this:


So, we had a nice looking newspaper. BTW, images were stored in the Ourwebsite as the url with the proper IMG SRC tags around it, so if those were present, those came up just fine...the HTML took care of it.

So what next? Well, for this project (project 4) we just needed to create a button to generate the newspaper on command on the webpage. So how did we do this?

Link to this Page