Ask Question, Ask an Expert

+61-413 786 465

info@mywordsolution.com

Ask Programming Language Expert

World Wide Web Technology

Assignment- Microblog-

Introduction

This is an individual assignment in which you are required to develop a dynamic web application as described below using PHP, MySQL, JavaScript and CSS.

Details of the weight of the assignment and due date are given in the course description.

Task Description

Application

For this assignment, you will create a web-based microblogging platform, similar in functionality to -Twitter-. You will have to come up with your own fancy name.

Database Structure

The web application uses a relational database to create a micro-blogging platform. The database has the following structure:

User(id, name, email, password)

Post(id, user_id, post_date, in_reply_to, text)

Follow(user_id, follower_id)

Each record in the Post table refers to a single post made by a user. Primary keys are indicated with underlines or bold formatting, and foreign keys are italicized.

The following constraints should be applied in implementing the application:

• The user_id and follower_id fields in the Follow table form a compound primary key, and both refer to the id field in the User table. The user id field should be an integer primary key, and should automatically increment.

• The post_date field may be stored as either strings, or using MySQL datetime types, and must include time as well as date.
Insert file name here

• The text field in the Post table should be limited to 160 characters.

• The in_reply_to field in the Post table is a nullable foreign key that refers to the id field on the same table. If this field is null, then the post is not a reply to another post - if it is non-null then the post is a reply to the post with the matching id.

• The password field should be a VARCHAR field of at least 125 characters. The name and email fields should be VARCHAR of a length that you determine to be reasonable and sufficient.

Initial data

When the database is created it should be populated with data of your own invention. Include this data as part of your written report. Each table should have between 3 and 6 records initially.

Include yourself as a user, using your student id as the name, and your real email address. Invent other users as necessary - perhaps use characters from your favourite movie or band.

Creating the database

Create an SQL file that creates a database on the server, creates the three tables above, and populates them with your initial data.
Password data should be hashed using, at minimum, the crypt() PHP function. If available, prefer to use the PHP password_hash() function to generate password hashes. It is acceptable for all initial User records to share the same password for testing. Use of MD5 is not acceptable.
Include a user that can login as ‘tutor' with password ‘guest'.

Test your database by writing queries on the command line that display all initial data using SELECT statements, and include the queries in your report.

User accounts

Write an HTML form that allows new users to sign up. The form should request a username, email address and password. The password must be hashed before storing it in the database.

Using PHP, validate that the username is unique, and the password is at least 5 characters.

Write PHP code to allow users to log in and log out. This will require the use of sessions or cookies.

Global timeline

Write PHP and HTML code to display a list of the last 10 posts from all users, sorted in descending date order - that is, the most recent posts are at the top. This timeline of posts should be visible to anybody without logging in.

If posts are in reply to another post, include a link to the original.

Creating posts

Logged-in users should be able to create new posts. Write PHP code to support this. Use both PHP and Javascript to limit the length of the post to 160 characters.

Following

Write HTML and PHP code to allow logged-in users to follow other users. This should create a new entry in the Follow table. This may require you to create a way to view an individual user, or list of all users.

Users who are logged in should see posts only from users that they follow, instead of the global timeline. This list should again be limited to the last 10 posts.

Replying

Create a link on each post that allows a logged-in user to reply to a post. This should allow them to create a new entry in the Post table, with the in_reply_to foreign-key field set appropriately.

Aggregate data

Complete the following using SQL aggregation such as COUNT and SUM, subqueries or nested SELECT statements, inner joins and (left or right) outer joins.

• Create a page that contains a list of the top 10 most-followed users, with their number of followers ordered in descending order. Similarly create a page that contains a list of the top 20 most popular posts by number of replies.

• For each post in the timeline that has replies, display the number of replies with the post.

• Display the number of posts that have been made in the last 24 hours at the top of the global timeline.

Additional task for Students

On the topic of "Database Sharding" identify four (4), relevant, independent resources. Use these resources to write a discussion of the advantages and limitations of database sharding, where it is appropriate to use, and alternatives. Write this in your own words, and take care to cite appropriately. Word count should be about 500 words.

Note: Wikipedia is not a suitable resource, but may be used to get an overview of the subject

Further details

Documentation

Include a written report containing:

• Initial data details

• The SQL queries you used to test your database

• A list of parts of the assignment you have completed or not completed.

• Details of specific assistance you received from people other than your lecturer or tutor, and the names of those assisting.

Assignment support

This assignment is supported by the first 5 lectures and the first 6 labs. Work on the assignment should be spread over a number of weeks after the relevant lab has been mastered.

Refer to the Course Description for details of submission to Moodle, late assignments, extensions, special consideration, plagiarism, student support, presentation of academic work and adopted reference style.

Programming Language, Programming

  • Category:- Programming Language
  • Reference No.:- M91401834
  • Price:- $150

Priced at Now at $150, Verified Solution

Have any Question?


Related Questions in Programming Language

Task - hand execution of arraysoverviewin this task you

Task - Hand Execution of Arrays Overview In this task you will demonstrate how arrays work by hand executing a number of small code snippets. Instructions Watch the Hand Execution with Arrays video, this shows how to ste ...

Assignmentquestion onegiving the following code snippet

Assignment Question One Giving the following code snippet. What kind of errors you will get and how can you correct it. A. public class HelloJava { public static void main(String args[]) { int x=10; int y=2; System.out.p ...

Assignment - proposal literature review research method1

Assignment - Proposal, Literature Review, Research Method 1. Abstract - Summary of the knowledge gap: problems of the existing research - Aim of the research, summary of what this project is to achieve - Summary of the a ...

Task working with arraysoverviewin this task you will

Task: Working with Arrays Overview In this task you will create a simple program which will create and work with an array of strings. This array will then be populated with values, printed out to the console, and then, w ...

Task arrays and structsoverviewin this task you will

Task: Arrays and Structs Overview In this task you will continue to work on the knight database to help Camelot keep track of all of their knights. We can now add a kingdom struct to help work with and manage all of the ...

Assignment task -q1 a the fibonacci numbers are the numbers

Assignment Task - Q1. (a) The Fibonacci numbers are the numbers in the following integer sequence, called the Fibonacci sequence, and are characterised by the fact that every number after the first two is the sum of the ...

Assignment - horse race meetingthe assignment will assess

Assignment - Horse Race Meeting The Assignment will assess competencies for ICTPRG524 Develop high level object-oriented class specifications. Summary The assignment is to design the classes that are necessary for the ad ...

Task silly name testeroverviewcontrol flow allows us to

Task: Silly Name Tester Overview Control flow allows us to alter the order in which our programs execute. Building on our knowledge of variables, we can now use control flow to create programs that perform more than just ...

Overviewthis tasks provides you an opportunity to get

Overview This tasks provides you an opportunity to get feedback on your Learning Summary Report. The Learning Summary Report outlines how the work you have completed demonstrates that you have met all of the unit's learn ...

Php amp session managment assignment -this assignment looks

PHP & SESSION MANAGMENT ASSIGNMENT - This assignment looks at using PHP for creating cookies and session management. Class Exercise - Web Project: Member Registration/Login This exercise will cover adding data connectivi ...

  • 4,153,160 Questions Asked
  • 13,132 Experts
  • 2,558,936 Questions Answered

Ask Experts for help!!

Looking for Assignment Help?

Start excelling in your Courses, Get help with Assignment

Write us your full requirement for evaluation and you will receive response within 20 minutes turnaround time.

Ask Now Help with Problems, Get a Best Answer

Why might a bank avoid the use of interest rate swaps even

Why might a bank avoid the use of interest rate swaps, even when the institution is exposed to significant interest rate

Describe the difference between zero coupon bonds and

Describe the difference between zero coupon bonds and coupon bonds. Under what conditions will a coupon bond sell at a p

Compute the present value of an annuity of 880 per year

Compute the present value of an annuity of $ 880 per year for 16 years, given a discount rate of 6 percent per annum. As

Compute the present value of an 1150 payment made in ten

Compute the present value of an $1,150 payment made in ten years when the discount rate is 12 percent. (Do not round int

Compute the present value of an annuity of 699 per year

Compute the present value of an annuity of $ 699 per year for 19 years, given a discount rate of 6 percent per annum. As