Udemy
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
  •  
Development
Web Development Data Science Mobile Development Programming Languages Game Development Database Design & Development Software Testing Software Engineering Software Development Tools No-Code Development
Business
Entrepreneurship Communication 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 Certifications Network & Security Hardware Operating Systems & Servers 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 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 Paid 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 & Gardening 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 & Diet Yoga Mental Health Martial Arts & 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 Learning Teacher Training Test Prep Other Teaching & Academics
Web Development JavaScript React Angular CSS Node.Js Typescript HTML5 PHP
AWS Certification Microsoft Certification AWS Certified Solutions Architect - Associate AWS Certified Cloud Practitioner CompTIA A+ Amazon AWS Cisco CCNA CompTIA Security+ Microsoft AZ-900
Microsoft Power BI SQL Tableau Data Modeling Business Analysis Data Analysis Data Warehouse Business Intelligence Blockchain
Unity Unreal Engine Game Development Fundamentals C# 3D Game Development C++ Unreal Engine Blueprints 2D Game Development Mobile Game Development
Google Flutter iOS Development Android Development Swift React Native Dart (programming language) Kotlin SwiftUI Mobile App Development
Graphic Design Photoshop Adobe Illustrator Drawing Canva Digital Painting InDesign Design Theory Procreate Digital Illustration App
Life Coach Training Neuro-Linguistic Programming Personal Development Personal Transformation Life Purpose Mindfulness Sound Therapy Emotional Intelligence Coaching
Business Fundamentals Entrepreneurship Fundamentals Freelancing Business Strategy Online Business Startup Business Plan Blogging Amazon Kindle Direct Publishing (KDP)
Digital Marketing Social Media Marketing Marketing Strategy Internet Marketing Copywriting Email Marketing Google Analytics Startup Advertising Strategy

DevelopmentProgramming LanguagesPHP

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: 3.6 out of 53.6 (47 ratings)
8,613 students
Created by Liviu Oprisan
Last updated 8/2020
English
English

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

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
  • 238 Reviews
  • 29,422 Students
  • 5 Courses

I am a big fan of using and helping others use agile/scrum and writing and helping others write easy to maintain code.


I have been a developer for 16 years. I have 10 years of PHP experience, 3 years of Java and JavaScript, 2 years of C# and 1 year of Python.


I am passionate about writing easy to maintain code and I tried to help the programming community with my courses on this subject.

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


I've worked on a lot of types 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, in the last five years 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.

Top companies choose Udemy Business to build in-demand career skills.
NasdaqVolkswagenBoxNetAppEventbrite
  • Udemy Business
  • Teach on Udemy
  • Get the app
  • About us
  • Contact us
  • Careers
  • Blog
  • Help and Support
  • Affiliate
  • Investors
  • Terms
  • Privacy policy
  • Sitemap
  • Accessibility statement
Udemy
© 2022 Udemy, Inc.