N342 Project Finish
A key project goal was to separate the programming logic from the user interface design allowing elements of each maintained in separate directories or computers.
One element of the user interface implemented for testing only (in N342 at least) consisted of XSL to display stock to buy and sell, portfolio, etc. The style sheets were named SellListContent.xsl, BuyListContent.xsl, etc. and were used by ASP scripts to transform XML data into HTML for viewing test results. Minor modifications to the ASP scripts will present a complete user interface rather than simple test results.
The following assignments complete the project and incorporate a complete user interface.
Implement error logging in CartSummary.asp similar to the example discussed in class. Log different details of different errors, not a single report for any error.
In the case of a program exception, log the error event to a log file named ErrorLog.txt in the Project directory.
Test - Test two cases in executing CartSummary.asp:
- An error in CartSummaryContent.xsl - Insert an error to the style sheet, such as changing <td> to td>.
- No errors.
- ErrorLog.txt, the error log file, is included in Project directory for test case 1.
- CartSummary.asp execution results in no errors for test case 2.
Ensure that all ASP files, except Login.asp and Registration.asp, redirect to Login.xml when Session("trader") is undefined.
In BuyStock.asp and SellStock.asp, if not already done so, verify that the number of shares is greater than zero and non-blank before inserting into the Cart.
Otherwise, invalid data will be entered to tables and your project will break.
Modify Login.asp to redirect to Portfolio.asp on a successful login.
Verify that on completion, CartEdit.asp redirects to CartSummary.asp
Modify Login.asp to protect against SQL injection attack via the username input.
Test using username input such as:
'; DELETE FROM TRADER;--
Verify that Login.asp:
- operates correctly with your usual trader ID after the modification,
- does not crash with SQL injection input such as that above.
Test your project with a completed user interface by:
- Create a new directory named W:\N342\Project Test
- Copy all files from W:\N342\Project to the empty W:\N342\Project Test
- Make one minor modification to each of the following ASP files in W:\Project Test
The modification consists of changing one line in each of the files so that a full user interface is used.
For example, in the Portfolio.asp file, comment out:
and replace with:
Note that object name xsl should be consistent with the names used in your programs.
- Download N342 Test Project file for the user interface files
Windows 7 may try to scare you with security hassles, use the following to extract the files:
Select Run | Actions | Options | Run Anyway
Unzip to W:\N342\Project Test
- Test all site functionality in IE:
- In browser address enter:
- http://iu-uits-eiwp1.ads.iu.edu/username/N342/Project Test/Welcome.xml
- Register, starting with an amount of $1000.00,
- Buy and sell, placing several stocks in the cart,
- Remove several stocks from the cart,
- Commit the cart selections,
- Portfolio display,
- Performance display,
- Account display,
Problems, things to try:
Verify Project.mdb exists in the Project Test directory.
Reset, forcing all users off by: http://iu-uits-eiwp1.ads.iu.edu/username/N342/Project Test/Reset.asp
Close browser and reopen.
Turn in - Due on the date listed in the syllabus.
OnCourse Drop Box
- The period of time between the project due date and turning in grades is very short so it is very important that the files be named and placed in the locations specified by the instructions. Otherwise I may be unable to locate and grade your work.
- Verify the Drop Box version works by copying Project Test.zip files back to directory W:\N342\FINAL and rerunning the tests.