|
|
|
|
|
by pennomi
46 days ago
|
|
Code locality has some advantages and some disadvantages. A “perfect” website has things cleanly separated out between style, logic, and DOM, but that does cause cases where you might have to edit three files every time you change a single widget of your website. Neglecting to do that can leave dead or incorrect code just because the issues do not inherently present themselves to you. Yes, a perfectly principled programmer would do it right… but have you worked with other people before? They’re not necessarily very reliable. |
|
Really the decision comes down to whether it's better to separate based on style/logic/dom or on the business domain, and I think at least for web apps, separation by domain wins out in most cases.