What do low coupling and high cohesion mean? What does the principle of encapsulation mean?
Coupling refers to how strongly or loosely components in a system are tied together. You want that to be low. Cohesion refers to how well the individual parts of a unit of code fit together for a single purpose. Encapsulation is about containing implementation of code so that outsiders don’t need to know how it’s works on the inside. By doing so you can reduce negative effects of coupling. Reading: Robert C. Martin’s SOLID principles of OOD, which have been linked on this blog since day 1. His book, Agile Software Development: Principles, Patterns, and Practices is another great resource for this topic. It’s short and to the point, and comes highly recommended from myself. • How do you manage conflicts in a web application when different people are editing the same data? Set a flag when someone starts editing data unit A. If someone else loads it, let them know it’s being edited and that it’s currently in read only mode. If the race was too fast, you can also have a check on the commit