TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Ask HN: Why is there no effort to codify architecture principles?

5 点作者 runninganyways超过 5 年前
We usually get some guidelines from the overall architecture of the application but after that it always seems to be a free for all. I think we can all do better.<p>Like, math books are chocked full of techniques to handle specific situations. But imagine if instead of using those techniques we just invented our way through each problem. That&#x27;s how I think programming is. Because, perhaps we don&#x27;t have a rich enough vocabulary to describe what we are doing and so every day people solve the same problem in many offices. But if architecture were more codified we could just look up how to do something.<p>Maybe there could be a site that listed abstract solutions that people could vote and leave comments on. So, for example, someone might leave a comment saying that the solution doesn&#x27;t scale well. If you need something that scales consider solution_93748.<p>I think this could help developers create better architected code because we could offload some architecture tasks to the hive mind. What do you think?

4 条评论

twunde超过 5 年前
Architecture principles are codified. For day to day programming, you&#x27;re looking for design patterns. The main reference is the Gang of Four&#x27;s Design Patterns: Elements of Reusable Design (<a href="https:&#x2F;&#x2F;springframework.guru&#x2F;gang-of-four-design-patterns&#x2F;" rel="nofollow">https:&#x2F;&#x2F;springframework.guru&#x2F;gang-of-four-design-patterns&#x2F;</a>). If you&#x27;re looking for more of a systems architecture, the architecture of open source is a good resource: <a href="http:&#x2F;&#x2F;aosabook.org&#x2F;en&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;aosabook.org&#x2F;en&#x2F;index.html</a>
评论 #21756104 未加载
gitgud超过 5 年前
&gt; <i>&quot;Maybe there could be a site that listed abstract solutions that people could vote and leave comments on&quot;</i><p>Sometimes all you need is the right jargon to search for. &quot;Design Patterns&quot; is the thing you&#x27;re looking for. They help you express architecture in common abstract concepts.<p><a href="https:&#x2F;&#x2F;sourcemaking.com&#x2F;design_patterns" rel="nofollow">https:&#x2F;&#x2F;sourcemaking.com&#x2F;design_patterns</a>
addcn超过 5 年前
I think it’s all about workflow. The closer you bring feedback to the developer, the more likely they are to follow guidance.<p>Linters and prettiers are a perfect case study. Saying don’t do X doesn’t work. But preventing you from doing your work unless you do X (and helping you do it) works really well.<p>We need linters for architecture patterns — but of course this is really hard to do in practice.
diehunde超过 5 年前
Isn&#x27;t that what design patterns are? you have books for OO design patterns, enterprise patterns, even microservices patterns, with code examples and everything. Most of them go far beyond the overall architecture.