Recently I made a small web project, and found many unreasonable aspects in the development process. I would like to make a small summary when I have time:
1) easily tested damage of webwork
This is one of the most common stupid mistakes in my design. Originally, webwork was famous for its ease of testing. However, in my design, it always provided servlectcontext intrusion. The most common example is to generate staticArticle. Because it is necessary to generate HTML href by the way, And href I naturally use the path of servletcontext. Adding this feature to the business logic makes it difficult for me to perform unit tests.
Conclusion: Use servletactioncontext with caution!
2) Try to use ognl.
Ognl reduces or increases the usage of sessions.CodeCleanliness is crucial. If you use webwork instead of ognl, it means that you do not have a good understanding of webwork.
Conclusion: Let ognl complete most of your actions related to Web Submission, without manually writing code.
3) The order in which ognl assigns values to parameters.
Some parameter values must be prior to other parameters in the application, for example, ID values in the update operation. In this case, the default interceptor provided by webwork does not comply with the specifications and can be overwritten.