ZeroNationality

joined 1 year ago
[–] [email protected] 2 points 1 year ago

No worries. Depression is a bitch.

[–] [email protected] 1 points 1 year ago

Assuming I'm remembering correctly, they're both very similar. To the point that they're basically the same concept by different sources and therefore have some wiggle in interpretation

[–] [email protected] 0 points 1 year ago (2 children)

Developing for Lemmy or developing in general?

If you've only been developing for 3 years then you're not much beyond a junior. Nobody (least of all yourself) should expect you to be able to just sit down and grok a rust codebase using actix.

What you appear to be lacking right now is patience and experience. They both come with time.

[–] [email protected] 5 points 1 year ago (2 children)

The hexagonal architecture or onion architecture is oversimplified as having everything bolt onto a core of business logic via designed and designated interfaces to abstract away implementation details on either side.

Say you have a web app which takes requests from the outside world and based on those requests it performs some business logic (tracking accounts, orders, etc).

In hexagonal architecture you'd maybe implement such a thing like:

Web app handler -> command interface -> message bus -> command handler (business logic) -> repository interface -> repository (Postgres, mongo, memory, email)

What this lets you do is split apart the app at the interfaces into separate modules which can be reasoned about and tested separately.

End of the day you don't care what is happening on the other side of the interface as long as whatever it is follows the interface specification.

Building applications like this meants that if we wanted to extend our app with an API and a Real-time Websocket service, we can (usually) just write a handler to turn that request into a command for the command interface and be done with it.

view more: ‹ prev next ›