-------------------------------------------------------------------------- Software Engineering Fall 2002 COM 1205 --------------------------------------------------------------------------- Assignment 1 Due date: Oct. 3, 2002 -------------------------------------------------------------------------- This assignment is stored in file $SE/hw/1 in file hw1-SE.txt -------------------------------------------------------------------------- Topic: Tip 36: Minimize Coupling Between Modules Tip 51: Don't Gather Requirements - Dig for Them In this homework we take Tip 36 as starting point and we want to develop a software tool that checks the Law of Demeter (LoD) as described in Section 26: Decoupling and the Law of Demeter. In a first step we write a requirements document for a tool that checks for the Law of Demeter. We want a tool called LoDChecker that "watches" an executing Java program and verifies that each method call conforms to the LoD. For each method call that violates the Law of Demeter, a message is printed. Use a search engine (e.g. google.com) to search the Web for various Law of Demeter definitions (this is the requirements digging part). A good starting point for your requirement digging is http://www.ccs.neu.edu/home/lieber/LoD.html Turn in your requirement document. For help in structuring your document, read Chapter 7: Before the Project. Here are some variations to consider: Class Form Object Form Strong Form Weak Form Global variables How to deal with static methods? ---- AOP and the tips 11. DRY Logging aspect: write advice only once 12. Make it easy to reuse Use abstract aspects 13. Eliminate Effects Between Unrelated Things (Orthogonality) 14. There are no Final Decisions make reversible; change from one aspect to another. 17. Program Close To The Problem Domain Make your programs look like designs. Implement mini language -> Demeter. Avoid scattering and tangling. 29. Write Code That Writes Code aspects as active code generators 31. Design with Contracts lazy code; contracts for aspects 36. Minimize Coupling between Modules Include aspects 37. Configure, Don't Integrate use aspects for configuration 38. Put Abstractions in Code, Details in Metadata =========== Debugging using aspects