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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Design patterns implemented in Java

84 点作者 PleaseHelpMe超过 7 年前

7 条评论

userbinator超过 7 年前
<i>All designs should be as simple as possible. You should start with KISS, YAGNI, and Do The Simplest Thing That Could Possibly Work principles. Complexity and patterns should only be introduced when they are needed for practical extensibility.</i><p>This needs to be at the top, in the introduction. Especially in Java and C#, I&#x27;ve seen far too much &quot;over-patterned&quot; code, in contrast to the opposite.
评论 #15125914 未加载
_pmf_超过 7 年前
My take: you do not truly understand modularity until you have had to work with a third party framework where your software is integrated as plugin. Working with Eclipse &#x2F; PDE &#x2F; CDT has taught me more about modularity (good and bad) in 2 years than a decade of green field development (plus, I can now write a usable Eclipse plugin faster that I can write the equivalent Vim function ...). I also recommend &quot;Practical API Design&quot; (which contains both large scale advise and tiny but important details regarding source compatibility vs binary compatibility with aspects that have been unknown to me after several years of developing Java) and &quot;Java Application Architecture&quot; (which contains decoupling strategies, but you only learn to appreciate those after you have encountered the generic problem pattern).
cjnicholls超过 7 年前
Is anyone aware of a similar C# repository?
评论 #15127533 未加载
kenoyer130超过 7 年前
I would also mention &quot;Emergent Design&quot; along with KISS and YAGNI. Do not start your code base with a collection of design patterns. This is the usual cause of a complete over designed mess. Instead as the code grows look for the patterns to emerge and then apply them.
coolg54321超过 7 年前
For PHP, <a href="https:&#x2F;&#x2F;github.com&#x2F;domnikl&#x2F;DesignPatternsPHP" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;domnikl&#x2F;DesignPatternsPHP</a> neatly documented with Sphinx
blahman2超过 7 年前
Thank you! The code and the docs look great!
flavio81超过 7 年前
&quot;Design patterns implemented in Java&quot;<p>I&#x27;d argue that Design Patterns mostly appeared <i>because of</i> Java. Because of people hitting the wall with Java; Java does not allow metaprogramming; Java did not allow class members (it allows instance members); Java does not allow multiple inheritance; Java has a cumbersome and underpowered exception handling system; Java&#x27;s OOP is really strict and limited; no real functions that can be passed around (not even in Java 8); recursion can&#x27;t use tail call optimization... etc etc<p>because of ALL this, then developers had to resort to applying the same workarounds. And such workarounds were collected, tagged, and proposed as<p><pre><code> Design Patterns </code></pre> by the gang of four.<p>But seriously, if the authors write,<p><i>&quot;All designs should be as simple as possible. You should start with KISS, YAGNI (...)&quot;</i><p>Then they should be looking at alternatives to Java in the first place. It&#x27;s 2017 and there are other alternatives that even run in the JVM (if this is a requirement).
评论 #15126341 未加载
评论 #15126262 未加载
评论 #15126237 未加载
评论 #15126247 未加载
评论 #15130984 未加载
评论 #15127222 未加载
评论 #15126265 未加载