Oliver Mensah
Software Developer,
Technical Writer,
Developer Community Enthusiast
● Currently a National Service
Personnel at AgroInnova
● Guest Author at Auth0
● Co-Organizer at Facebook
Developer Circle: Accra
LinkedIn: @OliverMensahDev
Twitter: @OliverMensahDev
GitHub: @OliverMensahDev
Slide 3
Slide 3 text
Overview of Web
Development
❖ Creating dynamic web applications
➢ Access via browser
❖ Broad Divisions
➢ Frontend
■ JavaScript, HTML, CSS
➢ Backend
■ PHP, NodeJs, etc.
➢ Database Technologies
■ MySQL, MongoDB, etc.
Slide 4
Slide 4 text
Overview of PHP
❖ Open source general-purpose scripting
language, usually used for web development
❖ Code executed on the server
❖ Can be embedded in HTML
❖ Compatible with many databases
❖ Cross platform
❖ Large community
❖ Popular
➢ Simple
➢ Efficient
➢ Secure
➢ Flexible
❖ PHP Standard Recommendations(PSRs)
Slide 5
Slide 5 text
PHP Fundamentals
❖ Variables, Arrays, Loops
❖ Functions and Conditionals
❖ working with databases
❖ using third party libraries
Example:
https://github.com/OMENSAH/AshMa
rt/blob/master/shoes_Search.php
Slide 6
Slide 6 text
I think we can do better
In terms of
❖ Code design and organization
❖ Which means
➢ ability to reuse & recycle
code
➢ encapsulate
➢ easier to maintain and test
Slide 7
Slide 7 text
Overview of OOP
❖ Program in terms of objects
❖ OOP concepts
➢ Classes
➢ Objects
➢ Methods & properties
➢ Encapsulation and Access Modifiers
➢ Data abstraction
➢ Inheritance and composition
➢ Polymorphism
❖ Autoloading
❖ Dependency Injection
❖ Code organizational patterns
➢ MVC
➢ MVC Repository pattern
Slide 8
Slide 8 text
Classes, Objects,
Methods & properties
❖ Basic building blocks of OOP
➢ classes
➢ objects
➢ methods
➢ properties
Slide 9
Slide 9 text
Encapsulation
❖ Mechanism to restrict access to
data and methods of class
❖ Achieved with access modifiers
➢ public
➢ protected
➢ private
Slide 10
Slide 10 text
Data abstraction
❖ Abstraction is a means of
hiding details in order to
simplify an interface
Slide 11
Slide 11 text
Inheritance and
composition
❖ Code Reuse
➢ Use Composition when one
class cannot exist without
the other
➢ If a class wants to use a
class functionality
https://www.thepolyglotdeveloper.com/2018/09/inherita
nce-composition-php-application/
Slide 12
Slide 12 text
Polymorphism
❖ Polymorphism says that
methods in different classes
that do similar things should
have the same name.
❖ Achieved through
➢ Interface
➢ abstract class