Dominik Przybysz

OOP revisited

Are your classes just glorified data structures? Revisit OOP's core principles to build more robust and maintainable software.

OOP revisited
#1about 3 minutes

Defining object-oriented programming principles

Objects are modeled on real-world items with state and behavior, guided by core principles like encapsulation, SOLID, and GRASP.

#2about 4 minutes

The core principle of encapsulation and information hiding

Encapsulation protects an object's internal state by bundling data and methods into a single unit, but is often broken by public getters and setters.

#3about 5 minutes

Avoiding common pitfalls with getters and setters

Avoid exposing internal state by returning immutable collections, using optionals for nullable values, and carefully managing visibility modifiers.

#4about 4 minutes

Using abstraction and the information expert principle

Abstraction simplifies complexity by delegating responsibility to the object that holds the necessary information, following the "Tell, Don't Ask" rule.

#5about 3 minutes

Applying the Law of Demeter and pure fabrication

The Law of Demeter reduces coupling by limiting object interactions, while pure fabrication creates artificial classes for specific responsibilities.

#6about 4 minutes

Balancing single responsibility, cohesion, and coupling

Effective design involves creating classes with a single reason to change, high internal cohesion, and low external coupling.

#7about 6 minutes

Implementing dependency inversion with hexagonal architecture

The dependency inversion principle decouples modules by depending on abstractions, enabling patterns like hexagonal architecture and avoiding leaky abstractions.

#8about 8 minutes

Understanding inheritance and the Liskov substitution principle

Inheritance creates "is-a" relationships, but subclasses must be substitutable for their base classes without altering program correctness.

#9about 6 minutes

Preferring composition and leveraging polymorphism

Composition offers a more flexible alternative to tight coupling from inheritance, while polymorphism allows a single interface to represent different forms.

#10about 1 minute

Key takeaways for designing object-oriented systems

Good OOP design requires intentionally hiding details, applying principles thoughtfully, and making conscious decisions about class structure and interaction.

Related jobs
Jobs that call for the skills explored in this talk.

Software Engineer

tree-IT GmbH
Bad Neustadt an der Saale, Germany

Intermediate
Senior

Featured Partners

Related Articles

View all articles
BR
Benjamin Ruschin
What Developers Really Need to Create Great Code Demos
Every developer on earth has, at some point, had another developer to thank for a breakthrough, a success, an aha moment they wouldn’t have had without coming across that blog post, that open-source contribution, that reply on socials or that humble ...
What Developers Really Need to Create Great Code Demos
DC
Daniel Cranney
How to Avoid Over-Engineering
In today’s software development world, the demand for designing applications that are both robust and easy to maintain is more pressing than ever. Many developers encounter the architectural chaos left behind in older codebases, leading to frustratio...
How to Avoid Over-Engineering
CH
Chris Heilmann
WeAreDevelopers LIVE days are changing - get ready to take part
Starting with this week's Web Dev Day edition of WeAreDevelopers LIVE Days, we changed the the way we run these online conferences. The main differences are:Shorter talks (half an hour tops)More interaction in Q&AA tips and tricks "Did you know" sect...
WeAreDevelopers LIVE days are changing - get ready to take part
CH
Chris Heilmann
Dev Digest 131 - AI'm not sure about OSS
News and ArticlesRust and Typescript are rising stars in programming languages 2024 survey, the State of CSS 2024 survey is open and here is what's new in ECMAScript.In security news, a Microsoft update bricks Linux dual-boot systems, they patched a ...
Dev Digest 131 - AI'm not sure about OSS

From learning to earning

Jobs that call for the skills explored in this talk.

Java Architect

Java Architect

Paradigma Digital
Municipality of Vitoria-Gasteiz, Spain

API
Java
Azure
Kafka
Agile Methodologies
+2