80 likes | 242 Views
David Shears 905305652 shears@vt.edu ECE 4564: Network Application Design Assignment 1 9/13/2010. Article Finder. This application allows a user to enter in the name of a team and it then retrieves the most recent article on ESPN.com.
E N D
David Shears 905305652 shears@vt.edu ECE 4564: Network Application Design Assignment 1 9/13/2010
Article Finder This application allows a user to enter in the name of a team and it then retrieves the most recent article on ESPN.com. This app is useful for anyone who likes sports and wants to stay up-to-date with a particular team. Twitter allows anyone to follow any particular person and read the most recent thing that is on his or her mind. Like Twitter, Article Finder will find the most recent article posted by ESPN involving any particular team.
When a user opens up this application, they will see a screen identical to the one displayed below. It informs the user to enter the name of a team and then it will find the most recent article.
Once the user has entered the name of the team that they want to read about, they simply click the ‘Find Article’ button.
The user will now see the title of the article succeeded by the article itself. The application uses an HTTP Get method to retrieve the data from ESPN’s search engine using the name entered. After processing the search, the application then finds the most recent article posted and creates a WebView of the article
Error Handling The program does some error handling to prevent application failure because of human error. If a user tries to find an article without entering a school. The application will prompt the user, reminding them that they need to enter a teams name. If the user attempts to find an article for a team that does not exist it will inform the user that the team cannot be found
Design I began my design by first creating the widgets and the layout I would need for this application. Then I had to begin thinking about programming implementation. I knew I needed to use an HTTP Get response to request the data so now I had to figure out just where to pull the data from. Using ESPN’s search engine I took the HTML code of the search page and found identifying HTML tags for the found items. Since ESPN chronologically organzied their searches, I could easily pull the first item from the search and populate a TextView field with the title and load the WebView with the link to the article. I threw an execption for the HTTP response if it failed and checked the user input to make sure a string was submitted.