COMP229程序 辅导、 写作Web留学生编程

” COMP229程序 辅导、 写作Web留学生编程COMP229 Web Application DevelopmentMid-Term TestDue: Week 7 (Friday October 30, 2020) @ midnightValue 15%Mid-Term Test Maximum Mark: 100Overview: Using your knowledge of NodeJS and ExpressJS and the Web App Template provided,complete the Favourite Book List web app that you will share on GitHub and deploy to Heroku (oranother cloud provider). Your web app already includes basic navigation controls, a Landing Page, aBookList page and a BookDetails page. Your task is to complete the code that is missing from therouting files and the Books List page so that a user can Add, Delete and Edit any Book item from theDatabase.Project Setup: Rename the Web App Template provided to COMP229-F2020-MidTerm-[YourStudentID]. (e.g.COMP229-W2020-MidTerm-300929668). You will need to create a new Mongo Database on MongoDB Atlas. You will need to change theURI variable in the db config file (config/db.js) to point MongoDB Atlas. You will need to add some example Book data in the database.Instructions:1. The BooksList page (views/books/index.ejs) already lists your favourite books. Your job isto fix the Add Button, and insert the appropriate code for the Edit and Delete Buttons (2 Marks:GUI, 13 Marks: Functionality):a. Fix the Add Button on this page so that it links to the BookDetails page(views/books/details.ejs). Hint: insert the correct route in the href attribute. (3Mark: Functionality).b. Add an Edit Button to each row of the existing Table (the insertion point has beenmarked for you). Ensure that when the user clicks on the Edit button, they are linked tothe BookDetails page and the _id of the book they wish to edit is passed to that pagevia the URL. Hint: the href attribute requires a reference to the _id of the book beingedited (1 Mark: GUI, 6 Marks: Functionality).c. Add a Delete Button to each row of the existing Table (the insertion point has beenmarked for you). Ensure that when the user clicks on the Delete button, that the _id ofthe book to be Deleted is passed to the router. Hint: the href attribute requires both alink to the delete route and a reference to the _id of the book being edited (1 Mark:GUI, 4 Marks: Functionality).2. The Books Routing File (routes/books.js) already has a route working to find all the books inthe books Collection and render your BooksList page. Your task for this section is to completethe logic for Each of the other routes to render the book details page when the Add or EditButtons are clicked, process a request to Add or Edit a Book, and process a request to Delete abook (63 Marks: Functionality).:a. Complete the get(/add) router logic that renders the book details page(views/books/details.ejs). The form on the book details page will initially beblank. You must pass an appropriate value for the title property and blank value forthe books property. (10 Marks: Functionality).b. Complete the post(/add) router logic that processes the insertion of a new bookinto the database. You need to instantiate an object of the book model (excluding the_id property) and pass this object to the create method of the book model to add anew book to the database. Hint: the values for the book object will come from the nameattributes of each field of the book details page. Redirect the user back to the BookListpage (/books) when the insertion is completed. (10 Marks: Functionality).c. Complete the get(/:id) router logic that renders the book details page(views/books/details.ejs) and uses the id from the URL to select the book todocument to be updated. Declare an id variable and set its value to the id property ofthe request object. Pass this id to the book models findById method to render thebook details view. You must set an appropriate title property value and set thebooks property to the book that was returned from the database as you render theview. (15 Marks: Functionality).d. Complete the post(/:id) router logic that processes the update request of anexisting book by using its id property. Declare an id variable and set its value to the idproperty of the request object. You need to instantiate an object of the book model(including the _id property) and pass this object to the update method of the bookmodel to edit an existing book in the database. Hint: the values for the book object willcome from the name attributes of each field of the book details page. Redirect the userback to the BookList page (/books) when the update is completed. (20 Marks:Functionality).e. Complete the get(/delete/:id) router logic that processes the users deleterequest and Removes an existing book from database by using its id property. Declarean id variable and set its value to the id property of the request object. Pass the id tothe book models remove method. Redirect the user back to the BookList page(/books) when the removal is completed. (8 Marks: Functionality).3. Include Internal Documentation for your site (4 Marks: Internal Documentation):a. Ensure you include a comment header for your JavaScript file that indicate: The Filename, Authors name, StudentID, and Web App name (1 Marks: InternalDocumentation).b. Ensure you include a section header for any JavaScript functions (1 Marks: InternalDocumentation)c. Ensure all your code uses contextual variable names that help make the files humanreadable(1 Marks: Internal Documentation).d. Ensure you include inline comments that describe your GUI Design and Functionality.Note: Please avoid over-commenting (1 Marks: Internal Documentation)4. Share your files on GitHub to demonstrate Version Control Best Practices and push your site to acloud host (4 Marks: Version Control, 4 Marks: Cloud Hosting).a. Your repository must include your code and be well structured (2 Marks: VersionControl).b. Your repository must include commits that demonstrate the project being updated atdifferent stages of development each time a major change is implemented (2 Marks:Version Control).c. You must deploy your site to your Cloud Server using git (4 Marks: Cloud Hosting).5. Create a Short Video presentation on YouTube or another streaming provider. You must includea short PowerPoint (or Google Slides) Slide Deck that includes a single slide to start your video(10 Marks: Video)a. The first (and only) Slide of your Slide Deck must include a current image of you (noavatars Allowed) that is displayed appropriately on the page. You must also include yourFull Name, Student ID, the Course Code, Course Name, and your Assignmentinformation. (2 Marks: video)b. You will demonstrate your sites functionality. You must show each page workingproperly (2 Marks: Video)c. You will describe the code in your app.js file that drives the functionality of your site (2Marks Video).d. Sound for your Video must at an appropriate level so that your voice may be clearlyheard, and your screen resolution should be set so that your code and site details areclearly visible (2 Marks: Video).e. Your Short Video should run no more than 5 minutes (2 Marks: Video).SUBMITTING YOUR WORKYour submission should include:1. A zip archive of your websites Project files. Ensure to Name your project files COMP229-F2020-Midterm-[YourStudentID].zip e.g.COMP229-F2020-Midterm-300818557.zip Please do not create a RAR archive of your project files.2. A link to your GitHub repository. Ensure to Name your GitHub repo: COMP229-F2020-Midterm-[YourStudentID] e.g.COMP229-F2020-Midterm-300818557)3. A link to Your live site hosted with a Cloud provider (Heroku Recommended). Ensure to name your live site COMP229-F2020-Midterm-[YourStudentID] e.g. COMP229-F2020-3008185557.herokuapp.com4. A link to your video demo hosted on YouTube or another cloud providerFeature Description MarksGUI / Interface Design Display elements meet requirements. Appropriate spacing, graphics, colour, andtypography used.2Functionality Site deliverables are me and site functions are met. No errors, including submissionof user inputs.76Internal Documentation File header present, including site student name description. Functions andclasses include headers describing functionality scope. Inline comments anddescriptive variable names included.4Version Control GitHub commit history demonstrating regular updates. 2 marks for simply pushingyour files to GitHub once. An additional 2 marks awarded for using GitHub as youcode.4Cloud Deployment Deploy site to Cloud Service. 4Video Presentation Your short video must demonstrate your site and describe your code 10Total 100This exam is Weighted 15% of your total mark for this course.This is an open-book exam.Students may use the Internet to view the instructors GitHub repos and their own work.Students may also access course PowerPoint presentations or the Textbook outlined in theCourse Syllabus.Use of a search engine is permitted.However, use of external code is not allowed for this exam.Please check With your instructor if you are unsure.如有需要,请加QQ:99515681 或邮箱:99515681@qq.com

添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导