User Tools

Site Tools


proj1

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
proj1 [2010/10/07 21:00] roumaniproj1 [2010/10/09 22:45] (current) roumani
Line 7: Line 7:
  
 ====== Resources ====== ====== Resources ======
- +The (highly readable) authoritative documents on Servlets and JSP are posted under //Resources// along with their APIsAlso posted is a tutorial and a link to a site with JEE highlights.
-[[http://www.perl.org/|Authoritative page]] +
-[[http://www.comp.leeds.ac.uk/Perl/start.html|Tutorial]] +
-[[http://www.cse.yorku.ca/~roumani/perl/|My page]]+
  
 ====== Base Requirement ====== ====== Base Requirement ======
-Whenever a user visits the URL of your webapp, a screen similar to the following is displayed:+See the page of Project 0.
  
-{{:proj0.jpg|}} 
- 
-The webapp allows several users to concurrently create a list of countries. The user enters a country name and then clicks the "add" button. The above screen shows that 4 countries have been entered so far (by all users) and 2 of them were created by this user in this session (the other 2 may have been created by other users or by this user in a prior session). The master list is displayed beneath as shown.  
- 
-**Validation** \\ 
- 
-  * If the entry made by the user is already present in the master list then it is rejected. In that case, the same screen is re-served (with its information updated to reflect any changes made by others in the master list) but with a line added at the top containing, in red colour, the message: "This country has already been added". Furthermore, the text box must be filled with whatever the user entered; i.e. the entry is echoed back.  
- 
-  * If the entry is empty or contains only whitespace then it is also rejected, and the form is re-served, as above, with the message: "Country name cannot be blank!" 
- 
-In all other cases, the country is added, the form re-served, and no message appears at the top. 
  
 ====== Possible Variations ====== ====== Possible Variations ======
 +The same variations listed in Project 0 apply as-is to this project. In addition, the following enhancements over our reference implementation (posted as ''Proj1B.war'') are to be explored:
  
-  * Country name must be made up of letters and possibly a hyphen in the middle+  * Persist the webapp data when the controller is destroyed and load it when it starts
-  * The master list should be displayed sorted. +  * When you implement the above data persistence, pay attention to concurrencyIn addition, avoid mixing concerns. Specifically, saving data is the concern of the model; the name of the file is the concern of the end-user; the path leading to the file is environmental and is therefore the concern of the controller.
- +
-  * Don't send the master list if the client is iPhone or Blackberry. +
-  * If a user remained idle while others are adding countries, the counter on the screen would not remain correct. Fix this. +
- +
-  * Map your app's URL to a directory. +
-  * Add logging to your webapp.+
  
-  * Add authentication to your webapp+  * Migrate messages (such as //Cannot be Blank//) from the controller to the view
-  * Add confidentiality to your webapp.+  * Make one error message appear in red and the other in blue.
  
-  * Trigger an event if user successfully added more than 5 counties per session. +  * Reset the user's count if the user remained idle for 1 minute. Do this even if the session has not expired yet
-  * Compress your webapp's response.+  * Send an error message if the used URL includes the string "York" (case insensitive), e.g. /york.do. Ideally, set some unused HTTP error status code and have web.xml auto serve an error page (see the <error-page> tag in web.xml).
  
-  * Keep track of the counties entered by the user in the sessionnot just the count, and enable the user to view them. +  * Deploy your webapp on red. To that end, install tomcat (via the ''tomcat_install'' command) and then start it via ''tomcat_start''. Add ''web.xml'' to your webapp (see posted sample and instructions) and comment out the annotation import line. Export your webapp to a war and put it in the ''webapps'' directory. If you need to make (minor) changes in rededit the source files and compile them using ''tomcat_compile''Alternativelyuse the ''eclipseEE' command to launch eclipse on red 
-  * Enable richer content. Rather than just a country name, the user may also enter the capital and possibly the population.+
  
-The following two variations require CSS and JavaScript:+The following two variations require filters and listeners:
  
-  * Rather than serve the list every time, change the UI to a sidebar and two links "Add a Country" and  "Show Master List" +  * If a client managed to enter over five countries within a session, flag it as a "Power User" and post its IP at the top of each served page. 
-  * To improve responsiveness, and to place less demand on the network, have the client do some validation. Server validation should remain unchanged (why?). +  * Inject a new validation rule: //"countries less than three characters are not allowed during lunch hour"// :-D
  
proj1.1286485254.txt.gz · Last modified: 2010/10/07 21:00 by roumani

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki