0
Answered

Ask about Encapsulate What Varies in real work

NguyΓͺn Hα»“ HαΊ£i 7 Π»Π΅Ρ‚ Π½Π°Π·Π°Π΄ β€’ ΠΎΠ±Π½ΠΎΠ²Π»Π΅Π½ anonymous 7 Π»Π΅Ρ‚ Π½Π°Π·Π°Π΄ β€’ 1

?As you said in the book, chapter "Encapsulate What Varies" (page 35): you can isolate the parts of the program that
vary in independent modules, protecting the rest of the code from adverse effects.

-> For example I have an internal system where we have HR, IT, Accounting department. So should I make 3 projects with 3 DB for each features in each department independently?

Is there something that I can break the whole system more "modulely"?

ΠžΡ‚Π²Π΅Ρ‚

ΠžΡ‚Π²Π΅Ρ‚
Answered

Hi!

I'm sorry to give a vague answer, but it's all based onΒ the tradeoff. If you have 9 independent codebases, which are a real pain to maintain then, sure, go for it and try to extract the common modules. If these 9 independent codebases still have a lot of differences and you're extracting modules today which won't make a lot of sense tomorrow, then don't.

ΠžΡ‚Π²Π΅Ρ‚
Answered

Hi!

I'm sorry to give a vague answer, but it's all based onΒ the tradeoff. If you have 9 independent codebases, which are a real pain to maintain then, sure, go for it and try to extract the common modules. If these 9 independent codebases still have a lot of differences and you're extracting modules today which won't make a lot of sense tomorrow, then don't.

БСрвис ΠΏΠΎΠ΄Π΄Π΅Ρ€ΠΆΠΊΠΈ ΠΊΠ»ΠΈΠ΅Π½Ρ‚ΠΎΠ² Ρ€Π°Π±ΠΎΡ‚Π°Π΅Ρ‚ Π½Π° ΠΏΠ»Π°Ρ‚Ρ„ΠΎΡ€ΠΌΠ΅ UserEcho