4 ms·
Personally I focus on not creating large projects. I make as many small individually tested libraries as I can and assemble them in smaller projects. Not exac
by justinsaccount 10y ago
Personally I focus on not creating large projects. I make as many small individually tested libraries as I can and assemble them in smaller projects.
Not exactly the 'microservices' approach, but similar ideas.
One of the most useful things related to this is to focus on interface design. It's easy to scrap a bad implementation and re-implement the same interface later, it's harder to fix a bad interface that you're using all over the place. Making some implementations pluggable up-front will also make it easier to swap things out later.
Another thing that ended up causing the most pain in the long run was building in too much functionality directly instead of leaving things up to plugins. Plugins can more easily be enabled or disabled to compose specific functionality. The alternative is tons of code and tons of configuration options to handle every little corner case.
As far as lower level tools, the 'coverage' tool integrated with your test suite is a must have.
- StavrosK 10y ago> Not exactly the 'microservices' approach, but similar ideas. Tangentially, I don't like how people conflate writing small, self-contained libraries with "microservices". It's like people forgot that you can write libraries without sticking a huge mess of networking and glue code in between them. (https://www.stavros.io/posts/microservices-cargo-cult/ https://www.stavros.io/posts/microservices-cargo-cult/ for a related rant)
- michaelmcmillan 10y agoI share your experience. Small decoupled modules developed with TDD has turned out great at our project. That's not to say that we haven't had major refactorings, but they have been painless because of the confidence provided by a proper test suite.