讲解:CO3098/CO7098、JSON, Bootstrap, AJAX、Java、JavaProcess

CO3098/CO7098Coursework 3Mini Web Project - Genealogy ExplorerImportant Dates:Handed out: 28-Nov-2018Deadline: 6-Jan-2019 at 23:59 GMTThe deadline is strict and will not be changed. Please ensure that you submit your work in time. This coursework counts as 22% of your final mark. Please read guidelines on plagiarism in the study guide and course documentation. This coursework requires knowledge about REST Web Service, JSON, Bootstrap, AJAX and theWeb MVC framework. Learning outcome: Use a web MVC framework to create web applications. Demonstrate the understanding of technologies behind Web ServiceCoursework DescriptionYour task is to develop the Genealogy Explorer (GE), an online tool for building a family tree and trackingancestry. This piece of coursework consists of two parts – Part 1 (RESTful Service) and Part 2 (WebInterface). You will need to develop a RESTful web service back-end for searching and editing genealogyrecords, and to design a web interface for creating and browsing these data.You may start your work from Part 1 or Part 2 first as you wish. Java domain class templates and a SQL fileis provided on Blackboard (see Appendix). You may choose to use them for implementation, and you areallowed to make any changes to them.Part 1: RESTful Web Service [40 marks]GE allows users to create and edit a family tree. Your tasks in Part 1 are to implement the following RESTWeb Service methods (a), (b), (c), (d) and (e).(a) Adding a person [10 marks](1) GET /GE/person/add?key=3&name=RichardIII&dob=14830626&m=1&f=2&g=maleSubmit a GET request to this URI to add a person to the database.Parameter:key : the unique key of the person (*)name : full name of the person (*)m : the person’s mother’s keyf : the person’s father’s keydob : the person’s date of birth (e.g. 19921210 – December 10th 1992)g : the person’s gender* Required fields(2) POST /GE/person/addJSONJSON request{key: 1,name: RichardIII,dob: 14830626, gender: malem: 2,f: 3}Successful response in JSON{result: true}Unsuccessful response in JSON{ result: false, message: person id already exists (or m/f id does not exist)}Add a new person to the database. This request returns true if the operation is successful, otherwise falseis returned. (e.g. a person with the provided id already exists; one of the parent ids does not exist)Consider the following HTTP GET requests:GET /GE/person/add?key=1&name=King%20George%20VIGET /GE/person/add?key=2&name=Queen%20ElizabethGET /GE/person/add?key=3&name=Queen%20Elizabeth%20II&m=2&f=1GET /GE/person/add?key=5&name=Prince%20Philip%20Duke%20of%20EdinburghGET /GE/person/add?key=4&name=Princess%20Margaret&m=2&f=1GET /GE/person/add?key=6&name=Prince%20Charles&m=3&f=5GET /GE/person/add?key=7&name=Princess%20DianaGET /GE/person/add?key=8&name=Prince%20William&m=7&f=6GET /GE/person/add?key=9&name=Prince%20Harry&m=7&f=6GET /GE/person/add?key=10&name=Catherine%20Duchess20%of20%CambridgeGET /GE/person/add?key=11&name=Prince%20George&m=10&f=8The family tree structure below will be created (Note that spaces in URLs are encoded as %20; optionalarguments are omitted)Figure (1) Example - Royal Family TreeIt is also possible to add multiple persons at the same time by posting a JSON array to addJSON. For example, the following JSON will add two people to the database:{ list:[ { key:12, name:Princess Charlotte, dob:20150502, gender:female, m:10, f:8 }, { key:13, name:Prince Louis, dob:14830626, gender:male, m:10, f:8 } ]}This request returns true if all people are added successfully, otherwise the operation is cancelled andfalse is returned.(b) Deleting a person [5 marks]GET /GE/person/delete/7Delete a person with the given key (e.g. key=7) from the Genealogy database. The persons descendantsshould NOT be deleted from the family tree. The request should return true if the operation is successful,otherwise false is returned. For example, the above HTTP GET request should not delete key=8, 9,10 or 11 in Figure (1).Successful response in JSON{result: true}Unsuccessful response in JSON{result: false,message: key X does not exist}(c) Getting information about a specific person [5 marks]GET /GE/person/get/12Return the information about a person with the given key in JSON:Successful response in JSON{key: 12,name: Princess Charlotte,dob: 20150502,gender: female,m: 10,f: 8}Unsuccessful response in JSON{result: false,message: key X does not exist}(d) Finding someone’s ancestors [10 marks]GET /GE/person/ancestors/6Return the person’s direct-line ancestors (a direct-line ancestor is someone from whom you descend in adirect line - parent to child, grandparent, great-grandparent etc.) as a JSON object. Given the family tree inFigure 1, the GET request above should return all direct-line ancestors of the person (key=6) as a JSONobject:{ key:6, parents:{ m:{ key:3, parents:{ m:{ key:2 },f:{ key:1 } } }, f:{ key:5 } }}Unsuccessful response in JSON{ result: false, message: key X does not exist}Note: You may include other attributes (e.g. name, gender etc) in the JSON response.(e) Finding someone’s descendants [10 marks]GET /GE/person/ancestors/7Return all of the person’s lineal descendants (a lineal descendant is a blood relative in the direct line ofdescent – the children, grandchildren, great-grandchildren, etc.) as a JSON object. Given the family tree inFigure (1), the GET request above should return all descendants of the person (key=7) as a JSON object:{ key:7, children:[ { key:8, children:[ { key:11 } ] }, { key:9 } ]}Part 2: Web Inter代做CO3098/CO7098作业、代写JSON, Bootstrap, AJAX作业、代做Java课程设计作业、代写Jface [60 marks]Your task in Part 2 is to design and implement a web interface for creating and editing the Genealogy data.You may use any Web Frameworks (MVC, MVP or MVVM) for implementation, including but not limitedto: Spring MVC ASP.NET MVC Ruby On Rails Laravel PHP AngularJS Django Ember.jsThe architecture and good coding practice will also be taken into account when allocating marks. The markfor this piece of coursework will be capped at 65% if the solution does not use any web framework (Pleaseconsult with the convenor first if the framework you intend to use is not listed here).Your tasks in Part 2 are to implement a Web Interface for (f), (g) and (h)(f) Browsing genealogy records [20 marks](g) Adding, deleting and editing persons from the family trees [20 marks](h) Searching descendants and ancestors [20 marks]In addition to the functionality, the website responsiveness (page rendering on a variety of devices andwindow or screen sizes) will be taken into account when allocating marks.Marking Scheme & RubricsPart 1:REST Service API testing process will be automated. Test cases will be provided for each REST controllermethod (a), (b), (c), (d), (e) to check whether methods are behaving as they are expected. Marks will bedistributed according to test results.Part 2:N (0%)No submissionF (0-40%) Front-end HTML page exists, but the program fails to load or display any genealogy data. No listingof records in a simple form (e.g. table). No front-end framework/CSS used. An attempt was made but adding/deleting/editing functions are not functional. Static web pages (or view) for searching descendants/ancestors exists but without any connection tothe database.E (40-50%) Basic HTML pages/view without any front-end framework/CSS; do not adopt a responsive design. Listing of genealogy records in simple form, e.g. display all persons in a simple HTML table; formbasedadding, deleting and editing feature developed, but still not functioning properly. Static HTML page and server-side code for searching partially implemented, but there are still majorissues. (e.g. failed to return any result, 500 internal server error)D (50-60%) Adopt responsive web design in the development, but there are major issues. (e.g. cannot navigate the website through desktop/mobile) Genealogy records are loaded and displayed in a static tree-like structure (e.g. HTML , andCSS); form-based adding, deleting and editing functions partially implemented; Use of JavaScriptfor client-side validation; Search function linked to the database and works to a certain extent; sometimes, the page crashes orthe results of searching are incorrect (e.g. does not include all descendants, wrong ancestor returned).C (60-70%) The adoption of responsive web design, basic browser resizing and cross-device compatibility Genealogy records show in a static or interactive tree-like structure; adding, deleting and editingfunctions are implemented. Ajax/jQuery is used in certain areas but limited, page reloading is stillrequired. Search results are mostly correct; results are displayed in HTML (e.g. tables, etc.).B (70-80%) Genealogy records displayed as an interactive tree (e.g. GoJS genogram chart). Ajax/jQuery is used in some core features so that the tree can be refreshed without reloading (usersare able to make any change to the family tree directly without postback) Search function invokes the RESTful service implemented in Part 1. The searching function passed all test cases, and results are displayed in HTML with pagination.A (>80%) Optimise website for mobile devices, supporting both the portrait and landscape view in a variety ofmobile devices with different screen sizes. Secure RESTful Service with OAuth2 Tokens. Genealogy records are visualised as an interactive tree. Ajax/jQuery is used appropriately in most features. The searching function passed all test cases. Search results can be visualised using an interactive chart.Overall ScoreHow your score will be calculated:(Where p is the number of passed test cases, n is the total number of test cases, wi refers to theweight for each test case)Submission Zip all files in a single zip file for submission:o Your Dynamic Web project or Gradle/Maven project foldero README.txto Your SQL schema and data, if applicable (Your_email_ID.sql) The archive should be named CO3098_MiniWeb_email_id.zip orCO7098_MiniWeb_email_id.zip (e.g. CO3098_MiniWeb_yh37.zip).Note: Please contact the module convenor first if you choose to use .NET WCF or other frameworks forPart 1 and 2. You need to submit the zip file via Blackboard and you are allowed to re-submit as many timesas you like before the deadline.Anonymous markingWe operate an anonymous marking scheme. All submitted WAR files (or other project files) will bedeployed to Tomcat using anonymous fingerprinting generated by SHA256.Appendix1.1. You can use any CSS/JS library for showing the family tree. Here are some candidates:HTML/CSS Family Treehttps://codepen.io/anon/pen/bdjMophttps://jsfiddle.net/r8nbd1wb/6/dTree.js (Static JS Tree)https://treehouse.gartner.io/ErikGartner/58e58be650453b6d49d7GoJS (Interactive Genogram chart)https://gojs.net/latest/samples/genogram.htmlOAuth2 in Springhttps://projects.spring.io/spring-security-oauth/docs/oauth2.htmlPagination in Springhttps://ankushs92.github.io/tutorial/2016/05/03/pagination-with-spring-boot.htmlhttps://examples.javacodegeeks.com/enterprise-java/spring/mvc/spring-mvc-pagination-example/1.2. Persistence FrameworksYou may use GenealogyDB.sql provided on Blackboard, if you intend to write your own DAO classes inconjunction with some ORM frameworks such as Hibernate for data persistence. You do not have to usethis file if you intend to use Spring JPA, NoSQL (e.g. Mongodb, Oracle Spatial Graph) or other persistenceframeworks.1.3 Domain classesYou may use the Java domain classes provided for implementation. However, you may choose not to usethem. 转自:http://ass.3daixie.com/2018120110863811.html

©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 206,723评论 6 481
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 88,485评论 2 382
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 152,998评论 0 344
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 55,323评论 1 279
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 64,355评论 5 374
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 49,079评论 1 285
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 38,389评论 3 400
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 37,019评论 0 259
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 43,519评论 1 300
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 35,971评论 2 325
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 38,100评论 1 333
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 33,738评论 4 324
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 39,293评论 3 307
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 30,289评论 0 19
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 31,517评论 1 262
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 45,547评论 2 354
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 42,834评论 2 345

推荐阅读更多精彩内容

  • pyspark.sql模块 模块上下文 Spark SQL和DataFrames的重要类: pyspark.sql...
    mpro阅读 9,446评论 0 13
  • NAME dnsmasq - A lightweight DHCP and caching DNS server....
    ximitc阅读 2,810评论 0 0
  • #2019-10-21#《卓有成效的管理者》读书笔记 《卓有成效的管理者》4个问题告诉我们: 1.一群平凡人,能做...
    王通通阅读 232评论 0 1
  • 其实被先生知道了送的是绣活儿也没什么。而且这样先生才不会怀疑我不理他。先生,咱瘦一瘦吧!先生总是生病,你一痛风真的...
    莫淇阅读 102评论 0 1
  • 不知不觉,到了二字出头的年龄,感觉自己身上没有改变,童真依旧,胆小依旧。 又是一年期末,由于需要面试,就留在学...
    回头笑笑阅读 262评论 1 1