Join Jon Peck for an in-depth discussion in this video Why should you use object-oriented programming?, part of Object-Oriented Programming with PHP.
- View Offline
- Exercise Files
There are a number of very practical reasons for using object-oriented…programming, and not just because it looks good on paper.…The short reason? Object-oriented programming organizes projects into…consistent, manageable pieces.…As a developer, I've come to really appreciate well-organized code, as it…saves time and money.…In comparison, procedural programming is a set of step-by-step instructions that…the computer must follow.…A procedural program can consist of a series of conditions, and function calls…for logic, but the end result is very linear.…
Meaning, program execution is like a straight line,…rigid and inflexible.…There's nothing wrong with procedural programming, and for small projects, it…can be a good solution.…The problem comes when you scale up.…You may find yourself defining arrays with long descriptive keys, or passing…large numbers of global variables between scripts, or even searching for a…non-fatal bug across a dozen squares with thousands of lines of code with little…indication of which component is at fault.…
- Historical overview of object-oriented PHP
- Defining classes
- Creating a method/object context with $this
- Accessing classes without instantiation
- Creating a database class
- Extending and abstracting classes
- Cloning and comparing objects
- Error handling with exceptions
- Implementing design patterns, such as the factory and strategy patterns
Skill Level Intermediate
PHP with MySQL Beyond the Basicswith Kevin Skoglund10h 26m Intermediate
1. Introduction to Object-Oriented Programming
2. Creating Your First Object
3. Overloading with Magic Methods
Overloading property access6m 37s
4. Accessing Classes without Instantiation
5. Class Relationships and Interactions
6. Built-In PHP Objects
Customizing PHP exceptions4m 23s
7. Design Patterns
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.