Advanced Web Programming
24 April 2016Since January we have worked on both the Main multimedia project (FYP) and the website designed for the Emerging Web Technologies module (Grove Gazette).
Our Advanced Web Programming module project for this semester will have us add functionality to the Emerging Web Technologies website.
The past few weeks in Advanced Web Programming Class has been spent introducing us to Code Igniter. Code Igniter allows a user to view Create, Read, Update and Delete from a website's database. It does this through the MVC framework (Model,View,Controller ).
At no point does a user deal directly with the database. The Controller file hosts a list of functions with which it communicates between the Model and the View.
Here is an example of code used in the Controller file which allows a user to register with the website. In effect the details inserted will be added to the database.
This function takes the information inserted into the HTML form and and using the 'post' method, places it in the database table with the corresponding column names.
The function sends the data to the Model file to do the insertion to the database using the 'insertuser' function located in the Model File. It also asks the Model to determine if the insertion was successful or not ($flag)
public function registerUser(){
$user = array(
'username' => $_POST['username'],
'password' =>$_POST['password'],
'firstname' => $_POST[firstname'],
'surname' => $_POST[surname']
);
$flag = $this->User_Model->insertUser($user);
$this->(handleFlag);
}
This will be applied to my Grove Gazette site by allowing the user to register, login, edit and update their details, upload articles with images, edit articles and delete articles. The finished product should be a fully dynamic website.
Getting Creative with Multimedia Programming - Code Igniter will be used to create a dynamic website.
We will apply the same process to the Main Multimedia project also. So the user can register, log on, edit / update details, upload images, share images to a school page.
So there is lots and lots to do!
Code Igniter will add dynamic functionality to the Main multimedia project - We can really get creative with our coding now! |