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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Architectures that will inspire your programming

122 点作者 iamtechaddict超过 11 年前

6 条评论

ap22213超过 11 年前
This article really interests me - mainly because over the last 10 years, I&#x27;ve sort of adopted (independently) a mish-mash of what here is described here as the &#x27;clean architecture&#x27;, domain-driven design, and the &#x27;ports and adapters&#x27; approaches. I have employed these concepts on a dozen or so SaaS products, and the resulting schemes have have worked extremely well, and have been rock-solid frames to work from.<p>However... I think there&#x27;s a risk in adopting these types of models without having some experienced context in them. Software design has a huge amount of &#x27;art&#x27; to it. And, it&#x27;s so easy to reach the complexity tipping point - where it all come crashing down. For instance, I remember back in the mid-90s when the design patterns book was all the rage. And, shortly thereafter I&#x27;d find code just jam-packed with factories and builders and observers and adapters in multiple layers. It was a mess. Similarly, I can see someone reading these and then going out and creating a &#x27;devices&#x27; namespace, a &#x27;controllers&#x27; namespace, etc. and filling them with all too many classes and interfaces. I can even predict the rise of the &#x27;framework&#x27; maven archetype that creates a bunch of extraneous excess.<p>Listen, I&#x27;ve been there and done that, and it just doesn&#x27;t work well. It just creates a lot of architectural noise. It creates a mess for your development teams. I&#x27;ve learned this the hard way. Trust me.<p>What I recommend is starting very, very slowly. Just like when DI was the rage, and everyone would leap to integrate the most popular DI engine with all its xml configuration files and heavy weight complexity. When, in fact, all you really need at first is a couple of interfaces and a builder class in the entry-point. Don&#x27;t set out to create an architectural behemoth.<p>That said, I still think a solid &#x27;domain model&#x27; should be at the core of it all. If anything, spend a lot of time defining the domain. Work with stakeholders (product managers, subject matter experts, managers, field and support, even developers, etc.) to get it down. Write unit tests that help make the domain very fluent. In my opinion, it&#x27;s better to have a small core of very well defined domain classes, then trying to boil the ocean. Start small and focus on the quality of the entities.<p>Again, this is just from my trial-by-many-errors experiences.
评论 #6946910 未加载
评论 #6946836 未加载
评论 #6946738 未加载
programminggeek超过 11 年前
I hate to be self-promotional, but if you are interested in Uncle Bob&#x27;s Clean Architecture, I would love it if you took a look at Obvious Architecture (<a href="http://obvious.retromocha.com" rel="nofollow">http:&#x2F;&#x2F;obvious.retromocha.com</a>). It&#x27;s a working implementation of his ideas in Ruby, but the same structure can easily be done in any OO language. Actually, the implementation would be a lot easier in a language like Go or Scala that has things like type checked interfaces built in.
kyberias超过 11 年前
First rule: When you write text and introduce an acronym (e.g. DDD), please define what it means to the readers. This is an article with multiple acronyms but no definitions for them.
评论 #6946786 未加载
nogridbag超过 11 年前
Thanks for posting this. I&#x27;m halfway through Eric Evans book on DDD and have two others in my queue. I find it strange that there&#x27;s very little discussion about DDD here on HN.<p>Do you have any recommended resources on CQRS?
评论 #6947126 未加载
评论 #6948424 未加载
jrabone超过 11 年前
Where does JPA fit into Clean Architecture? Seems like annotation-based persistence straddles several boundaries, or else you code your entities multiple times as both &quot;real&quot; entities and DTOs.
评论 #6948675 未加载
mortyseinfeld超过 11 年前
Any comments on DCI?