使用Go或V语言是否可以实现”Clean Architecture”?

huangapple go评论91阅读模式
英文:

Is it possible to achieve the "Clean Architecture" using Go or V-lang?

问题

简而言之,由Robert Martin推广的“Clean Architecture”在V或Go中是否可行?我的想象告诉我是可行的,但我想听听你们的意见或实际经验。

一些背景:在我的公司,Clean Architecture是软件架构师中流行的实践方法。虽然我还不是架构师级别,但我对这种架构有一定的了解。我被委托编写一个只包含ETL和一些基于HTML的报告的小型业务应用程序。我的公司允许我们开发人员使用任何语言或平台开发小型应用程序,只要它可以在Linux上以Docker容器的形式部署。我认为这是我终于有机会深入研究Go或V并进行真实项目开发的机会。

我有一种预感,这个小应用程序将来会发展壮大,成为我公司中重要的软件之一。然而,高级架构师们有一个习惯,即当这些小应用程序显示出增长的迹象并变得不可或缺时,他们会将其从nodejs、python或其他语言重写为Java或C#。他们必须在软件变得难以控制之前就要“驯服这只小怪兽”,换句话说,从一开始就将架构放在软件的前沿。

英文:

TLDR; Is the "Clean Architecture" popularized by Robert Martin possible with V or Go? My imagination tells me it is but I want to hear about your opinions or actual experiences.

Some background: The Clean Architecture is a popular practice among software architects in my company. I'm not an architect level yet but I'm kind of familiar with that architecture as well. I'm tasked to write a small business application that only has ETL and some html-based reports. My company allows us developers to develop the small apps in any language or platform as long as it can be deployed on Linux in a Docker container and I think this is a chance for me to finally deep dive into Go or V with a real-world project.

I have a hunch that this small app is going to grow in the future and become one of the huge and important software in my company. The senior architects though have a habit of killing the "small apps" written in nodejs, python or some other languages and rewriting them into Java or C# when the small apps show signs of growth and becoming indespensable. They have to "tame the monster while it's still young", in other words, putting architecture upfront on the software from the ground up before it becomes unwieldy.

答案1

得分: 1

Clean Architecture的本质是将应用程序/业务逻辑与任何IO或外部框架保持独立。这意味着你可以将其原则应用于任何编程语言,它不受面向对象编程的限制。我已经成功地使用F#(函数式编程语言)构建了一个遵循Clean Architecture的Web应用程序。

英文:

The essence of Clean Architecture is to keep you application/business logic independent from any IO or external frameworks. This means you can apply its principles to any programming language, it is not bound to OOP. I have successfully built a web application with F# (functional programming language) following Clean Architecture.

huangapple
  • 本文由 发表于 2022年9月6日 21:40:08
  • 转载请务必保留本文链接:https://go.coder-hub.com/73623070.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定