Project #2 |
Create a Kites-R-Us Dynamic Web SiteThe point of this project is to demonstrate that you can create a simple but interactive dynamic web site. You will create a simple storefront for the Kites-R-Us Company. You will want to list a number of different kites and have an interactive way for a customer to order kites from your web site. Dynamic aspects of the web site will be programmed in Active Server Pages (ASP). ASP works best with Visual Basic Script so I expect you’ll want to use it as your programming language. Book ExampleIn doing this project it is important to study the Book Example I put together. You may use any part of my code that you see fit. But remember that the Book database and the Kites-R-Us database are not quite the same thing. The Book Example is a partial solution only. It does not keep a record of customer information, although it does solicit for credit card details. Nor does it keep a list of orders and order items. The Book example is comprised of three ASP scripts. If using Internet Explorer, to see the source code you may need to do a View Source to see it. Note that ASP code cannot normally be seen, which is why you must view text versions of the ASP source code. The actual files executed are saved with an .asp suffix, not an .asp.txt suffix. The URL to try the book example is: http://www.nvcc.edu/home/mhamill/ITD-210/Files/database/books.asp The three source files you can examine are: http://www.nvcc.edu/home/mhamill/ITD-210/Files/database/books.asp.txt http://www.nvcc.edu/home/mhamill/ITD-210/Files/database/buy_book.asp.txt http://www.nvcc.edu/home/mhamill/ITD-210/Files/database/process_order.asp.txt PublishingThis project must be published to the NVCC Student Server. This web server is configured for ASP and Access databases. On the Class Resources page you will find instructions on how to download, upload and test your copy of the Access database to make sure it can be accessed over the World Wide Web. See me as soon as possible if you cannot get it to work. You will use FTP to move your source files to the server. Since ASP code is plain text, use ASCII mode to transfer these files to the server from your machine. Note that you will have to publish repeatedly to test your changes. Turning in your workThe project is due on the start of our last class on April 26, 2003. You must:
GradingC GradeIf you succeed only in getting a dynamic list of kites from the database to a web page table (similar to the Book example) so there are no errors you earn a grade of 70. All information from the products table except for the picture field and the product ID field must show for each row in your table (and there must be at least several rows so I can ensure it is working properly) to earn the grade. (The picture field is actually a binary image of a kite stored in the database as a .GIF file. You probably won’t be able to figure out how to display this image, but bonus points if you figure it out.) Data should be displayed in a tabular format similar to the Book example. B GradeIf in addition to the above, you can figure out a way to order just one kite at a time similar to the Book example (without capturing customer information in the database) you earn a grade of 80. The quantity available in the Products table must be reduced by the quantity ordered to earn this grade. You do not need to create rows in the Orders and Order Items table to earn this grade. A GradeIf in addition to all of the above, you can figure out a way to capture the customer name, address and credit card information into the customer table you earn a grade of 90. The table is keyed on the credit card name, so if the name is already in the table you need to update the record rather than add it. A+ GradeIf in addition to all of the above you can correctly populate both the orders and the order items table you earn a grade of 100. The especially clever will figure out a way to order more than one kite in the same transaction. Squishy PointsTen points can be added or subtracted to the grade either way. If the user interface is attractive and well thought out, perhaps with appropriate Javascript for forms, then up to ten points will be added. On the other hand, if I find serious errors and things not working right I may deduct up to ten points for these sorts of errors. So test thoroughly. I will also look at your source code and see how readable it is. It’s Gotta Work to Earn a GradeRegardless the basic functionality must work to earn the points. If I can’t even retrieve a listing of books from your database, for example, I can’t award any points. SummarySo scoring will range from 60-110, depending on your interest and talents. If basically nothing works you can expect an F. If it is clear you tried and it didn’t work I’ll award 50 points. If it is obvious you didn’t even try, you will get nothing. Online ReferencesYou may find the following online references extremely useful as you work on your project. I found it useful to have multiple browser windows open, one for testing my work, one for an ASP Reference and one for an ADO Reference. For a Visual Basic Script tutorial: http://www.asp-help.com/getstarted/ms/vbscript/vbstutor.asp For a good reference on Visual Basic Script commands, functions, etc: http://www.asp-help.com/getstarted/ms/vbscript/ For some basic database manipulation examples see: http://www.asp-help.com/database/db_tutorial1.asp This reference details the various database manipulation objects used with ASP. Look particularly at the Connection, RecordSet and Field objects: http://www.w3schools.com/ado/default.asp UtilityFor your convenience I have included this link to a free ASP application that can be used to view, modify and edit Access databases over the web. You will need to download the zip file, unzip it in a temporary folder, read the instructions, do some minor configuration then upload it to your web site. You can see it in operation here but don't change any data or modify any tables! In my demo, you will need to check the checkbox and enter home\mhamill\ITD-210\Files\database\kitesrus.mdb for the database path. Then press the Load Database button. Kites-R-Us DatabaseThe Kites-R-Us Database is actually a Microsoft Access database that will exist on your NVCC Student Web Site. Follow the instructions on the Class Resources page to download, upload and test the database to make sure it is working correctly. If you have problems first contact the instructor so he can look at it. He will direct you to the appropriate NVCC person if there are server issues that need to be resolved. There are four tables in the database. The details are below. Table Name: productsThis is what you are selling. It contains information about your kites for sale:
Table Name: customersThis table contains people who have ordered products from your site. As you take orders your list of customers will grow. The columns are:
Table Name: ordersThis is a list of orders to fill. Note that an order consists of one or more items. The actual items to be ordered are in the order_items table.
Table Name: order_itemsOne row for each kite to be ordered.
Sample SolutionsHere are some sample outstanding solutions to Project #2. Since these exist on student server web sites they may elect to take them down at any time. All solutions were excellent but each student took a different approach to the solution. Ahmed KabirAhmed's solution wasn't high on the user interface but got all the server side scripting right, properly writing to all the tables. He fully extended the book example. Nice work Ahmed! http://www.student.nvcc.edu/home/ahkabir1/project2/kites.asp Source code: http://www.student.nvcc.edu/home/ahkabir1/project2/kites.asp.txt http://www.student.nvcc.edu/home/ahkabir1/project2/buy_kite.asp.txt http://www.student.nvcc.edu/home/ahkabir1/project2/process_order.asp.txt Ieva VelottaIeva's solution surprised me. She had her own server with ASP already installed on it! And it appears she wrote almost all of the code by herself, and used the book solution only as a guide. She went beyond anything I taught in class and investigated ASP session objects and used it to create a genuine shopping cart. Since she had her own server she had the ability to create her own Data Source Name (DSN) that we talked about in class. This simplified accessing her database. Great work Ieva! Source code: http://kitesrus.lore.net/proj2.asp.txt http://kitesrus.lore.net/carts.asp.txt http://kitesrus.lore.net/customer.asp.txt Ha LyHa built a number of utilities into her solution that "proved" things were being stored into the right tables and went well beyond my requirements. She also had a nice interface. Good work Ha! http://www.student.nvcc.edu/home/haly/kite.asp Source code: http://www.student.nvcc.edu/home/haly/kite.asp.txt http://www.student.nvcc.edu/home/haly/buyKite.asp.txt http://www.student.nvcc.edu/home/haly/sale.asp.txt http://www.student.nvcc.edu/home/haly/utility.asp.txt Last Updated 12/24/2004 |