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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: We wrote a book about building business applications in Go

269 点作者 roblaszczak大约 4 年前

16 条评论

gengstrand大约 4 年前
Go did rise to prominence by being the programming language behind such high profile software as Kubernetes, Docker, and Prometheus. None of those are business applications and Rob Pike (ex Bell Labs guru and co-inventor of Go) gave a presentation about Go in 2015 where he explicitly identified that Go was invented for infrastructure and not business applications.<p>I have encountered many engineers who are excited about Go and want to adopt it for enterprise systems. In 2019. I evaluated Go for that purpose. You can read my evaluation at <a href="http:&#x2F;&#x2F;glennengstrand.info&#x2F;software&#x2F;architecture&#x2F;microservice&#x2F;golang" rel="nofollow">http:&#x2F;&#x2F;glennengstrand.info&#x2F;software&#x2F;architecture&#x2F;microservic...</a><p>What I discovered is that Go is not any faster than Java on a light weight framework. Here is the part that may seem controversial for the folks here. The simplicity of Go did not result in simpler systems.<p>I found that the lack of inheritance hampered me in expressing solutions to complex business rules and data models. Many of you may disagree with that and counter argue that inheritance is a bad thing. That is most probably one reason why there is so much interest in Go. It intentionally lacks support for inheritance. I agree that inheritance can and has been misused a lot. It is an advanced programming language feature that should be used sparingly. Removing inheritance entirely reduces the expressiveness of the programming language, especially when it comes to enterprise computing.
评论 #27144351 未加载
评论 #27143909 未加载
评论 #27143653 未加载
评论 #27143708 未加载
评论 #27143413 未加载
评论 #27143460 未加载
评论 #27143919 未加载
hardwaresofton大约 4 年前
So I think DDD is basically one of the best pattern that has ever been discovered for developing good software (thinking of it along with gangof4, SOLID, etc). There&#x27;s a lot of cruft around it and consultants looking to over-complicate it for the sake of getting hired, but viewed simply it&#x27;s mostly about abstraction at conceptual boundaries -- very hard to be against that on most large projects.<p>That said, can someone weigh in on how it is building large &quot;enterprise-grade&quot; applications in Go 1.x given how (purposefully) constrained the type system in Go is? While protocols in Go are great (one of the very many breaths of fresh air that Go provided), operations on data structures without generics does not seem like a good time. Does everyone get around the lack of generics by making most generic-looking operations slightly-specialized structs and some interface composition?
评论 #27141750 未加载
评论 #27141816 未加载
评论 #27141509 未加载
评论 #27143453 未加载
评论 #27142280 未加载
评论 #27141386 未加载
评论 #27141978 未加载
评论 #27141705 未加载
评论 #27141833 未加载
评论 #27142406 未加载
评论 #27141766 未加载
评论 #27141996 未加载
评论 #27149541 未加载
评论 #27149877 未加载
评论 #27143140 未加载
kardianos大约 4 年前
I would not recommend many of these patterns. A business application needs are specialized; create a framework for your needs, then define the application into being. Make your functions as large as makes sense, which is typically fairly large. Ignore most of these hot buzzwords.<p>Define the needs of the application, develop a framework to meet those needs, then define the application into being. Never write a business application screen by screen; define it into being screen by screen.
评论 #27141927 未加载
rapnie大约 4 年前
Here is example code and blog series for a step-by-step DDD-based refactoring of an existing app. Don&#x27;t know if they are the same as what&#x27;s used in the book, but found them quite interesting.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;ThreeDotsLabs&#x2F;wild-workouts-go-ddd-example" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;ThreeDotsLabs&#x2F;wild-workouts-go-ddd-exampl...</a>
评论 #27141308 未加载
ToJans大约 4 年前
I&#x27;ve been involved in the European DDD community from the start, sparked the initial IDDD tour with Vaughn Vernon, and am still highly involved, so you could say I know a thing or two about DDD, and I consider the patterns most people think about when being introduced to DDD a bit similar to the inheritance part of Object orientation: it&#x27;s pars pro toto and you are probably missing out on the valuable part of DDD:<p>First: DDD will not magically fix all your problems; however, it does ask the right questions: what is your common language, how does your code align with your organisation, what are the boundaries and the relationship between boundaries, what is your core domain and where might it make more sense to buy something existing etc... So while it is not the silver bullet, it might help you to pinpoint some typical issues with your current code base.<p>Second, people new to DDD tend to focus on tactical patterns and things like CQRS etc, which might be interesting but it&#x27;s usually way less important than the strategic part of DDD.<p>Third, it also attempts to define nomenclature for developers, f.e. about responsibilities and granularities: aggregate roots, bounded contexts, commands, events etc...<p>Like every other methodology there is some cargo culting going on, and that is also the reason I decided to spend a few years outside the echo chamber. However, now that I&#x27;m back it&#x27;s great to see how the methodology is maturing and the community trends to attract the right kind of people.<p>TL;DR: DDD can be useful, but don&#x27;t blindly start applying tactical DDD patterns everywhere without understanding the bigger picture; this will only work against you.<p>Edit: some line breaks
helij大约 4 年前
Look, I know email marketing is everything. I would love to take a look at the book but not giving out my email, sorry.
评论 #27145953 未加载
bovermyer大约 4 年前
Love this!<p>Hey, one little tip. I see you&#x27;re using LaTeX for the book. If you switch to xelatex to compile it, you can use your own fonts, like this:<p><pre><code> % Set the typeface to use \usepackage{fontspec} \setmainfont{Libre Baskerville} </code></pre> And the compile command:<p><pre><code> xelatex mybook.tex</code></pre>
评论 #27141487 未加载
moksly大约 4 年前
Aren’t the first 3 or 4 chapters basically what you can find in Google’s own cloud toturials?<p>Why does the domain-driven-design chapter come after you’ve tied the reader into GCP? I can’t think of a single enterprise business domain where that would make sense from a European GDPR driven perspective.<p>Why do you think you can cover that many topics in a single book? I mean, part of the reason Clean Code is well liked is because it covers one topic in depth, rather than covering a bunch of different topics without ever giving the reader anything of value on any of them.<p>Have you considered going the TDD GOAT book route of earning sales?<p>I’m really sorry that I’m so negative, but your “contents” read like every terrible tech-book I’ve ever opened. Good luck though.
评论 #27141396 未加载
iCarrot大约 4 年前
I signed up for the newsletter (~10h ago), no ebook yet but I&#x27;m apparently enrolled in a mini-course of the same name?
评论 #27151954 未加载
ozfive大约 4 年前
Subscription confirmation email link goes to a 404 page on mailchimp. You guys might want to check it out.
gccs大约 4 年前
Can someone just post a PDF of the book so I don&#x27;t have to give them an email?
评论 #27151624 未加载
domano大约 4 年前
I signed up for the newsletter but got no link to the book so far.
评论 #27141324 未加载
Antoninus大约 4 年前
Big Threedots guy.
评论 #27142311 未加载
gigatexal大约 4 年前
I’d rather pay for the book than give you my email.
评论 #27141600 未加载
评论 #27143328 未加载
flexterra大约 4 年前
DDD-Lite
dang大约 4 年前
I took &quot;Show HN&quot; out of this title because requiring an email signup to get access to the content is against the spirit of the rules: <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;showhn.html" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;showhn.html</a>, which say that there needs to be a way for people to try it out. In the case of a book, the established way to let people &quot;try it out&quot; is to share a sample chapter. If you share a sample chapter on your web page, rather than just a sample page, we can put &quot;Show HN&quot; back. (Edit: done now.)
评论 #27145914 未加载