774 shaares
10 private links
10 private links
Quote from one of the top comment (https://news.ycombinator.com/item?id=19957326)
And some of my favorite simplifying patterns:
AOP for logging; but NOT (dear god) for business logic.
3 levels of abstraction, and no more. If you can't figure out a way to do it in 3 levels of abstraction, then something else is wrong.
3 systems of state: config (global), current request and persistence (database). If you need more than that, then something is wrong with the architecture. (Ok, compilers may not be able to get away with this, but most applications can, in my experience.)
If you use a pattern (MVC, for example) apply it to the whole system. E.g. doing IOC only in the upstream API system when the rest of the code doesn't, just makes a mess.