-2

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.

jacob
  • 17
  • 5
  • EDIT: I originally asked the question with V-lang in mind but I realized that I can ask the same question for Go since they are very much alike and Go has been around longer and more software have been written on Go. – jacob Sep 06 '22 at 16:44

1 Answers1

1

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.

plainionist
  • 2,950
  • 1
  • 15
  • 27
  • Yes but how you can achieve independence of domain logic from the rest is what I'm interested to know. For instance, is dependency inversion doable in V? I have no knowledge about F# so there's probably some features in F# that makes dependency inversion doable. But I'm curious about how the plumbings is done using V to achieve the said architecture. – jacob Sep 06 '22 at 16:37
  • Dependency inversion is the key and this can be achieved with interfaces and functions passed to other functions. According to V documentation both is possible in V – plainionist Sep 06 '22 at 17:02