Hello everyone!
Welcome to ITP 405 - Advanced Back-End Web Development! In order for us to hit the ground running on the first day of class, please read through this welcome page and do what is outlined beforehand.
All course content will be on this site at https://dtang.dev/teaching/2022/itp405/. Blackboard will only be used for grades and to access the Zoom meeting links for each class session. We will use the USC Viterbi School of Engineering Classes Slack workspace to communicate throughout the class, which you'll be invited to before the first day of class. Please upload a photo so I can put names to faces 🙂.
1. Object-Oriented Programming (OOP) in PHP
A basic understanding of OOP will be needed by Week 3.
Object-Oriented Programming (OOP) is a large topic on its own, and there are classes at USC dedicated to it. In order to work with most frameworks out there, you need to know the basics of OOP. If you're unfamiliar with the topic, please go through at least one of the following resources, which I have put in order of preference:
- LinkedIn Learning - PHP: Object-Oriented Programming. All USC students should have access to LinkedIn Learning.
- Read Chapters 1 and 2 of PHP Object Oriented Solutions by David Powers. You can find a link to the ebook in the syllabus, available for free to all USC students. Although this book is old, these two chapters provide a great foundation of OOP in PHP.
- For a quick blog post, read Object-Oriented PHP for Beginners.
- PHP OOP tutorial on W3 Schools
2. The Command Line Interface (CLI)
We will use the command line interface (CLI) in this class. Because I will be using a Mac, the CLI application that I will be using will be Terminal. If you're on Windows, check out the Learning Windows Terminal LinkedIn Learning course, which is available to all USC students.
I'd like everyone to be comfortable using the 3 following commands.
pwd
(Print Working Directory)cd
(Change Directory)ls
,ls -a
, andls -l
(List files and folders)
A Note on Shells for Mac Users
If you're on a Mac, you may need to change the default shell. A shell is an environment in which we can run commands and programs. There are different flavors of a shell, just as there are different flavors of operating systems. Each flavor of shell has its own set of recognized commands and functions. The shells on a Mac include:
- bash
- zsh (oh my zsh)
- ksh (KornShell)
- csh (C shell)
- tcsh (A decscendent of C shell)
The default shell on a Mac has been bash
. When macOS Catalina was introduced, the default shell was changed to zsh
. In this class, I am going to use bash
. If you're familiar with the CLI and zsh
, feel free to leave it, but I'm not certain everything will work as expected, like scaffolding a Laravel application with Laravel Sail, which you'll do after the first class. If you'd like to change your shell to bash
, check out the following article, which will show you how to change your default shell via the Terminal or through System Preferences.
How to Change the Default Shell to Bash on macOS Catalina
Introduction to the CLI
The CLI allows us to navigate our file system through commands as opposed to clicking on folders and files.
Open up your CLI. If you type pwd
and press return, you will see where you are currently at, referred to as the current working directory.
If you run ls
, you will see the folders and files listed in the current working directory. If you run ls -a
(the -a
flag stands for "all"), the list will include all hidden files and folders. Hidden files on a Mac start with a period. If you run ls -l
(the -l
flag will list the files and folders in long format), you will get more information about the files and folders being listed. You can combine the -a
and -l
flags by running ls -al
.
You can change directories using the cd
command. For example, if there is a folder called "Music" in my current working directory, I can run cd Music
. Now my current working directory is "Music". If I want to move up a folder, I can run cd ..
. The ..
means "move up a folder".
I have also created a Command Line Basics resource that may help.
3. Editor and Database GUI
- I will be using Visual Studio Code (often referred to as VS Code) as my editor, but you are welcome to use whatever editor / IDE that you like.
- Download TablePlus. This is a database GUI that we'll be using to administer Postgres databases on Heroku.
4. Create a Heroku Account
We will be using Heroku (the free tier) to deploy various projects and create databases. Please create an account.
5. Installing PHP
For the first week, we will be using MAMP as we review basic PHP and SQL. MAMP works on both Mac and Windows, although I've only used it on a Mac before. Please install it. Windows users, if you're having problems installing MAMP, try XAMPP or WAMP. These are similar to MAMP.
MAMP was initially created to get up and running with PHP and MySQL very quickly on a Mac. XAMPP was a similar project that was cross platform (hence the X). WAMP was a similar project for Windows. At some point, MAMP introduced Windows support.
6. Git, GitHub, and GitHub Classroom
In this course, we will be using Git and GitHub for class demos and to turn in assignments, the midterm, the final project. Go ahead and do the following:
- Create a GitHub account
- Install Git
- (Optional) I will be using Git from the CLI, but some students in the past have found the GitHub GUI to be helpful. This might be helpful for those who are less comfortable with the command line.
If you aren't familiar with Git and GitHub, please watch the following video that I recorded which covers the basics: https://youtu.be/oRynuxK2Noc.
If you'd like to learn more about Git and GitHub, check out the following course on LinkedIn Learning, which you should have access to as a USC student: Learning Git and GitHub.
I'd like you to be comfortable with the following:
- Creating a Git repository (
git init
) git status
- Staging files (
git add --all
) - Making commits (
git commit -m 'Some message'
) - Creating a repository on GitHub and pushing your local repository to your GitHub repository
.gitignore
files
Lastly, we will be using GitHub Classroom, which you'll use to create private repositories for your assignments and midterm that me and the TA have access to. Please watch this short video on it: https://youtu.be/EmoCNjEuOBY.
If you have any questions along the way, don't hesitate to reach out! Learning Git can feel pretty intimidating, but it is a crucial skill for developers.
You're all set!
Please reach out to me on Slack if you have any questions. See everyone soon!