Welcome to ITP 405 - Advanced Back-End Web Development! In order for us to hit the ground running on the first day of class, I want to take care of most administrative items and development environment setup beforehand.
All course content will be on this site. 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. You should be automatically added to the spring21-itp-405-32074 channel once it is created by the school.
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. I will cover the basic mechanics of it so that you can work with Laravel, but I highly recommend spending some time reading about the subject and tinkering around. It will make you a better developer. I highly recommend doing the following:
- 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.
- Check out this blog post: Object-Oriented PHP for Beginners.
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.
If you’re familiar with the Terminal and the following commands, feel free to skip this section.
pwd(Print Working Directory)
ls -a, and
ls -l(List files and folders)
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:
- 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. 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.
The Terminal allows us to navigate our file system through commands as opposed to clicking on folders and files.
Open up your Terminal. 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
-l flags by running
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.
- 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
We will be using Heroku (the free tier) to deploy various projects. Please create an account.
If you’re on Windows, check out Installing PHP on Windows. Be sure to install PHP 8.0.
We are going to install PHP via Homebrew, a package manager for macOS. If you don’t have Homebrew installed, head over to the Homebrew site and follow the instructions on the homepage. Once you’ve installed Homebrew, you should have access to the
Now that you have Homebrew installed, run the following:
brew update brew install php brew services start php
Restart Terminal. Run
php -v from the command line. You should see an output similar to the following:
The configuration files for PHP (php.ini and php-fpm.ini) can be found in
Composer is a command line tool to install PHP libraries, which are usually referred to as packages.
If you’re on Windows, head over to https://getcomposer.org/doc/00-intro.md#installation-windows and follow the instructions.
If you’re on a Mac, head over to https://getcomposer.org/download/ and follow the instructions.
Once you’ve done that, if you run
ls, you should see a
composer.phar file in the current working directory. Now run the following:
mv composer.phar /usr/local/bin/composer
composer from the command line. You should see an output similar to the following:
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, you may want to 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 (
- Staging files (
- Making commits (
- Creating a repository on GitHub and pushing your local repository to your GitHub repository
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 a developer.
Please reach out to me on Slack if you have any questions. See everyone on Tuesday, January 25th at 5pm! 👩💻👨💻