Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Development Tools No-Code Development
Business
Entrepreneurship Communications Management Sales Business Strategy Operations Project Management Business Law Business Analytics & Intelligence Human Resources Industry E-Commerce Media Real Estate Other Business
Finance & Accounting
Accounting & Bookkeeping Compliance Cryptocurrency & Blockchain Economics Finance Finance Cert & Exam Prep Financial Modeling & Analysis Investing & Trading Money Management Tools Taxes Other Finance & Accounting
IT & Software
IT Certification Network & Security Hardware Operating Systems Other IT & Software
Office Productivity
Microsoft Apple Google SAP Oracle Other Office Productivity
Personal Development
Personal Transformation Personal Productivity Leadership Career Development Parenting & Relationships Happiness Esoteric Practices Religion & Spirituality Personal Brand Building Creativity Influence Self Esteem & Confidence Stress Management Memory & Study Skills Motivation Other Personal Development
Design
Web Design Graphic Design & Illustration Design Tools User Experience Design Game Design Design Thinking 3D & Animation Fashion Design Architectural Design Interior Design Other Design
Marketing
Digital Marketing Search Engine Optimization Social Media Marketing Branding Marketing Fundamentals Marketing Analytics & Automation Public Relations Advertising Video & Mobile Marketing Content Marketing Growth Hacking Affiliate Marketing Product Marketing Other Marketing
Lifestyle
Arts & Crafts Beauty & Makeup Esoteric Practices Food & Beverage Gaming Home Improvement Pet Care & Training Travel Other Lifestyle
Photography & Video
Digital Photography Photography Portrait Photography Photography Tools Commercial Photography Video Design Other Photography & Video
Health & Fitness
Fitness General Health Sports Nutrition Yoga Mental Health Dieting Self Defense Safety & First Aid Dance Meditation Other Health & Fitness
Music
Instruments Music Production Music Fundamentals Vocal Music Techniques Music Software Other Music
Teaching & Academics
Engineering Humanities Math Science Online Education Social Science Language Teacher Training Test Prep Other Teaching & Academics
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Cisco CCNA Amazon AWS CompTIA Security+ AWS Certified Developer - Associate
Graphic Design Photoshop Adobe Illustrator Drawing Digital Painting InDesign Character Design Canva Figure Drawing
Life Coach Training Neuro-Linguistic Programming Personal Development Mindfulness Meditation Personal Transformation Life Purpose Emotional Intelligence Neuroscience
Web Development JavaScript React CSS Angular PHP WordPress Node.Js Python
Google Flutter Android Development iOS Development Swift React Native Dart Programming Language Mobile Development Kotlin SwiftUI
Digital Marketing Google Ads (Adwords) Social Media Marketing Google Ads (AdWords) Certification Marketing Strategy Internet Marketing YouTube Marketing Email Marketing Google Analytics
SQL Microsoft Power BI Tableau Business Analysis Business Intelligence MySQL Data Modeling Data Analysis Big Data
Business Fundamentals Entrepreneurship Fundamentals Business Strategy Online Business Business Plan Startup Blogging Freelancing Home Business
Unity Game Development Fundamentals Unreal Engine C# 3D Game Development C++ 2D Game Development Unreal Engine Blueprints Blender
30-Day Money-Back Guarantee
Development Programming Languages PHP

Clean Code with PHP examples

Learn Clean Code to become a better PHP developer, write easy to maintain code and do better at interviews.
Rating: 4.3 out of 54.3 (39 ratings)
8,590 students
Created by Liviu Oprisan
Last updated 8/2020
English
English
30-Day Money-Back Guarantee

What you'll learn

  • How to write clean code in PHP
  • Why it's important to keep functions small
  • How to name variables, functions and classes
  • How many parameters a functions should have
  • How clean code affected MVC
  • How to beautify predicates
  • Why comments are bad and when you can use them
  • The difference between an OOP object and a Data Structure Object
  • Why composition is good and inheritance is bad
  • What are the symptoms of bad code
  • What state is and why it's important
  • Why your code should have low coupling and high cohesion
  • How to avoid spaghetti code
  • What are Command and Query separation, Tell Don't Ask and The Law of Demeter
  • How over-engineering is not a solution to bad code

Course content

4 sections • 25 lectures • 1h 54m total length

  • Preview02:48
  • Preview04:39
  • Looking at some code
    02:38
  • Empathy
    03:12

  • Small functions are easy to understand
    18:15
  • Preview07:20
  • How many lines should a small function have
    03:34
  • Single Responsibility Principle
    01:33
  • Levels of Abstraction - An MVC discussion
    11:42

  • Preview06:39
  • Preview04:10
  • Programming line length
    01:47
  • Preview01:03
  • Preview04:13
  • Should I use exceptions?
    00:32

  • Preview04:20
  • Preview05:16
  • Symptoms of Bad Code
    02:03
  • What is state in programming and why is it important. State and MVC.
    05:34
  • Low Coupling, High Cohesion
    07:28
  • Command and Query Separation, Tell Don't Ask and The Law of Demeter
    04:35
  • Test Pyramid and Test Driven Development
    03:50
  • Is over-engineering a solution to bad code? (spoiler: it isn’t)
    03:02
  • YAGNI
    01:51
  • Project
    02:03

Requirements

  • You have to know the basics of writing code in PHP

Description

This is a course about useful clean code principles.
My aim is to teach you concepts that you can use every time you write code.


Clean Code can help you:

- Write better PHP code and thus become a better PHP programmer

- Create easy to maintain projects

- Perform better during interviews by showing knowledge of advanced programming concepts


The course has PHP examples and I sometimes mention things like Symfony and MVC.


The course is structured in 4 parts:

1. Introduction - where we discuss what is clean code and why it's important

2. Small Functions - I gave small functions an entire section because I think its one of the most important principles of clean code, together with small classes, Single Responsibility Principle and Not crossing Different Levels of Abstraction.

3. Clean code: Fundamental Principles - I discuss here about fundamental things like method and variables names, parameters, comments and exceptions

4. Clean code: Advanced Principles - Here I talk about more abstract topics like the difference between an OOP Object and a Data Structure Object, Composition over Inheritance, Symptoms of Bad Code, State, Low Coupling - High Cohesion, Command and Query Separation, Tell Don't Ask, The Law of Demeter, YAGNI and more.

The course also contains some memes because you can't spell clean code without fun.

I tried to focus on things you can use every day when programming and stay away from barren theory.
There's no point wasting our time with useless knowledge that would just seem like it's helping you as a programmer, but that you will forget in 2 weeks.
If that would have been the point, this would be a 10 hours course about programming patterns.
But it isn't.

I tried to make the course full of useful information but not too long.
If you invest as little as two hours of your life in this course, about the time you would spend watching a movie, you will become a much better developer.

Who this course is for:

  • PHP developers

Instructor

Liviu Oprisan
Developer
Liviu Oprisan
  • 4.1 Instructor Rating
  • 155 Reviews
  • 28,487 Students
  • 4 Courses

I've been a programmer for thirteen years.
I have 10 years of PHP experience, 2 years of Java and C#, a year of Python, and nobody is safe from JavaScript.

I am a big enthusiast of Clean Code.

I'm also a big fan of SCRUM and how you can build motivated, happy teams around it.

I've worked on a lot of kind of projects.
From small to medium projects where I was the only developer to medium and big projects in teams of 30+ people.

Besides being a developer, on some projects I've also have the Scrum Master role, or led the process of applying Scrum inside the team.

I am currently writing mostly Java, and have certifications in PHP and Scrum.

  • Udemy for Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Impressum Kontakt
  • Terms
  • Privacy policy
  • Cookie settings
  • Sitemap
  • Featured courses
Udemy
© 2021 Udemy, Inc.