djumaka,
@djumaka@phpc.social avatar

Guys I need some helping hand. I need some good reading (book/article) on the proper way of writing OOP. I gave a project where we use classes, but they are more used as a package if functions then working like objects. Like a class of only statics, passing around IDs not the real objects of data (this sending SRP down the drain), arrays, generally functional programming with extra steps. I'd fancy even a discussion as I want to slowly explain all that to my teammates
TIA

Crell,
@Crell@phpc.social avatar

@djumaka I find thinking in types is what is more valuable. Don't think of an object as behavior, but a custom type. A primitive in your domain. Now attach a few contextually relevant utilities to it.

Really I think about OOP very functionally these days. :-)

(What you're describing is procedural, not functional.)

thomastospace,
@thomastospace@phpc.social avatar

@djumaka One starting point might be @Crell 's talk about Never use Arrays.

That's the first step into making things OOP in my experience.

https://youtu.be/FlPLquNuy8E

  • All
  • Subscribed
  • Moderated
  • Favorites
  • php
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • khanakhh
  • rosin
  • Youngstown
  • everett
  • slotface
  • ngwrru68w68
  • mdbf
  • GTA5RPClips
  • kavyap
  • thenastyranch
  • cisconetworking
  • JUstTest
  • cubers
  • Leos
  • InstantRegret
  • Durango
  • tacticalgear
  • tester
  • osvaldo12
  • normalnudes
  • anitta
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines