[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: EMEA PUG 2017 presentations

Status
Not open for further replies.
A

agent_008_nl

Guest
Shared / global vars were well known to make things easy also in the past. When you inherit, you strongly couple child to parent class. That is very easy; you for instance do not have to instantiate the parent and you do not have to reference that class when using it's protected/public members. But you get all the problems of strong coupling with that ease. I'm not going to repeat those: google for them if you're not sure. You can strive for referentially transparent code also. Members that get all their dependencies injected (parameter objects are handy) and where possible leave no state behind. Such code is reusable and it's simple to move. There is a distinction to be made between simple (in the sense of disentangled) and easy. www.infoq.com/.../Simple-Made-Easy ------------------------------ Used properly, inheritance is useful and makes it easy to do certain things that would be a pain to implement using composition. It's when it's abused and misused vs composition that it's harmful.

Continue reading...
 
Status
Not open for further replies.
Top