Really enjoyed reading this as I'm looking into patterns and code structure. The usage of real world examples and requests from the business are excellent.
If you're really trying to learn about OOP, read Sandi Metz's Practical Object-Oriented Design in Ruby and 99 Bottles of OOP. They'll teach you solid OOP.
Student Software Engineering. Video game hacker on blue mondays. I have interests in psychology and cooking as well. I am trying to create a programming language focused on maintainability.
In _accountType == "SavingsAccount" you're comparing an int with a string. Just saying. ;)
Great article, one thing though:
ExTypeis not defined in the multiple logger types exampleThis article is really SOLID :D
for the last part Customer constructor should be Account right?
Nice explanation of SOLID principles with good examples.
Some people (myself included) say that logging also pollutes your class and violates srp. That's why I switched to AOP logging.
Using obj as a variable name for the Loggers is bad.
FIX : rename it to logger
Really enjoyed reading this as I'm looking into patterns and code structure. The usage of real world examples and requests from the business are excellent.
If you're really trying to learn about OOP, read Sandi Metz's Practical Object-Oriented Design in Ruby and 99 Bottles of OOP. They'll teach you solid OOP.
This article is a fine introduction to the ideas of maintainable OOD and OOP.
That was a pretty solid read! (no pun intended) Your examples were great. :)
Good one for every level..
Cool solid examples :)
Good Idea (Y)
Awesome write-up
neat
Very good, thanks