De-mystefying coupling
Some of the noteworthy observed during Coupling.
Coupling issues generally come to the fore front while designing using tier architecture.
The following are the lessons learnt
1.When trying to decouple it is always better to attempt decoupling on a Higher level .This would identify and seperate the functionality beforehand.
2. As MartinFowler points out the key is to find out dependancy and once this is achieved try and insulate the modules by using the mapper,This mapper implemented as (preferably) an interface , would be defined in an another package thus providing diff behaviour.
3. We can say objects are tightly coupled when we see import javax.servlet.* in the Action classes where we are implement business logic.
4.Using DTO as means of carriers of data will reduce coupling
5.Avoid cyclic dependancies (identify them early in the lifecycle)
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment