Google rates websites on their length, meaning web developers now have to push to reduce the amount of code on their websites. Something that has proven worthwhile after research is to move all of the head information to a seperate file, this achieves two things. Firstly the site has a much smaller amount of code on it, which means its going to rank higher for seo and secondly, it is worthwhile because the time saved making the entire site adds up when you consider you only have to edit the head once to effect every page.
This is something I wanted to practise before creating my next project, so below is an example of this completed.
First the index.html file where the head holds the php include;
Secondly the head.php file which has all of the head data for the site;
Finally the stylesheet.css is connected through the head file;
This makes the website appear as normal, but the previously mentioned benifits.
Wireframes are an integral part of the design stage, these are all of the wirefreames that I created for the php based site. Take into consideration that because the designs were created for a php based site, the functionality came before design, therefore the design is nice and simple to allow me to spend the majority of my time spent coding on the technical php.
The main part of this assignment was learning what the different code did. Understanding the different methods of bringing data from a table and presenting it properly on thew website was the main thing that I learnt.
My first attempt at a thematic php website was the following website.
This was a template of a table that contained the content
My next attempt was to use the previous method but lay the content out slightly differently.
You can see that I have removed the content from the table and gave it an improved structure using css.
My final attempt at the php Gallery feature was this one.
I was able to set up a database by myself and include the content entirely myself meaning I have at this point a much better understanding how the php works.
The next stage was to code and understand how a search function works, this was an easier concept for me to grasp.
You can see here a very basic example of a search function that I built.