Instructions
User Manual: Pdf
Open the PDF directly: View PDF
.
Page Count: 1
| Download | |
| Open PDF In Browser | View PDF |
Technical test The aim of the test is to produce a system capable of loading, modifying and saving some data using PHP, HTML and JS. You should use best-practices where appropriate, ensuring that you separate your presentation and logic and that your code is modular where possible. Step 1 - Load and save data 1.1 Modify the given "index.php" file to submit the info to "save.php". 1.2 Make a file "save.php" to write the submitted data (from step 1.1) into a PHP-serialized string, and save it to a file "data.ser" on the server. Use a model class to do this, with “save” and “load” methods. 1.3 Create a new class by extending your model class, and make the new class able to represent an additional “job_title”. 1.4 Modify index.php so that it reads the data from "data.ser" via the extended model, and displays it in the webpage. 1.5 Modify “index.php” and “save.php” to also allow the person’s job title to be saved and edited. At the end of step 1 save a copy of your working directory as “Step_1” (it should contain lib, public etc). To assist in this step, the following URLs may be useful: http://uk.php.net/serialize http://php-html.net/tutorials/model-view-controller-in-php http://en.wikipedia.org/wiki/Model–view–controller Step 2 – Using AJAX Start with the code written during Step 1 ensuring that you have made a copy of it, i.e. Step 2 will refactor the code written during step 1. 2.1 Make a file "data.php" which can read the data from "data.ser" and expose it via a JSON structure of your choosing 2.2 Modify "index.php" so that the form loads the JSON information from "data.php" via an AJAX request 2.3 Modify "save.php" so that it can receive submitted information via a JSON string in the request body (from "php://input") 2.4 Modify "index.php" so that when the "Save" button is pressed, an AJAX request is made to save the information to "save.php" * To assist in this step, "index.php" has jQuery included - the following URLs may be useful: http://api.jquery.com/jQuery.getJSON/ http://api.jquery.com/jQuery.post/ http://php.net/manual/en/wrappers.php.php (php://input) On completion of the above steps, or after the allotted time is up, zip the entire contents of your directory and send the file back via email. Don't worry if you don't finish all of the steps, we're more interested in how you do the steps which you do complete. Bonus: For extra credit, add some unit tests as appropriate.
Source Exif Data:
File Type : PDF File Type Extension : pdf MIME Type : application/pdf PDF Version : 1.5 Linearized : No Page Count : 1 Language : en-GB Tagged PDF : Yes Author : Kevin Creator : Microsoft® Office Word 2007 Create Date : 2010:05:28 10:58:56 Modify Date : 2010:05:28 10:58:56 Producer : Microsoft® Office Word 2007EXIF Metadata provided by EXIF.tools