Object Oriented Design

As a beginner-level programmer, how much should I involve or concern myself with object oriented design?

Comments (4)

j's photo

Depends on what you want to achieve.

I am ok in PHP, I read a lot of books about patterns etc, gave some talks, wrote several frameworks, know parts of the interpreter ... blablabla. The main thing about programming in any language is creating things.

This is the main concern.

The rest is more 'how to achieve it'. Personally I would rather focus on tests and not OOP. If you like to write functions using arrays, every datatype is a string, but the application does work and you can actually verify that it does what you want it to do. that's something to be desired, even if there is a lot of room to improve you actually have the most important part. A testable working programm.

That said, I do recommend learning OOP Designpatterns - that's the nomenclature we use across languages) also I do recommend learning Functional Programming in PHP (because you should know different ways to solve a problem).

For a beginner the idea of a function without sideeffects is more important to me than OOP.

Because you want to make sure your application works and the thing you put into the function should not change (reference) and the function should not change stuff 'automagically' in the background for convinience.

These are my thoughts about that. You should make up your own mind anyways.

Show +1 replies
j's photo

Ololade Badmus in the beginning, yes! And test it (unitests, e2e-tests)! Testing stuff will force you to think about the implementation and can help you to get more confident. In my opinion testing makes you a better developer.

The paradigma/language you work in may change but if you think about how you can make sure and verify stuff works, that will always be a benefit.

Just a sidenote: Design is based on requirements. Requirements are a lot about data and/or experience. Before you have enough information or experience it's hard to make a design decision that's where

make sure I understand and work at solving problems with the programs and worry about design later

comes in.

Ololade Badmus's photo

j Oh alright! Thanks for the insight.