PHP Tutorial - object-oriented programming: basics & practice
- 88 lessons in 10 hours of video training on object-oriented web programming with php
- From the basics to practice and as a bonus a complete HTML/CSS template
- From Jan Brinkmann, a passionate developer with over 15 years of web and app experience
Learning languages has never been so easy! Let the php tutorial show you how to create your website based on object-oriented programming.
88 Videos, 593 minutes
Intro to the video training
This is what you can expect in the video training "PHP Tutorial - Object-Oriented Programming: Basics & Practice"
1 minYou can expect a php tutorial on object-oriented programming - basics and practice.
Introduction to the course
Object-oriented web programming with php - 1.01 Welcome to the course
2 minWith all my heart: Welcome to the course! Here is an overview of what you can expect.
Object-oriented web programming with php - Install 1.02 development environment
4 minLet's start by setting up your development environment. You can find the necessary software here.
Object-oriented web programming with php - 1.03 Which editor should I use?
2 minWhich editor is the right choice for the examples? You can find the answer here.
Object-oriented web programming with php - 1.04 Open and execute examples
2 minI work with PhpStorm in the course. In this lesson, I will show you how the examples can also be opened with other editors.
Object-oriented web programming with php - 1.05 Preview: What you end up developing
2 minAre you already fully motivated? A little more after this video. A preview of the practical project.
Object-oriented web programming with php - 1.06 Changes in PHP 7
9 minSome things have changed in php 7. Here is an overview of some of the most obvious changes.
The fundamentals of object-oriented programming
Object-oriented web programming with php - 2.01 The object quiz
2 minTo make the basics chapter even more exciting, you can fill in a cloze text here. Download the template, print it out and edit it as you work through the chapter.
Object-oriented web programming with php - 2.02 Object orientation, what is it?
19 minThis is where you lay the important foundation, because objects are not just a collection of data and functions. An important introduction to the topic.
Object-oriented web programming with php - 2.03 What are classes?
9 minWhen talking about object-oriented programming, sooner or later the term "class" comes up. But what is it all about?
Object-oriented web programming with php - 2.04 Data encapsulation
4 minData encapsulation is an important basic principle. In this lesson, you will learn about the idea behind it.
Object-oriented web programming with php - 2.05 Abstraction
6 minWithout abstraction, your software would very quickly become rather confusing and the desired simplification would not be achieved. Watch this video and learn to think more abstractly.
Object-oriented web programming with php - 2.06 Inheritance
7 minInheritance also supports the architecture of your software. Learn to understand it and use it consciously.
Object-oriented web programming with php - 2.07 Polymorphism
7 minPolymorphism is best understood in practice. Nevertheless, you should at least have heard of it at this point.
Object-oriented web programming with php - 2.08 Solution for the cloze text
5 minHave you filled in the cloze conscientiously? Very good! You can now check it here.
Introduction to Object-Oriented Programming with PHP
Object-oriented web programming with php - 3.01 Classes in PHP
4 minFrom theory to practice. This is where you get started with the implementation of php.
Object-oriented web programming with php - 3.02 From class to object: with new
3 minA class is the blueprint for objects. In php, an instance is created with the keyword "new". You can learn how to do this here.
Object-oriented web programming with php - 3.03 Features
5 minThe properties of a class describe the object in more detail. Get to know this concept better.
Object-oriented web programming with php - 3.04 Constants
5 minThe constants are an additional option for storing static values. You will also learn about this principle here.
Object-oriented web programming with php - 3.05 Naming conventions
5 minThere are some generally accepted conventions or "best practices" for naming variables & co. And that's what we're talking about here.
Object-oriented web programming with php - 3.06 Values and references
7 minAre you familiar with the "PassByValue" and "PassByReference" principles? They are extremely important when working with objects. Find out why here.
Object-oriented web programming with php - 3.07 Exercise #1
3 minThe first introduction is over. Deepen your knowledge with the first exercise.
Object-oriented web programming with php - 3.08 Solution #1
5 minYou can find a possible solution to the task here.
Work with methods
Object-oriented web programming with php - 4.01 Methods in PHP
4 minNow you will learn the basic syntax for declaring functions.
Object-oriented web programming with php - 4.02 Setting parameters for methods
4 minMethods only become truly dynamic through parameters. You will also get to know these here.
Object-oriented web programming with php - 4.03 Return values of methods
4 minMethods can do more than just execute source code and generate output. Here you will learn how values are returned to the caller.
Object-oriented web programming with php - 4.04 Variable method names
3 minYou can store the method name in a variable before the call and continue to use the variable. Get to know this here.
Object-oriented web programming with php - 4.05 Validity scopes in objects
4 minThere are different areas of validity that you should know. Get to know them here.
Object-oriented web programming with php - 4.06 Exercise #2
3 minThe next exercise is coming up. This time, the topic is "Methods".
Object-oriented web programming with php - 4.07 Solution #2
6 minThe possible solution to the exercise on methods can be found in this lesson.
Working with objects
Object-oriented web programming with php - 5.01 The references $this and self
10 minWhen working with objects, the reference to the current object ("$this") and the reference to the current class ("self") play a special role. You will learn about both here.
Object-oriented web programming with php - 5.02 Create and destroy objects: construct/descruct
6 minYou can execute your own logic when creating and destroying objects. The constructors and destructors are used for this. Get to know the principle here.
Object-oriented web programming with php - 5.03 Using inheritance
10 minGet to know the syntax for inheritance in php here.
Object-oriented web programming with php - 5.04 The keyword parent
4 minIf you inherit from a class, you can use the keyword "parent" to refer to the main class. I'll show you how to do this here.
Object-oriented web programming with php - 5.05 Visibility of properties: public, private, protected
12 minVisibility is of central importance. Get to know the keywords "public", "private" and "protected".
Object-oriented web programming with php - 5.06 Visibility of methods
7 minVisibility does not only refer to properties. Here you also transfer the knowledge to methods.
Object-oriented web programming with php - 5.07 Defining interfaces
10 minInterfaces are an important stylistic device. In this lesson, you will look at them using an example.
Object-oriented web programming with php - 5.08 Static methods
8 minStatic methods also play an important role in our practical example. Learn more about the concept here.
Object-oriented web programming with php - 5.09 Abstract classes and methods
6 minAbstract classes and methods are another stylistic device for software architects. You also need to get to know them.
Object-oriented web programming with php - 5.10 Prevent overwriting with final
4 minA method may no longer be overwritten? Then make this visible with the keyword "final".
Object-oriented web programming with php - 5.11 Exercise #3
5 minDeepen your work with objects a little more in this exercise.
Object-oriented web programming with php - 5.12 Solution #3
6 minHere is the solution to the exercise.
Object orientation: advanced concepts
Object-oriented web programming with php - 6.01 Serializing data
8 minWhen objects are stored in text form or transmitted over the network, this is called "serialization". Learn how it works.
Object-oriented web programming with php - 6.02 Sleep and WakeUp during serialization
7 minSerialization does not always work properly, e.g. because a connection is not automatically re-established after reading in again. Learn how you can also intervene here.
Object-oriented web programming with PHP - 6.03 The magic method __invoke
5 minThe magic method "__invoke" allows you to call up your objects directly.
Object-oriented web programming with PHP - 6.04 Describing objects with __toString
4 minA widely used method is the readable description of objects using the magic method "__toString". I will introduce you to this in this lesson.
Object-oriented web programming with php - 6.05 Overloading with get, set & Co
7 minEspecially with a dynamic data model, you can use magic methods such as "get", "set" etc. to save work. save work. You often find this in practice and you need to know the technology behind it.
Object-oriented web programming with php - 6.06 Check type with instanceof
4 minFor example, certain classes are often checked in conditions. The keyword "instanceof", which you will now learn about here, helps you to do this in php.
Object-oriented web programming with php - 6.07 Using anonymous classes
4 minNewly introduced in php 7: anonymous classes. They can avoid unnecessary overhead in some situations. You can find a practical example in this video.
Object-oriented web programming with PHP - 6.08 Duplicating objects
2 minA copy of objects cannot be created via the variables. Only the reference is passed on. However, you can clone objects. Here you will learn what is necessary for this.
Object-oriented web programming with php - 6.09 Using exceptions
12 minExceptions are important in the object-oriented world, as error situations can be passed on across several levels and processed in the appropriate place. Learn to use them.
Object-oriented web programming with php - 6.10 Using type hints
4 minAlso new in php 7: type hints for scalar data types such as "string", "int" etc. Learn how to use them here.
Object-oriented web programming with php - 6.11 Return type of methods
3 minAlso new in php 7: the declaration of the return value of a method. Here I present the syntax for this.
Structuring projects
Object-oriented web programming with php - 7.01 Using autoloaders
8 minSo far, the examples have been very simple. In practice, the structure is more complex. This is where the autoloader plays a central role. Learn how to store it.
Object-oriented web programming with php - 7.02 A better structure
8 minIn this lesson, you will lay the foundations for a clean project structure.
Object-oriented web programming with php - 7.03 Even better with namespaces
5 minThe project structure is now being fine-tuned thanks to the namespaces. Get to know them here.
Object-oriented web programming with php - 7.04 Importing classes into the namespace
4 minWould you like to use classes from other namespaces? Learn how to import them here.
Design Patterns
Object-oriented web programming with php - 8.01 Singleton: only one instance
6 minOnly one instance of a class is created using the "singleton pattern". You can learn about the implementation here.
Object-oriented web programming with php - 8.02 Iteration: process all data
13 minDo you want to read all data from your own collection or class? An iterator will help you.
Object-oriented web programming with php - 8.03 Observer: Observe objects
14 minAn observer enables a very loose coupling between different parts of your application. Get to know this design pattern now.
Object-oriented web programming with php - 8.04 Factory: Minimize dependencies
10 minA factory creates instances of your classes. This minimizes dependencies and centralizes the calling of your constructors.
Image gallery according to ModelViewController
Object-oriented web programming with php - 9.01 Model-View-Controller overview
19 minGet to know the Model-View-Controller pattern before we dive into the practice.
Object-oriented web programming with php - 9.02 A demo in advance
3 minWhat happens here? Fill up on motivation and take a look at the end result in advance.
Object-oriented web programming with PHP - 9.03 The index.php as an entry point: Rewrite via htaccess
7 minA feature of our application: the central entry point. Here you provide the necessary framework conditions via the ".htaccess".
Object-oriented web programming with php - 9.04 Processing the URL: the bootstrap class
11 minThe URL processing and assignment of the correct class runs via bootstrapping. You create it here.
Object-oriented web programming with php - 9.05 Routing: Assigning controllers and actions
15 minThe requested resource is assigned to the controller and an action.
Object-oriented web programming with php - 9.06 The first controller and an action
6 minAfter the resources can be requested, you must of course also offer some. And this is exactly what happens here: via your first controller including action.
Object-oriented web programming with php - 9.07 Preparing the database structure
6 minA database structure is the necessary prerequisite for further use. It is now being prepared.
Object-oriented web programming with php - 9.08 Connecting the database using PDO
11 minIn php 7, the "mysql_*" functions no longer exist. Here you will get to know an object-oriented alternative: PDO.
Object-oriented web programming with php - 9.09 The view level of the gallery: view objects and templates
13 minThe appearance is of course still determined by HTML/CSS. Here you will learn how the integration can be realized.
Object-oriented web programming with php - 9.10 Design for the gallery
7 minThe design for the gallery view is taken from the template and then integrated.
Object-oriented web programming with php - 9.11 Retrieving the base URL
6 minYou will find a centrally accessible base URL in most frameworks. It can be configured, for example, or specified separately for protected pages such as the log-in (possibly with https). Learn how this can be implemented.
Object-oriented web programming with php - 9.12 Creating models using factory patterns
5 minYou have already become familiar with the "Factory Design Pattern". It is now also used here.
Object-oriented web programming with php - 9.13 Creating models for users
8 minA model is required before users can be loaded into the application. And this is exactly what is created now.
Object-oriented web programming with php - 9.14 Starting sessions: User login
13 minSessions are also supported by the gallery. The first step here is to implement the log-in.
Object-oriented web programming with php - 9.15 Working with the session: logging out and checking whether you are logged in
7 minAre you logged in? Would you like to log out again? Both functions are checked in this lesson.
Object-oriented web programming with php - 9.16 Log-in failed: Reading values from the session
3 minThe log-in has failed. Here you will learn how to read values from the session.
Object-oriented web programming with php - 9.17 Upload images: preparing the form
4 minAnother feature, new controller: process forms. This is where you make the preparations.
Object-oriented web programming with php - 9.18 Processing uploads
15 minThe upload must also be processed after the "POSTRequest". You will learn all the necessary steps here.
Object-oriented web programming with php - 9.19 Saving new images in the database
7 minA new image has been successfully transferred. A reference to this is recorded in the database.
Object-oriented web programming with php - 9.20 Transporting messages via the session
4 minHere you will learn how to manage the messages in the session even better.
Object-oriented web programming with php - 9.21 Scaling images
17 minThe uploaded images are scaled to a common denominator (same height).
Object-oriented web programming with php - 9.22 Exercise #4
3 minThe practical example is extended with a user login exercise.
Object-oriented web programming with php - 9.23 Sample solution #4
5 minYou can find a solution for task #4 here.
RESTful API
Object-oriented web programming with php - 10.01 The API controller with JSON template
9 minThe strengths of the MVC architecture are utilized and another controller with a different template is used for the same database logic.
Object-oriented web programming with php - 10.02 Enabling better routing: the configuration
8 minThe previously very static routing is optimized once again - with its own configuration file.
Object-oriented web programming with php - 10.03 Customizing bootstrapping
11 minThe adapted routing solution must now be taken into account in bootstrapping.
Object-oriented web programming with php - 10.04 Upload images via API
7 minIn order to be able to use the API, the images are uploaded via an iOS app.
Comment now „PHP Tutorial - object-oriented programming: basics & practice“