Tumgik
Video
youtube
Object Oriented Programming explained with PHP
The ability to separate something into objects is one of the most important skills when you create programs. In this tutorial we are going to create a Car and add some separated components.
Build Car class.
The Car class has the following properties: Color - which is fundamental for any object and Lights. The constructor of the require all fundamental parts and properties of the car. In this case the Lights are not fundamental, so we can add them on later phase to our objects. For now we allow adding of lights trough a method. We also allow changing of the color.
Car Components - Light class. As any object in the real world, the Car has many related components. In OOP separating the components into classes is a good practice. Lets crete the Light class.
Front left light and Front right light. The Car has many light - on the front, on the back, on the left and right side sometimes. We are creating a class that hold all kind of light in the car. In this case front lights. The both lights are required in class constructor because they are fundamental.
Add lights collection to the Car object. Now we have the lights collection and we can add them to the car. We gone use BMW object created earlier. Lets turn the left light ON and see what's happen.
Create Road class for multiple car objects. When you have particular class, you are able to create as much objects as you want. In this case we can create many car objects and attach them to the Road class as it in the real world - one Road has many cars.
0 notes
Link
Tumblr media
0 notes
Text
According to this model, I love books similar to this one.
PHP 7: Real World Application Development
Practical focus: The book contains interesting and useful examples that you can try instantly.聽
聽Area of application: The book shows how to build a Shop application, which includes many modules typical for modern web sites.聽
聽Difficulty: Basically, the book is not for beginners, but It will definitely take your attention, and you may go directly to the next level.聽
聽Up to date information: The book is based on PHP 7 and shares a lot of modern techniques, which are the Design patterns, for example.
Rise your PHP knowledge with the leading education elements
Many novice web developers have difficulty starting to learn PHP. It is normal when there is too much information on the Internet.聽
As a web developer with 15 years of experience, I want to share some tips in this regard that may be useful to you in learning PHP. The primary criteria in the study of this type of technology are:
Practical focus聽-聽exercises and tasks are an excellent way to remember what you have learned and see your new skills in action.
Area of application - There is no point in learning something if we do not know its use. The training material should contain enough examples to help us think not only as programmers but also as consultants and experts.
Difficulty - It is hard to learn to paint if we still do not know how to understand the different types of colors. The training materials must match our knowledge so that we can have the right foundation when creating new sites and applications.
Up to date information - The technologies are growing and changing every minute. They are evolving, and their role is to make it easier for us and save time. Training materials must be in line with current technological trends.
2 notes View notes
Text
Rise your PHP knowledge with the leading education elements
Many novice web developers have difficulty starting to learn PHP. It is normal when there is too much information on the Internet.聽
As a web developer with 15 years of experience, I want to share some tips in this regard that may be useful to you in learning PHP. The primary criteria in the study of this type of technology are:
Practical focus聽-聽exercises and tasks are an excellent way to remember what you have learned and see your new skills in action.
Area of application - There is no point in learning something if we do not know its use. The training material should contain enough examples to help us think not only as programmers but also as consultants and experts.
Difficulty - It is hard to learn to paint if we still do not know how to understand the different types of colors. The training materials must match our knowledge so that we can have the right foundation when creating new sites and applications.
Up to date information - The technologies are growing and changing every minute. They are evolving, and their role is to make it easier for us and save time. Training materials must be in line with current technological trends.
2 notes View notes