Separation of concerns is a big deal in software engineering. Program structures should be nicely organized, such that distinct tasks are handled by distinct program elements. In other words: no business logic wrapped up in our SQL statements; no data access in our user interfaces. When concerns are not separated, a big ball of mud ensues, and changes to any part of a program ripple around to every other part; the cost of changes to such systems can’t be predicted, and they’re just generally no fun to work on.
OK then; what concerns should be separated, in terms of web application design? How about these:
- The page structure
- The page look and feel
- The page behavior
Interestingly enough, these 3 concerns map directly to the technologies that so dominate our time:
When Web pages separate these concerns, each aspect is easier to read, easier to understand, easier to maintain, and easier to test.
Do your web applications separate markup, look and feel, and behavior nicely and cleanly? Mine could do better. Now that I’m aware of these concepts I’m thinking how best to apply them in my projects.