Design and implement a restful web application

Assignment Help Other Subject
Reference no: EM132776908

ITECH3108 Dynamic Web Programming - Federation University

Assignment - Power drill Grapevine

Learning Outcome 1: Contrast the capabilities and limitations of client-side and server-side web code K3. Detect opportunities for increasing security and privacy of web applications S1. Develop client/server web applications using client-side and server-side code

Learning Outcome 2: Connect to and manipulate a database management system programmatically using server-side code

Learning Outcome 3: Design and implement a RESTful web application programming interface (API)

Learning Outcome 4: Implement a client-side web application which uses a client-side programming language to access a web API

Learning Outcome 5: Design, develop, test, and debug client/server web applications to provided specifications

Assessment Details - Introduction

Power drill Grapevine is a single-page web app that allows users to post their opinions about power drills online, and reply to other people's opinions.

Users can post new opinions, which include some review text and, optionally, their name. Opinions submitted without a name are labelled "anonymous" and should have distinct formatting.

Users can additionally "like" other opinion posts.

Database
A simple database with one table is sufficient to model the database requirements for this assignment, however you may if you wish extend and/or normalize this database.

The database has the following structure:

PowerDrillPost ( id, name, text, post_date, likes, reply_to )

Each record in the PowerDrillPost table represents a single opinion post.

The post_date field should be a MySQL TIMESTAMP field, and contains the date and time that the post was created. You may achieve this using the DEFAULT CURRENT_TIMESTAMP declaration in your CREATE TABLE statement.

The likes field is an integer value indicating how many people have "liked" the opinion.

The reply_to field is a nullable foreign key, which indicates which post, if any, each post is a reply to. A
NULL reply_to indicates that the post is not a reply.

The assignment tasks are closely associated with the lab work of topics 7 to 10. Code and examples from lectures and labs should be a useful guide throughout this assignment. The assignment requires a number of files and a report to be produced. The report should respond to written tasks that are included below

Initial task
Create the above database using your existing SQL skills. You will need at least eight opinions about power drills. At least three posts should be replies.

At least one of the posts should be written by somebody called user000000.

Invent or discover your own data. Cite data sources appropriately in your report, or alternatively include a source field in your database.

Submit your SQL file as part of your assignment.

JSON markup
Mark up the complete data using JSON and save it as a .json file. Check that the file is valid JSON and report the method used to validate.

Submit this file as part of your assignment.

Back-end API
Create a RESTful JSON API using PHP, implementing at least the following functionality: List all top-level opinion posts (GET)
Should include id, name, text, likes for posts with a NULL reply_to value.


Use an optional querystring/GET parameter to allow sorting by post_date and likes.
Retrieve all details for a particular post (GET)
including replies Create a new post (POST)
Increment the likes value for an opinion (POST)
Decrement the likes value for an opinion (POST)

Note that it is ok to unlike a post that you never liked - this may result in the likes field being negative.


The Like and Unlike methods are not strictly following RESTful practices, as they are not implemented by transferring state. You may choose to use the PUT method instead.

Follow HATEOAS (Hypermedia as the Engine of Application State) practices. Include a note in your report about how you have followed HATEOAS.

Under Apache, this step will require configuring a .htaccess file to allow using clean URLs (without a .php extension)
Front-end
Create an HTML/CSS/JS page which uses JavaScript, AJAX, the DOM and your back-end API to:

Display a global timeline of all top level power drill opinion posts. Sort the list by date, with the most recent first.
Allow the user to submit a new top-level post, which will be displayed immediately in the review list. Display the details of an individual post when clicked, including all direct replies.
Allow the user to reply to a top-level post. The reply should be displayed immediately. Allow the user to "like" a post by clicking on a link or button.
Periodically (every 5 seconds), update the page with new posts or replies and updated "like" counts. This should not remove any text currently being entered in any forms.

The last requirement can be tested by opening your site in multiple browser tabs at the same time

All functionality should be implemented using JavaScript, the DOM and the backend API, without reloading/refreshing the browser page.

Bonus tasks (Completely optional!)
These tasks are 100% optional, and you can receive full marks without attempting or completing them. They are intended to be a challenge if you are interested in such things, and the marks available do not reflect the significant research and effort required to implement them correctly.

Bonus task one: WebSockets

Instead of polling every 5 seconds, use WebSockets to notify browsers when the content they are viewing has changed.

Implement your WebSocket server using either Python or Node.js. You may use an existing WebSocket library.

Bonus task two: Token-based authentication

Implement optional signup/login, also using AJAX techniques, which allows deleting posts and remembering likes.

Use JWT token-based authentication, rather than cookies / PHP sessions.

Bonus task three: GraphQL in Python

Using Python and the Graphene and SQLAlchemy libraries, implement a new API using GraphQL. Create a variant of your front-end that uses your new GraphQL API instead of REST.
Further details
Please note that there are no marks for aesthetics, so please spend your time appropriately. It is acceptable to use third-party CSS frameworks such as Bootstrap, Skeleton, Bourbon or similar if you wish, as long as you reference appropriately in your report. Third-party JavaScript is not acceptable, nor is code obtained through online Q&A sites such as StackOverflow.

Documentation
Include a written report containing:

A statement of completion;
Details of specific assistance you received from people other than your lecturer or tutor, and the names of those assisting;
References to any third-party CSS frameworks if applicable;
Anything interesting or cool you'd like to draw to your marker's attention.

Attachment:- Power drill Grapevine.rar

Reference no: EM132776908

Questions Cloud

Which expenses originate from : Which Expenses originate from? incurring liabilities or providing services to customers. / using an asset or recognizing liabilities.
What actual sentence would you impose : Sam is a 40 year old who was convicted of a breaking into a jewelry store in Coral Gables, Florida. During the burglary he successfully took over $1 million.
When should harvest recognize revenue from catering service : Harvest Catering is a local catering service. Conceptually, when should Harvest recognize revenue from its catering service? On the date the meals are catered
Has the development of new laws made the responsibilities : Has the development of new laws made the responsibilities of the criminal investigator change over time? Discuss 1 law and how it had an effect upon crime scene
Design and implement a restful web application : Design and implement a RESTful web application programming interface - Implement a client-side web application which uses a client-side programming language
Which is an amount reported on the financial statements : Sally's Choice sells season memberships for $200 each. Which is an amount reported on the financial statements for the period ending March 31, 2017?
How much interest revenue should cuisine recognize : If Cuisine's accounting period ends on December 31, how much interest revenue should Cuisine recognize during 2016 and 2017?
How would the legal system have dealt with youthful offender : A young person is caught stealing a bicycle-the individual's first criminal offense. How would the legal system have dealt with the youthful offender.
Identify the status offense laws that are being violated : In a list that you make in your report, specifically identify the status offense laws that are being violated by each of the underage teens.

Reviews

Write a Review

Other Subject Questions & Answers

  Construct a b+ tree for the given set of key values

Construct a B+ tree for the following set of key values under the assumption that the number of key values that fit in a node is 3

  Which of the following is the best example of theory

POLI 330 : Which of the following is the best example of theory? Which political science subfield studies the interface of politics and economics?

  How you prepared yourself for the interview

Now that you have completed your in-person or digital mock interview, please provide a minimum of a one-page, single-spaced document that reflects the following

  Deficiency that can overlap with pernicious anemia

What are the symptoms of vitamin B12 deficiency that can overlap with pernicious anemia?

  What is the most controversial statement you have heard

What is the most controversial statement you've heard? What is the most important ethical issue that the movie is addressing? Please explain.

  Evaluate approaches to the management of IT Security

CO4510 - Advanced Topics in IT Security Assignment - Research Paper. Evaluate approaches to the management of IT Security

  Do you agree with the change

According to the textbook, the Federal Disaster Assistance Act of 1950 (P.L. 81-875) defined the roles and responsibilities during natural disasters.

  How to interpret and act on the information that is provided

Teaching slides (one to three slides): Prepare slides that contain important points about the app that you want to teach to the patient.

  What career do you find the most interesting

Think about the types of careers available in the homeland security field. Vsit the Justice Community, and explore the career search links listed there.

  How does it fit with a total quality philosophy

How would you respond to someone who says, "I think all of my people are pretty good, if I fire the bottom 10 percent that would just give me a new bottom 10 percent - Where does it end?"

  How does the interview contribute to the assessment process

Why is a clinical interview necessary as an initial component to the assessment process? How does the interview contribute to the assessment process?

  What are your legal rights

What are your legal rights? What are the rights of your 4-year-old son? Give all the Laws that might apply to both parties. What services should be available?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd