We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 3 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(3)
Michael Feathers 所著的《有效处理遗留代码》一书可能比我们在此告诉您的任何内容都更能帮助您。
然而,您需要自己澄清的最重要的事情(从您的问题来看似乎并不完全清楚)是:您的目标是什么?您想通过此代码库实现什么目标?
如果答案是(听起来)“能够有效地维护现有项目”,那么尝试直接构建系统的完整高层模型可能不是最有效的路径。可能一次性记住的事情太多了。
在这种情况下,我会尝试仅了解您当前需要修改的系统的用例;通过代码跟踪方法调用(可能在正在运行的系统上使用调试器)以查看涉及哪些部分。对几个不同的用例执行此操作,您将开始看到模式,然后记录这些模式并逐渐将它们组合到系统的高级映像中。
The book "Working Effectively with Legacy Code" by Michael Feathers will probably help you more than anything we can tell you here.
However, the most important thing you need to clarify for yourself (and from your question it sounds like it's not completely clear) is this: what is your goal? What do you want to achieve with this codebase?
If the answer is (as it sounds) "being able to effectively maintain the existing project", then trying to directly build a complete high-level model of the system may not be the most effective path. It's probably just too much at once to keep in mind.
In this case, I would try to understand only the use cases of the system that you currently need to modify; follow method calls through the code (pssibly using a debugger on the running system) to see what parts are involved. Do this for a few different use cases and you'll start to see patterns, then document those and gradually fit them together into a high-level image of the system.
此工具可能为您提供帮助。
或者,如果遗留系统写得不好,它可能会造成巨大的难以阅读的混乱,但我希望它有所帮助。
This tool might assist you.
Or if the legacy system is written poorly it could just make a huge unreadable mess, but I hope it helps.
如果它是java代码,那么深度逆向工程将非常有帮助。
请参阅文档:http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html
If it is a java code then a deep reverse engineering would be very helpful.
See a documentation at: http://www.ejb3.org/jar_file_reverse/jar_file_reverse.html