I've worked on a few projects on Struts 1.3 but sometimes the application just becomes difficult to modify in the future. I follow Dao objects , Business Delegator classes to ensure separation of concern but still i am having problems with them.
Can anybody tell any good practices to follow so开发者_StackOverflow社区 that i don't have any problems in the fututre !!
- Use some dependency injection framework to decouple classes (Spring + Struts, Guice + Struts)
- Employ behavior driven design for functional tests (jbehave.org)
- Employ test driven design to have your code tested (StrutsTestCase for jUnit)
Making the code testable will help having it maintainable. For more resources use Google/Stack Overflow search.
精彩评论