I have read Tom’s book, “PHP & Mysql: Novice to Ninja - Ed 6”.
I’m “OK-ish” with the code: I get it… 90%.
I’m struggling with taking this framework and using it on my first “other” site. It’s actually a redesign of an existing ASP.NET site and is not that complex. If anything, Tom’s Joke site is more complex (and perhaps that’s why I’m struggling - it’s dumbing Tom’s work down that is causing problems for me).
If I were to provide the basic requirements for the new site, I’d be really grateful if anyone could help just to point me in the right direction of how to begin bolting on a new project to the generic framework. Really grateful!
What follows is actually NOT the site I need to build but I’m using this example so that I can really simplify the design for you guys to understand it without having to read a LOT of code and description. The logic is exactly the same however.
Imagine I run a restaurant:
-
I employ 3 chefs: chefA, chefB, chefC.
-
I offer the usual 3 courses: starter, main, dessert.
-
I have customers who want to use the website to choose 3 courses by the SAME chef. (Yeah, odd in this context; not in the actual site I’m designing. Bear with me… :))
So, database tables:
“chefs”
chefId, chefName
1, chefA
2, chefB
3, chefC
“meals”
mealId, mealName
1, Avacado Toast
2, Prawn Cocktail
3, Sirloin Steak
4, Sea Bass
5, Banoffie Pie
6, Ice Cream
“chefMeal”
chefId, mealId
1, 1
2, 1
2, 2
3, 2
1, 3
1, 4
2, 3
3, 4
etc
Easy enough so far. Here’s what I need:
I need to adjust Tom’s Joke site so that my site has 3 navigation links in the navbar: Chef A, Chef B, Chef C
When the visitor clicks on Chef B, say, they get a submenu which looks something like this:
Chef A Chef B Chef C
Starters Starters Starters
Avacado Toast Avacado Toast Prawn Cocktail
Prawn Cocktail
Mains Mains Mains
Sirloin Steak Sirloin Steak Sea Bass
Sea Bass
Desserts
etc...
(Any help with nice RESPONSIVE code for this menu would by great) BUT my main issue is… let’s get back to Tom’s framework/Ninja and project/Ijdb. I’m a bit messed up with what I need: I’ve got instances of DatabaseTable, I’ve got Controllers, I’ve got Entities, I’ve got Templates all going round and round in my head.
My site requires NO logging in. My site has NO permissions system. Everything is available to everybody.
OK, a long post. Apologies for being new to this and deeply confused. I’m not asking for huge amounts of code written for me. No, not at all. I’d just appreciate some pointers, some "if you don’t need logins and permissions, strip that out by doing X, you WILL need (of all the things going around in your head, Y and Z).
Can anyone help a newbie?
Thank you.