” 辅导COMP1111程序、 写作HTMLCOMP1111 Programming (Gold) 20-21Summative AssessmentProgramming Assignment 2: Server-Side ProgrammingOutline? Handout Date: 22 February 2021? Hand-in (Submission of Code and video): by 14:00 23 April 2021? Return by 21 May 2021? Expected workload: 20 days, 3-4 hrs/day = 60 hrs? Total Marks: 100? Components marked: Code, Documentation, Video? Contributes 60% of module marksSubmissionSource code (all Zipped in a directory with correct file structure)? README.txt with execution instructions? HTML and CSS and any media? Client and server-side JavaScript? package.json Including test and pretest scripts? .eslintrc? jest test cases e.g., app.test.js? documentation of API? demonstration videoYou should not include node_modules in submissionSubject-specific Knowledge? A knowledge and understanding of good programming practice (forexample, reuse, documentation and style)COMP1111 Programming (Gold) 20-21? Building collections of data within a program and using JavaScriptObject Notation (JSON)? Making programs Robust through the use of exceptions and exceptionhandling? A knowledge and understanding of good programming practice (forexample, reuse, documentation and style)Subject-Specific Skills? An ability to realise solutions to problems as working JavaScriptprograms? An ability to apply reuse by exploiting predefined components? An ability to use software Tools related to programming (programmingenvironments, code management, documentation tools, etc.)Key Skills? An ability to communicate technical information? An ability to recognise and apply the principles of abstraction andmodellingTask summary1. Construct a dynamic web site for an application of your choosingmeeting constraints as written below in the Dynamic Web Site section.2. Use static HTML pages Loading dynamic JSON content from server viaAJAX3. Server written in nodejs to provide JSON through REST APIDynamic web site? Design a Business/Advertisement/Community/Organisationwebsite which has Objects/entities of at least two types e.g., say, anobject of commercial etc Interest (books, electronics, pets, servicesetc), people/users/buyers/sellers, pictures, places, events,comments The website must have a clear purpose which is evidentfrom/highlighted on the main/single page.? If you are stuck for ideas, feel free to consult meCOMP1111 Programming (Gold) 20-21Static HTML loading JSON via AJAX? Single page app: page content loaded as JSON via AJAX? Can have more than one page e.g., for user and admin? Should provide clean and simple User Experience (UX)? Should be responsive i.e., work well on desktop and mobile? Recommend using framework such as Bootstrap, semantic-uiMessage sequence chartFig: Server providing JSON through a REST APIEntitiesEach entity type (e.g., picture) has? GET method to list/search (returns a list of ids and names)? GET method for individual details (includes details of relatedentities)? POST method to add new entity? Document your API in the style of the Twitter API? Response provided as JSON? Content-type needs to be correct? HTTP codes should be correct: use 200, 400 or 403 (if usingauthentication)COMP1111 Programming (Gold) 20-21Server written in nodejs? Use npm for management? Make sure you use –save or –save-dev option with packages youadd? Write jest test cases: run with npm test? Use eslint: run with npm run pretest? Recommend using expressAssessment Criteria? Client-side functionality (15%)? Client-side quality (15%)? Server-side functionality (30%)? Server-side quality (30%)? Video presentation (10%)Marks /100Functionality (Client and Server) 45-Functionality (both Client: 15 marks, and Server: 30 marks) assessed bywhat is shown/demonstrated in the video (as per criteria below).Quality (Client and Server) 45- Assessed by Assessor as per criteria below.Video Presentation (2 minutes with penalty forgoing over time). Please read carefully below.10Testing Environment? Mac OSX. Firefox (default).? Visual Studio Code? Standard packages covered in class (npm, express etc) (remember youneed to include package.json)Client-side functionality? User Experience (UX): clean layout and minimal clicks/entry required? App complexity: entities can be listed and edited? Single page style: asynchronous updatesCOMP1111 Programming (Gold) 20-21Client-side quality criteria? Standards compliant (HTML5)? Responsive to different viewport sizes? Gracefully handles server disconnectiono useful error messageso recommences on server restartServer-side functionality criteria? More than one entity type, with relationships? REST API provides each entity with appropriate GET/POST methods? Installs with npm install? Starts with npm startServer-side quality criteria? Appropriate development tools and frameworks (Fetch, Express etc) used? Successful eslint (run with npm run pretest)? Successful jest tests with good coverage (run with npm test)? Testing includes content-type and HTTP code? Completeness of API documentationVideo Presentation? Submit a 2-minute (max) video demonstrating your software? Include demonstration of how to start the program? All functionality will be assessed by what is demonstrated in the video? If it is not demonstrated in the video, you will not get a mark for it? Quality of video presentation will be marked separately fromfunctionality:o Structure: Visual Presentation; Audio explanation? You will lose 10% of marks for video presentation (10 marks), forevery block of 10 seconds over 2 minutes. That is, if your video is 2mins 1 second long, you lose 10%, if its 2 mins 11 seconds long, youlose 20%, and so on.How to do the assignment? Design HTML? Design web service? Join with FetchCOMP1111 Programming (Gold) 20-21? Read the FAQ (Ver 1 below, updated versions (if required) will be postedseparately, and class will be informed during lectures).COMP1111 Programming (Gold) 20-21Frequently Asked Questions (FAQs)Client-side functionalityQ. Do we need authentication, like username and password?Not recommended: if you are going to do authentication you should do it properly,and its very unlikely that you could write something yourself that would be robust.My usual advice would be to use an external authentication service (e.g., throughfirebase), but that requires have tokens etc embedded into your code. Sharing thatwith others would most likely be outside the terms and conditions of its use. So ifyou want to do authentication, just include a function to authenticate, which maybepops up an alert saying this page is private or something like that.Client-side qualityQ. Can I use react to build the website?Not recommended: It may be difficult to assess the quality of your solution.Q. Can I use jQuery to build the website?Not recommended: As discussed in class, JQuery is on the way out. It used to beessential to make things like event handling and AJAX work across browsers.However, now modern browsers offer the Fetch API which handle this. The smallissue is with Internet Explorer support. However, IE has a minor share now andpolyfills are available to make it look like it has Fetch. Many systems still do usejQuery (i.e., bootstrap) but are looking to remove is as a requirement (e.g., Bootstrap5) so I wouldnt recommend it for a new project.Q. Will I get marked on documentation of the client-side code?No.Q. What do you mean by gracefully handles server disconnectionThis means that your client-side code should do something sensible if theconnection to the server goes down (as it might do if it were connected via theInternet). It should display an informative message to the user, and maybe try againlater. You can test this by stopping the server and trying to interact with it throughCOMP1111 Programming (Gold) 20-21the client. Once the server is started up again the client should be able to carry on asbefore.Server-side functionalityQ. Are we allowed to include additional modules via NPM thatprovides additional functionality?Yes. This is a good idea. This makes the code easier to read, more robust and moremaintainable. Some frameworks (e.g., React) installed via npm essentially use adifferent language, so are difficult to read for non-experts. These are best avoided.Q. How are we advised to save the data, i.e. using database?In a real system, a database would be the best way to store data. However, databasesare not part of this course. The recommendation would be to write functions forsaving the state, which just write to file a JSON string representing the state. This willnot work with multiple users but would be enough for simple testing.Q. What do you mean by an entity type?Refer to the lecture on REST. An entity or entity type is what you would have studiedin your Databases module. In Objected Oriented programming, the counterpartwould be what you would refer as a class. This is a distinct type or kind of thing. Asan example (courtesy Steven Bradley):If your app is about poets and their poems then you would have two entity types:poet and poem. For each poet you might want to store their iID name(s), date ofbirth, url of image. For each poem, you might want to store an ID, the title, date ofwriting, and the text. The relationships between the entities would be of the formpoet1 authored poem2. Exactly how you store the information about the relationshipis up to you: you could store the author id with the poem or store a list of poems idswith the author, or have a separate store relating the two. In either case, when youget the details of an entity you should include everything, including the relationships.It may be a good idea to devote some initial effort on your entities and relationshipse.g., using E-R diagrams.COMP1111 Programming (Gold) 20-21Server-side qualityQ. Is the testing solely on the server.js file or on the other .js filesthe website uses alsoYou only need to test your server side javascript.Q. Are we allowed to use an API documentation generator likePostman or must we create our own documentation from scratch?Yes, if you have a good tool for API generation suchas httpss://learning.postman.com/docs/postman/api-documentation/documentingyour-api/that would be fine, and a good idea.Q. Will adding comments to the API be sufficient for APIdocumentation, or would it be preferable to use something likepostman or httpss://www.npmjs.com/package/node-api-docgenerator(an npm package)?One should not need to have to read the code to see the API documentation. Youcould write it in HTML by hand, or you could use a tool to do that. The postman toolmaybe a good idea, the npm tool looks less maintained.Q. What do we need in the API documentation?For the API documentation the ideal is something like the documentation ofthe Twitter API which lists the methods in the API and then provides the details foreach method including details of parameters and response.Q. How should we configure the ESLint file?Unless you have a good reason to do otherwise you should use thismodule.exports = {extends: standard,rules: {semi: [2, always],indent: off}};But if you are using something else reasonable that is fine, but you must include therelevant .eslintrc. It shoud not require a whole load of work to set up.COMP1111 Programming (Gold) 20-21Video PresentationQ. What information are we supposed to include in the video?Treat it as a sales pitch for the criteria listed under client-side functionality andserver-side functionality. You dont need to show every single thing that your sitedoes, just show how it meets the requirements. Things like HTML validation,automated testing and the API documentation do not need to be covered.Q. What software should we use to record the presentation, andwhere could we find it?The university provides Panopto (which is used for sharing lecture recordings) forrecording and simple editing. Here are some instructions for use. Freely availabledesktop tools include OBS Studio and daVinci Resolve for recording and editing,which are both powerful but have more of a learning curve. MacOS providesQuickTime player and iMovie for recording and editing. TechRadar have a list ofscreen recorder software for other alternatives.如有需要,请加QQ:99515681 或WX:codehelp
“
添加老师微信回复‘’官网 辅导‘’获取专业老师帮助,或点击联系老师1对1在线指导。