tfw you’ve created something that excites you like nothing in years but it feels like you have to write a book first to lay the context to make wide appreciation even possible
Look y’all, it’s all public on my GitHub. I just don’t know how to go the path of testability → loose coupling → hexagonal architecture → service locator without losing 95% of the audience at step two by the latest. I’ve extracted something I’ve used successfully for years and applying it to other work projects was always a HUGE improvement but you only get one chance to make a first impression.
@hynek if one was familiar with dependency injection, layering your business logic for testability and that sort of things, but not formally acquainted with hexagonal architecture, would you recommend any pointers?
@georges I have _just_ pushed a huge update to the glossary and I looks like you’re the perfect person to give me feedback on it: https://svcs.hynek.me/en/latest/glossary.html
Glossary

We are trying to make the purpose and best use of svcs as clear as possible, even if you’re unfamiliar with all the concepts it’s based on. As such, the glossary got slightly out of hand, but we ho...

svcs

@hynek ah, yes, so it appears I was familiar with the idea from my previous job, but not the name.

Let me rephrase to see if I've understood:

The term "dependency injection" is specifically about your code getting its dependency as input arguments. Service locator is a different mechanism, that shares a common goal.

Aside from that, hexagonal architecture cares more about where you draw your lines, what you call your components and interfaces.

@hynek so to put that together in a sentence:

My previous job was using a hexagonal architecture, with different components for the http views, the business logic, the database access, and the network call to other services.

All of this was tied together with dependency injection (implemented is scala as argument to classes, with the glue being one big main that instances everything in order).

Does that sound coherent with what you were explaining in the glossary?

@georges yep sounds mostly right to me! hexagonal is mostly about thinking more clearly about components and less about “layers” (each component can have arbitrary layers, too).

and the diff between injection and locator is literally just the acquisition mechanism with upsides and downsides on both side. it’s explained a bit deeper in https://svcs.hynek.me/en/latest/why.html#is-this-dependency-injection – I should probably transplant some of the text

Why? - svcs UNRELEASED documentation

@hynek thanks, things are now way more clear in my head than they were this morning :)

It also looks like on that topic I should resume reading Architecture Patterns with Python. (And wrap my head around how to use sqlalchemy properly in this context)