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.

What are your most used design patterns?

4 pointsby era86over 12 years ago
I'm reviewing all sorts of design patterns, just to refresh my memory. What are some of the most used design patterns in the Hacker News community? Just curious. Thanks!

6 comments

jarek-foksaover 12 years ago
Publisher/subscriber and composite patterns had the greatest impact on the quality of my code, apps that are composited from small decoupled parts are much easier to reason about.<p>I'm also using delegate and prototype patterns a lot, though those are rather dangerous when misused. Deep inheritance chains or excessive method overrides can easly make the code unmaintainable.
评论 #5029286 未加载
fusiongyroover 12 years ago
I get a lot of mileage out of the delegate pattern. We used visitor exactly once in our codebase, but it's pretty fantastic for that one place it's needed. We use observer extensively. More than other patterns that one strikes me as something the language should do for me.
评论 #5029279 未加载
memracomover 12 years ago
I suspect that the most used pattern in the HN community is the ActiveRecord pattern although many who use it probably are not aware that they are doing so.
Avalaxyover 12 years ago
Service Layer, Repository, Unit of Work. Those are the first I can think of (and use very often).
elclanrsover 12 years ago
In JavaScript I'd say I use the module pattern and prototype pattern the most.
ulisesrmzrocheover 12 years ago
Composed Method.