Folder structure: Part 2
Introduction
Remember… we want your Git projects to NOT be in a cloud storage folder like Google Drive or Apple storage or whatever. So, if you haven’t untangled that yet, you’d better just step up and get it sorted!
OK. This about 1/3rd of the way through the course and we’ve moved on to the first phase of using PHP.
You'll probably have something like this brewing
[pe-projects]
- header.php (global partials)
- footer.php
- index.php (the landing page, right?)
- about.php
- contact.php
- goals.php (straight to the page)
- projects.php (index for the links to projects)
- responsive-layout-garden.php (can show off all the individual modules)
- archive.php (index for the links to old projects)
- [resume]
- index.php (example of using a parent folder) /resume
- [modules]
- module-one-name.php (reusable modules)
- module-two-name.php
- [styles]
- reset.css
- setup.css
- structure.css
- typography.css
- colors.css
- etc.css
- site.css (where you import all the partials)
- [images]
- cat.png
- [projects]
- [project-a]
- whatever it needs to be
- [project-b]
- whatever it needs to be
Things will naturally just keep getting added as we learn about more things.
It can feel like a mess! But there are actually very few files so far. So, if it’s feeling messy – you’ll need to spend a lot more time working with the files.
[pe-projects]
- header.php (global partials)
- footer.php
- index.php (the landing page, right?)
- individual-page-name.php
- [page-name]
- index.php (example of using a parent folder) /resume
- [modules]
- graphic-diptych.php (reusable modules)
- projects-grid.php
- module-three-name.php
- [forms]
- index.php (a list of links to each of the forms)
- counting-characters.php
- saying-hello.php
- form-three-name.php
- [styles]
- partial-one.css
- partial-two.css
- site.css (where you import all the partials)
- [images]
- cat.png
- [projects]
- [project-a]
- whatever it needs to be
- [project-b]
- whatever it needs to be
We’ll remove all the specific pages and just talk about the folders and the types of files
By the time you’re seeing this resource, it’s been at least a month since we introduced MAMP and PHP includes/partials.
The time is now
Make sure you get really really comfortable with all of this. It’s really important for later. But also – in the very near future, we’re going to be drastically changing how this will work. Make sure you are feeling near “mastery” level of understanding of this — while you can.
What can PHP do?
Are you trying all of it? Are you adding all of these ideas into your personal site?
-
Partials (breaking up files for reuse)
-
Variables (to store data for reuse)
-
Strings (to store text)
-
Basic math and comparisons
-
Templating tools like echo
-
Conditional logic structures (like if and else)
-
Arrays of data (for basic lists)
-
Associative arrays (for more complex data concepts)
-
Control structures (like foreach for repeating programs)
-
Built-in functions ( like count() or empty() )
-
Your own custom functions (to encapsulate programs for reuse)
-
Complex built-in functions like date() or date_create()
-
Forms (for user input)
-
What else have you implemented?