Day 1: Planning

Today was a short day, this was primarily due to me formatting my computer. I decided that I needed a clean workspace to begin my challenge (free from any distractions or other websites I have been working on - they are now safely sitting on my portable hard drive to far away to consider picking up again).

So while I was going through the painful process of reinstalling and updating everything again, I started to plan the layout and schematics of the site. It was just last year that I actually learned what an object was, and it was only this year that I learned how to correctly use them. Up until then I was using a single functions file with everything in it, and when I first learnt about objects I had a single object that contained everything.

Maybe it's the fact that I was taught objects in Java, but I now have an object for the different parts of the site (there is an object for a member, an object for a cookbook, for a recipe, for an ingredient, for a method, etc...). I have no idea if this is common practice in PHP files, but I think it works well for keeping clean and separate code. I'm sure any computer science teacher (or experienced programmer for that matter) would tell you to plan out your program in UML files or something first, but considering that I am working on this by myself, and I have no idea how the program will turn out in the end I've decided to skip that part and launch straight into the code.

Instead, I mapped out what the key objects would be in this website:
  • Member - Containing a users details
  • Cookbook - Think of this as a playlist (or array) of recipes
  • Recipe - This contains the name, picture and other metadata about the recipe
  • Ingredient - Each recipe has multiple of these
  • Method - Each recipe has multiple of these too
From there I moved onto the design of the site. I like to keep the design as the centerpiece of the site, because any flaws and imperfections with code can be hidden through the design. I like to come up with a design first and then build the content around it. Sometimes this works out poorly, but most of the time this works out for the better, because you get the data supporting the User Interface  (other than the User Interface supporting the data). I believe that a User Interface should be simple (easy to navigate and user), consistent (look and act the same across phones, tablets and computers) and sleek (looks good).

I usually shy away from blue as a colour scheme, because I think they are overused but for a cooking site I feel that blue is appropriate. Logging in to Kuler I found this theme that I liked but I'm sure it will change at least ten times before I finish with the website. Inspired by Twitter's settings page, I came up with this design:


This allows me to give a consistent look throughout the site (recipes, cookbooks and members all have a thumbnail or avatar on the left hand side) while the button (or buttons) on the right hand side give quick access to common tasks. With this basic design complete, I now needed to populate the site with some sample data.