Do any of you disagree with that statement? If so,...
# announcements
l
Do any of you disagree with that statement? If so, could you enlighten me?
c
I haven’t ever really worked on a “strict” Clean Architecture project, but I think I would generally agree. All the ports/adapters/interfaces could be better represented by building DSLs with lambdas to implement the custom functionality
b
Typeclasses (see Arrow) address a lot of this
m
I disagree that it's a problem with Kotlin. Kotlin doesn't say you have to use interfaces, adapters, factories. That falls on the framework you chose, or the coding standards you're attempting to follow. Too many 'things' using Kotlin are following the same old standards of Java.
I think Ktor follows the approach you want. Most of the frameworks out there are Java first, so they're limited by the Java language, and for that matter, JDK8, as too many are still using, or stuck, on JDK8.
d
Couldn´t aggree less. Like @Mike said. It´s not a matter of the language. But nevertheless I think Kotlin offers a lot of features to wright good clean code and built good applications with less amount of code compared to other languges, especially Java. And what´s wrong with Classes and Interfaces? Oh and how do you define
Clean Architecture
?
l
There's nothing inherently wrong with classes and interfaces. Clean Architecture as in the definition by the book Clean Architecture
I said classes and interfaces because it's a remarkable pattern in clean - Having an Interface to an Abstract Factory to a Factory, to a POJO.... All the extra steps to enable a high-level abstraction which, in my opinion, is much more of a boilerplate than it is useful
m
Hmmm, I suspect I mis-interpreted what you were saying, then. IT sounds like you feel the design proposed by Clean Architecture is overly complicated and abstract rather than that you think Kotlin is overly complicated and abstract. If that's the case, then I tend to agree that the 'Enterprise Java' where everything is an explicit interface and other things does tend to be overkill for microservices. They serve a purpose for large apps to help with cohesion and coupling, at the expense of more interfaces/classes.
👍🏻 1
d
Agree with @Mike!!!
l
rather than that you think Kotlin is overly complicated and abstract
No, I actually mean the opposite. Kotlin language is concise and you can implement things with just a bit of code. But Clean Architecture is overly complicated, and thus writing it in kotlin feels odd to me
They serve a purpose for large apps to help with cohesion and coupling, at the expense of more interfaces/classes.
Yes. But for Kotlin apps and Microsservices I don't feel that this large apps concept applies
Did you understand my point?
m
We are agreeing. I didn't read your post correctly the first time, and you didn't read my response quite correctly. I believe we both agree that what is described in Clean Architecture feels over-architected for microservices (regardless of language), and that Kotlin is a concise and readable language.