Object-Oriented PHP
Object-Oriented Programming allows groups of people to work together more easily. By grouping data and functionality into objects we also provide a structure for testing individual pieces. In this 13-hour Track, you'll learn the modern approach to Application Development in PHP using Objects, Templates, Dependency Management and 3rd Party Packages.
We'll start things off by building a basic PHP website. The site, a media library, will allow you organize and display your Books, Movies and Music, and you'll learn how to use PHP to handle inventory, reuse code, and manage email and form data. Our course on $_GET and $_POST will follow afterward and show you how to use these commands to run PHP more efficiently.
Next, we'll dive headfirst into Object-Oriented PHP. Object-oriented programming lets us group data and functions into a specific topic or piece of functionality, which in PHP is called a class. We'll explore the ways a class allows us to work with data, and use this knowledge to build a simple cookbook app with recipes.
In the next part of the Track, we'll learn how to combine interface contracts with class hierarchy to leverage the benefits of each concept. Then we'll cover PHP7, basic exception handling, and dependency management. Finally, we'll learn about the Laravel framework and how to use it with PHP.
Let's master the basics of Object-Oriented PHP together!
-
An entry-level salary for the technologies covered in this track is about $60,000 / yr on average.
-
Some companies that use these technologies regularly include: Google, Facebook, Yahoo, YouTube, Wikipedia, Flickr, LinkedIn, Digg, Intel, Pinterest, and Twitter
Ready to start learning?
Treehouse offers a 7 day free trial for new students. Get access to 1000s of hours of content. Learn to code, land your dream job.
Start Your Free Trial-
- 2
- 3
Build a Basic PHP Website
This project will show you how to build a simple website using the PHP programming language. The web site, a media library, will let you organize and display your Books, Movies and Music. You could easily use this project to create a website that lets you organize and display any type of item: Branch Locations, Products, Services, Events, even Courses like we have here on Treehouse.
-
- 1
- 2
Working with $_GET and $_POST in PHP
This course will show you how to work with PHP Superglobals such as $GET and $POST while using a security-conscious mindset. External inputs, like HTML forms, are considered a security vulnerability so you should always filter inputs and escape outputs. Using PHP Superglobals when using external inputs such as HTML forms, cookies, sessions, and web servers will give you a security-conscious mindset that you can apply to all of your projects.
-
- 1
- 2
- 3
- 4
Object-Oriented PHP Basics
At a glance, object-oriented programming can appear to be far more complex than simple procedural, or inline, code. However, this doesnβt have to be the case. Because object-oriented programing is similar to the way human beings perceive the real world, using the object-oriented approach, can help you visualize the solution to a problem more easily. Object-oriented programming, or OOP for short, is a style of coding that allows developers to group similar tasks into containers. In PHP, containers are defined using classes. A class contains all the functions and variables that describe an object.
-
- 1
- 2
Extending Object-Oriented PHP
You should already be familiar with writing simple classes in PHP. In this course you will learn how extend the use of these classes to reuse code.
-
- 1
- 2
- 3
Designing Interfaces in PHP
An interface is a type of contract that assures that certain abilities are available on on a particular object class. We'll write and extend multiple interfaces, then implement them to design and match functionality. Interfaces do not store any implementation details themselves. To share implementation details between classes, we harness the power of inheritance. Abstract classes prevent a parent class from being directly instantiated, while at the same time defining methods that MUST be implemented in any extending children. This course will combine interface contracts with class hierarchy to leverage the benefits of each concept. We'll explain the differences between interfaces and abstract classes, and give you the knowledge you need to build and implement both in your own projects.
-
21 minWorkshop
Introduction to PHP7
It's an exciting time to be part of PHP. The release of PHP7 is just the tip of the iceberg. In this workshop we'll cover the top features and improvements to the language as well as some things to look out for when upgrading.
Viewed -
18 minWorkshop
Basic Exception Handling with PHP
Exceptions are the object-oriented approach to handling errors. An exception is an object that is βthrownβ by your application in the event that something goes wrong. They allow you to customize how a program handles errors, and gracefully degrades an application.
Viewed -
26 minWorkshop
Dependency Management with Composer
In this course we'll learn about packages, dependencies, repositories and versioning. We'll be using a PHP tool called Composer for managing all these pieces to work together with our application.
Viewed -
8 minWorkshop
Understanding MVC
Learn the concepts behind the MVC -- Model, View, Controller -- programming pattern and how it can help you build web applications more efficiently and reliably.
Viewed -
- 1
- 2
- 3
- 4
- 5
Laravel Basics
This course will show you how to build the Treehouse course catalog using Laravel, one of the most popular PHP frameworks. You could easily use this project to create your own basic Laravel application using the MVC design pattern.
-
Track Completion
This course includes:
- Build a Basic PHP Website 2 hours
- Working with $_GET and $_POST in PHP 44 min
- Object-Oriented PHP Basics 3 hours
- Extending Object-Oriented PHP 83 min
- Designing Interfaces in PHP 2 hours
- Introduction to PHP7 21 min
- Basic Exception Handling with PHP 18 min
- Dependency Management with Composer 26 min
- Understanding MVC 8 min
- Laravel Basics 78 min