On 04/07/2023 11:23, Peter Firmstone wrote:
Thanks Anthony,

Always interesting to see how others are managing modularity. Some time ago now (circa 2007), Sun released Jini as open source, set up a project at Apache called River, we struggled to get developers though, we had a big monolithic codebase and developers couldn't get their heads around it.   When I was modularising it, I decided to use SPI's as module boundaries, it turned out to be a good decision, we ended up making all our SPI's OSGi services as well.   Probably doesn't matter in this instance, OpenJDK is already modular, and it's implementation detail.   Some of our crypto providers are in the same module, but I'm thinking of separating them into different modules now, as some are no longer secure, but some people may still need them for compatibility, by moving old code into different modules, we can allow to die a peaceful death, without requiring people who don't use it to be burdened by it.

The concept to learn here is "services" and the uses/provides clauses that are used to say if a module makes use of a service or provides an implementation of. When using services you get a lot more flexibility to refactor without breaking anyone.

-Alan

Reply via email to