Jump to content


Photo

Using several methods or class constants


  • Please log in to reply
21 replies to this topic

#21 Hall of Famer

Hall of Famer

    OOP Fanboi

  • Members
  • PipPipPip
  • 315 posts
  • LocationIthaca

Posted 19 May 2013 - 04:16 PM

Your opinion does not resemble the general consensus.

 

Whats wrong with that statement? How can transaction script be a good OOP practice when its not even OOP in the very first place?


Welcome to the world of OOPHP! In a perfect script, everything is an object. You cannot be perfect, but you can approach as close as can.

zog841.jpg


#22 ignace

ignace

    Now mod flavored

  • Moderators
  • 6,247 posts
  • LocationBelgium

Posted 20 May 2013 - 02:46 AM

You stare yourself blind on OOP. There is no such thing as a good OOP practice. There are only good practices and bad practices. When you have a small system it is a bad practice IMHO to create a very complex domain model for no other reason then "because it's true OO".

Remember this quote?
 

There are two ways of constructing a software design: One way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult.


When developing software you have to consider the bigger picture and when a simpler method presents itself you do best to take it. Ask any industry expert, hell ask Martin Fowler himself, and they will tell you that when you can keep it simple, you keep it simple!

But I get it you are an eager student with no industry experience and you like OOP, as do I. But consider that at some occassions you just may be wrong. And if you can't/won't accept that, then the industry will teach you when you are fired because you made it so complex that even you can't figure it out anymore. But hey.. it's true OO, right?

Edited by ignace, 20 May 2013 - 02:51 AM.





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com