TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

The SOLID principles of object-oriented design

58 pointsby gurdoover 11 years ago

5 comments

juliangambleover 11 years ago
There is a fantastic talk by Kevlin Henney where he deconstructs the SOLID principles as each being either misunderstood when they were written - or frequently misunderstood after. It was done here:<p><a href="http://scottishdevelopers.com/tag/solid/" rel="nofollow">http:&#x2F;&#x2F;scottishdevelopers.com&#x2F;tag&#x2F;solid&#x2F;</a><p><a href="http://sydney.yowconference.com.au/" rel="nofollow">http:&#x2F;&#x2F;sydney.yowconference.com.au&#x2F;</a><p>I won&#x27;t spoil it by writing all the points here - just some pearls.<p>* The Open&#x2F;Closed principle is redundant because it is already covered by the Liskov substitution principle.<p>* Bob Martin&#x27;s view of the Dependency Inversion principle is in fact the Single Responsibility principle.<p>He suggests 5 more principles - but I won&#x27;t spoil it by listing them here. Go see it!
评论 #6909860 未加载
评论 #6909111 未加载
programminggeekover 11 years ago
A lot of programmers don&#x27;t like&#x2F;know&#x2F;care about SOLID or good code design&#x2F;architecture and also end up complaining when their codebase is a big, huge mess. Often times, just following good OOP principles (and some FP principles) makes it easy to clean up most messes.<p>The biggest thing I think many programmers suffer from is wanting to have too few objects with big, ugly methods inside.<p>More objects, fewer methods, smaller methods is often the answer to managing complexity, but it seems like humans don&#x27;t like appropriately recognizing the complexity of the problems they are working with, even when confronted with the mess they make to solve them.
评论 #6911064 未加载
评论 #6911528 未加载
评论 #6910017 未加载
评论 #6910330 未加载
discreteeventover 11 years ago
&quot; It is typically used with test-driven development&quot;.<p>Talk about creating confusion in the mind of the reader. They might have applied some of the sold principles to this article and separated out this completely orthogonal concern. This is what annoys me about Wikipedia sometimes. It&#x27;s full of &quot;editors&quot; hijacking articles to propagate their manifesto of the week instead of just sticking to the subject.
评论 #6909088 未加载
PythonicAlphaover 11 years ago
These principles taught me to think in object oriented ways.<p>Object orientation is a black box to many and many people think they program object orientated, only because they program in Java or C#. But that&#x27;s not true. Object Orientation is about program architecture. Learning OO-Pattern is essential for this task and to know the guiding principles of good architectures. Start SOLID and you are save.
platzover 11 years ago
<a href="http://codeofrob.com/entries/my-relationship-with-solid---the-big-o.html" rel="nofollow">http:&#x2F;&#x2F;codeofrob.com&#x2F;entries&#x2F;my-relationship-with-solid---th...</a><p>Interesting take on the open closed principle