Blog Site II Complete coding displayBlogContents in the file blog_db_interface.php error processing (in the catch clause) for both Register_parser.php and Blog_user.php in the catch clause you need to...

1 answer below »



Blog Site II







  • Complete coding






    • displayBlogContents in the file blog_db_interface.php





    • error processing (in the catch clause) for both Register_parser.php and Blog_user.php






      • in the catch clause you need to return the user interface to a known state by serving up an html file such as user.html







Notes:





The source files will

serve

up one of the four HTML contexts (login.html, admin.html, user.html, register.html). The expected HTML transitions are highlighted in

red



o

Correct execution



o

Errors: Grading will examine the processing of all errors from all API calls





All errors should result in an Exception being thrown





All catches of thrown errors should print the error message and then serve up the next appropriate HTML context





Work that has not been assigned but needs to completed is

highlighted in yellow


o

The biggest addition in functionality will be the display of blogs such that one can be


selected for viewing and the subsequent display of the selected blog





New HTML Context: Display Blogs





NOTE: This html context will be created by your PHP code





New HTML parsing code: Display Blogs





NOTE: The parser will be a new file that you write





New (or altered) method to select a blog





New method in

Blog_db_interface.php: to display blog’s content







blog site II Database Websites Blog Site II ● Complete coding ○ displayBlogContents in the file blog_db_interface.php ○ error processing (in the catch clause) for both Register_parser.php and Blog_user.php ■ in the catch clause you need to return the user interface to a known state by serving up an html file such as user.html Notes: • The source files will serve up one of the four HTML contexts (login.html, admin.html, user.html, register.html). The expected HTML transitions are highlighted in red o Correct execution o Errors: Grading will examine the processing of all errors from all API calls ▪ All errors should result in an Exception being thrown ▪ All catches of thrown errors should print the error message and then serve up the next appropriate HTML context • Work that has not been assigned but needs to completed is highlighted in yellow o The biggest addition in functionality will be the display of blogs such that one can be selected for viewing and the subsequent display of the selected blog ▪ New HTML Context: Display Blogs • NOTE: This html context will be created by your PHP code ▪ New HTML parsing code: Display Blogs • NOTE: The parser will be a new file that you write ▪ New (or altered) method to select a blog ▪ New method in Blog_db_interface.php: to display blog’s content Filename Functionality Provided HTML Files (Functionality Provided) login.html Register New User Login Admin.html Display All Blogs Delete a Blog Logout (already implemented) User.html Display All Blogs Display All Bloggers Show All Blogs for a Blogger Create A Blog Logout (already implemented) Register.html Register a new user PHP Files to Parse the HTML Input Functionality Expected HTML context transitions (Serve) Login_parser.php Try/catch framework Instantiates login() class Register New User Serve: register.html User Login Calls login->aurhenticate Serve: user.html or admin.html On error: Serve: login.html Register_parser.php Try/catch framework Instantiates login() class Register User Calls login->register() API On Success: Serve: login.html On Error Serve: user.html (or whatever html file you think is appropriate) Blog_admin_parser.php Try/catch framework Instantiate class_DB_Interface Show All Blogs Calls class_DB_Interface-> blogPostsSummary Delete a Blog Calls class_DB_Interface-> allBloggers Blog_user.php Try/catch framework Instantiate class_DB_Interface Display AllBlogs Calls class_DB_Interface-> admin_blogPostsSummary Delete a Blog Calls class_DB_Interface-> admin_deleteBlogPost DisplayBloggerBlogs && Select Display Selected Blog Content Submit_Blog Calls class_DB_Interface-> insertBlog On success: Serve: user.html (go back) On error Serve: user.html html (or whatever html file you think is appropriate) Classes Login.php Methods 1. Authenticate 2. Register Blog_db_interface.php Methods 1. admin_blogPostsSummary 2. admin_deleteBlogPost 3. blogPostsSummary 4. allBloggers 5. blogPostsByBlogger 6. insertBlog 7. searchByDate 8. display selected blog Miscellaneous Files write_password_hash.php Sources provided Blog_exception.php Exception class extension Password_has_pairs.txt MySQL Workbench File Blogdb.mwb Schema Provided 4
Answered 8 days AfterAug 14, 2022

Answer To: Blog Site II Complete coding displayBlogContents in the file blog_db_interface.php error processing...

Manikandan answered on Aug 17 2022
60 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here