F21SC Industrial Programming - Heriot-Watt UniversityWeb Browser
Coursework - Developing a Simple Web Browser
Overview
The aim of this coursework is to develop a simple web browser in C#.
This is an individual project, and you will have to submit your own, original solution for this course- work specification, consisting of a report, the source code and an executable.
The learning objective of this coursework is for students to develop proficiency in advanced programming concepts, stemming from both object-oriented and functional programming paradigms, and to apply these programming skills to a concrete application of moderate size. Design choices regarding languages, tools, and libraries chosen for the implementation need to be justified in the accompanying report.
This coursework will develop personal abilities in autonomous problem analysis, the usage of a modern object-oriented language for system programming, and deepen the understanding of integrating components on a Windows system.
Lab Environment
Lab environment: For this coursework you should use Visual Studio C# 2019, which will be the reference platform for testing. You can obtain a full version throughMicrosoft's Imagine Programme. To do this, you need to contact to obtain a student account on their web site. For the GUI component under Visual Studio, the Windows Forms libraries are recommended.
Alternatively, you can use theMono infrastructurefor .NET, which runs under Linux (as well as Win- dows and MacOS), and use theMonoDevelop IDEor theVisual Studio Code IDEfor developing your application. You need to be aware that GUI development will differ in this environment, and that the li- braries available for this platform are likely to be a subset of the libraries for Visual Studio. For the GUI component under Mono, the Gtk# libraries are recommended.
If you develop the software in a different environment, you must make sure that the code is compatible with the above software. Beware of incompatibilities due to different versions of the IDE or compiler that you use. Make sure that you can run the final application on a Windows lab machine.
For technical HOWTOs about accessing software of relevance for this course, seethis technical HOW- TOs page for the courseor the resources section on the Vision page.
The submission of the final software must be in form of both complete sources as well as a stand-alone executable that can be installed and executed on any Windows 10 (with .NET Core and Visual Studio as IDE) or on an Ubunutu 20.04 (with .NET Core and MonoDevelop as IDE) based system. If external tools are used, they need to be included in this executable. Any dependencies on tools or external software must be clearly marked in the report.
Developing a Simple Web Browser
The web browser must provide the following functionality:
• Sending HTTP request messages for URLs typed by the user.
• Receiving HTTP response messages and display the contents of the messages on the interface. Note that you are only required to display the HTML code returned to the web browser from the web server
(HTML parsing and graphical display are not required). In addition to the 200 (OK) HTTP response status code, the following HTTP response status error codes and the display of their corresponding error messages should be supported:
- 400 Bad Request
- 403 Forbidden
- 404 Not Found
Hint: To test these error codes, look up web pages
• Display the HTTP response status code and (if applicable) the title of the web page at the top of the browser's main window. Reload the current page by sending another HTTP request for the current web page, and display the contents of the page together with the title and the HTTP response status code as specified above.
• Home page: The user should be able to create and edit a Home page URL. The Home page URL should be loaded on the browser's start up, and it should be initialised with your university home page.
• Favourites: The user should be able to add a URL for a web page requested to a list of favourite web pages. The user should also be able to associate a name with each favourite URL. Support for favourite items modification and deletion is required. The user should be able to request a favourite web page by clicking its name on the Favourites list. On the browser's start up, the Favourites list should be loaded to the browser.
• History: The browser should maintain a list of URLs, corresponding to the web pages requested by the user. The user should be able to navigate to previous and next pages, and jump to a page by clicking on the links in the History list. On the browser's start up, the History list should be loaded to the browser.
• Bulk Download: The application should provide a bulk download facility as follows. The user should be able specify a file name, default setting bulk.txt, containing URLs (exactly one per line). When initiating bulk download, the application should retrieve each of the pages listed in the file, and display the results as a list of lines as follows:
<code> <bytes> <URL>
where <code> should be the response status code from the page retrieval (as in "Receiving HTTP response messages" above), <bytes> should be the number of bytes retrieved from this URL, and
<URL> should be the URL as specified in the bulk download file. Only these results should be shown in the textarea normally used for displaying the HTML code. One line should be shown for every entry in the bulk download file. No HTML contents should be displayed for this functionality.
• Graphical User Interface: A simple GUI should be provided to perform the operations discussed above. The GUI should be implemented using either the Windows Forms (Windows) or the Gtk# (Linux) libraries. The GUI for the web browser should support the following:
- Using the GUI, the user should be able to perform the operations discussed above.
- Make use of menus (with appropriate shortcut keys) as well as buttons to increase accessibility.
Library Usage
You should identify the suitable library functions out of the set of libraries installed with the .NET Core platform. The report must clearly motivate the usage of the functions that you have chosen. You must not use the C# WebBrowser class in this implementation, but perform the required HTTP-level com- munication directly from within your code. The code must clearly identify the HTTP-level client-server communication, and must explicitly manage Home page, Favourite, and History Lists. Optionally, you may add functionality to render a web page, but there must be an option to disable this functionality and to show only the raw HTML that has been retrieved.
The report should have between 8-12 pages and use the following format (if you need space for additional screenshots, put them into an appendix, not counting against the page limit, but don't rely on the screenshots in your discussion):
1. Introduction: State the purpose of the report, your remit and any assumptions you have made during the development process.
2. Requirements' checklist: Here you should clearly show which requirements you have delivered and which you haven't.
3. Design Considerations: Here you should clearly state basic design decisions you have made in developing your code, covering class design, choice of data structures, GUI design, usage of advanced language constructs, other performance-relevant choices etc.
4. User Guide: Use screen shots of the running application along with text descriptions to help you describe how to operate the application.
5. Developer Guide: Describe your application design and main areas of code in order to help another developer understand your work and how they might develop it. You may find it useful to supplement the text with code fragments.
6. Testing: Show the results for testing all cases and prove that the outputs are as expected. Preferably, use unit testing to test core functionality of the implementation. If certain conditions cause erroneous results or the application to crash then report these honestly.
7. Reflections on programming language and implementation: Based on your experience in imple- menting this application, reflect which language features and technologies have been most helpful, identify limitations of your application and suggest ways how to overcome this limitations. Also re- flect on the usability of the (kind of) language (either system or scripting language) for this application domain, and on its wider applicability.
8. Conclusions: Reflect on what you are most proud of in the application and what you'd have liked to have done differently.
Attachment:- Industrial Programming.rar