Session 16: Practicing with forms - myTeachingURJC/2018-19-PNE GitHub Wiki

  • Goals:
    • Practicing with forms
  • Duration: 2h
  • Date: Week 8: Wednesday, March-13th-2019

Contents

Practice 6

  • Place all the files in your P6 Folder in your 2018-19-PNE repo in github
  • Design a Web Server for performing operations on a sequence: total length, finding the number of a base and the percentage of a base in the sequence (same operations than in practice 3)
  • The server will send the main page whenever the / resource is requested
  • The main page consist of the following input elements:
    • Text input, for typing the sequence to be processed
    • A checkbutton for the operation len. If it is check, the total length of the given sequence will be calculated in the response
    • An option element that let you chose between the count or percentage operations
    • 4 radio buttons for choosing the base to use for the previous operation: A, C, T, G
    • A submit button
  • The response should be an html page with the result of the operations
    • If the sequence is NOT valid, an error message should be notified (and no operations are done)
    • If the sequence is OK, the response html page should contain the following information:
      • The Sequence given by the user
      • The sequence's length (only if the checkbutton len was checked)
      • The operation performed with the chosen base:
        • Ex: Operation percentage on the A base
      • The result of the operation
  • Use the resource /seq for sending the information from the client to the server
  • If the client request a resource different than / or /seq it should return an error web page
  • You must use the Seq class

Authors

Credits

  • Alvaro del Castillo. He designed and created the original content of this subject. Thanks a lot :-)

License

Links