Programme |
Diploma in Computing and Systems Development |
Unit Number and Title |
Unit 35 Web Application Development |
QFC Level |
Level 5 |
According to the case study, we have incorporated 6 modules in the application.
Storyboard of the Sea Side South Park website:
Currently this website design lacks help page, news page and famous festivals in the city page. These can be added later to make it more comprehensive.
We have developed this web application by making use of PHP, mySQL and Joomla CMS.
PHP (Hypertext preprocessor) language (server side scripting) has been used to develop the frontend functionality of the application. It which is used to add basic functionality to the web pages like adding shopping card, displaying content on web pages, adding, removing, updating content from web pages, search across the web pages.
We have also made use of Joomla content management system.
Joomla is easily extensible and built on model view controller development framework. It assists in making highly interactive online web applications like government websites, news and blogs, small business sites with secure logins. Therefore there is inbuilt security in these sites, therefore less chances of getting hacked.
Database has been stored in MySQL. Javascript, HTML, CSS (client side scripting) have been used to include validations into the website.
(TERM/J/Joomla.html, 2015)
Screenshots of the database are discussed in point 3.2 below.
According to the requirements for website of Sea Side South Park:
Considering the existing structure of the system we can make the following enhancements in our website:
Screenshots for Sea Side South Park website are as follows:
Screenshots of database are as follows:
We need to handle the errors that occur in our application program efficiently. The anticipation, detection and resolution of errors in our programming code or software application is called error handling. Every high level programming language has its own criteria of handling errors. Error handling in PHP is very simple.
(definition/Web-application-Web-app, 2015)
Error handling mechanisms in PHP:
By the use of ‘die’ statements and custom error handlers
<?php
$file=fopen("first.txt","h");
?>
If the above file does not exist we will get an error message like –
Warning: fopen(first.txt) [function.fopen]: failed to open stream:
No such file or directory in D:\PHPn\TEST.php on line 2
To prevent such messages in our program we must modify our code as:
<?php
if (!file_exists("first.txt")) {
die("File not present");
} else {
$file=fopen("first.txt","h");
}
?>
Now if we execute the above code we will get an error message like – ‘File not present’.
The execution of script is halted when errors occur in this new code; therefore this is an efficient method of using error handling mechanism.
PHP programming code allows us to specify the intensity of errors that occur in the application by the various reporting error levels. These are used along with the code as part of error handling process.
Level of Error |
Description |
E_Error |
This level indicates fatal errors, execution of script is halted. |
E_Warning |
Execution of script is not halted as these are run time warnings. |
E_Notice |
This is prompted at run time and indicates that some error like thing has appeared but execution of script is not halted. |
E_Deprecated |
These are also run time notices that indicate about code that will not work with future versions of PHP. |
E_strict |
These are some changes that have to be done to PHP code to make it compatible with future versions of PHP. |
E_User_Error |
This is similar to E_error but is user generated , except that it is generated by PHP function. |
E_User_Warning |
This is user generated warning message, similar to E_Warning, except that it is generated by PHP function trigger_error() |
E_User_Notice |
This is a notice message generated by user, similar to E_notice, except that it is generated in PHP code using PHP function trigger_error() |
E_User_Deprecated |
This message is like E_Deprecated, generated by PHP function trigger_error() |
E_All |
This enables all PHP errors, notices and warning except E_Strict in PHP version before PHP version 5.4 |
All these error levels are used in PHP code along with exception handling code blocks to handle errors. These error levels are used along with the custom error handlers. Consider this code -
<?php
$number = 9;
if ($number > 1) {
trigger_error('Value of $number must be 8 or less', E_USER_NOTICE);
}
We make use of error handlers so that errors are displayed along with custom messages. Errors are also raised using throw and caught by try/catch blocks
Along with these, there are some custom error handlers associated in PHP Programs. These are:
Value |
Constant |
Description |
2 |
E_WARNING |
These messages are prompted for non-fatal run-time errors. Script execution is not stopped. |
8 |
E_NOTICE |
These messages pop up for notices at run time. When the script finds something that might be an error these are prompted, but this could also happen when the script is running normally |
256 |
E_USER_ERROR |
This is fatal error generated by user. PHP function trigger_error() sets this E_ERROR. |
512 |
E_USER_WARNING |
These are warning messages which are non-fatal but user-generated warning. By making use of trigger_error() function, user can set these warning messages. |
1024 |
E_USER_NOTICE |
These are user-generated notices. These warning messages are set by users and are similar to E_Notice. |
4096 |
E_RECOVERABLE_ERROR |
These are fatal errors which can be caught and recovered. These are like E_error but can be caught by a user defined handle (see also set_error_handler()) |
8191 |
E_ALL |
This enables all errors and warnings in PHP (E_STRICT became a part of E_ALL in PHP 5.4) |
For complete copy of this solution, order for Assignment Help
Details
Other Assignments
Related Solution
Other Solution