shawnlauzon (8) [Avatar] Offline
I'm up to chapter 2, and there are discussions of what is called "infrastructure code". It's defined as:

where the system integration, the algorithms, the data structure manipulation, the parsing, the utility code happens.

I'd like to see more of a description on the differences between infrastructure and business code. I can understand things that are quite generic, like system integration and discovery code (which is often provided by node modules), but other algorithms would seem to be quite similar to business logic. And it is important, since you suggest infrastructure code should be shared and business code should not.

Thanks, and I enjoy the MEAP so far!
Richard Rodger (27) [Avatar] Offline

The purpose of the distinction is to avoid generalizations of business rules. To avoid putting effort into creating data and language structures that model the world - because they go wrong. If you have such a complex model, then you won't cut and paste it, because it is so complex.

For example, if you have pricing rules, then write them first as the general case in a small microservices, and cut and paste that microservice for specializations. This is a better strategy than trying to write a pricing rules library.

The distinction does get fuzzy at the edges, but a useful question to ask is: does this code derive directly from the requirements?