重构 Java EE WebApp 何时有用?
我正在处理一个需要一些重构的 Java EE Web 应用程序。我目前负责这项工作,目前不知道需要做什么或改变什么才能改进应用程序。
我的问题是:如何重构前端部分?
我已经重构了 CSS 文件,以便它们具有通用规则和类,并删除了未使用或错误的规则,我使用一些模式重构了所有 Javascript 文件(不使用原型继承,因为它在这里并没有多大用处)并添加 PrototypeJS 并且仍然需要完成在对象和包含的文件中聚合 JS 函数(如果可能)。
现在,我正在完成向缺少本地化或不完整的页面添加本地化的工作,并且我希望严格遵循 W3C 指南将整个应用程序迁移到 XHTML Transitional。
我还打算开始使用 Struts Tiles 来添加模板,同时删除前端当前使用的旧“表格布局”,因此实际上需要重新设计整个应用程序。
但我现在很困惑:我做的事情有用吗?所有这些工作都需要完成还是我做得太过分了?你会添加什么?你会怎么做?
I am dealing with a Java EE web application that needs some refactoring. I am currently in charge of doing this job and am currently at a loss on what would be necessary to be done or changed in order to improve the application.
My question is: how can the frontend part be refactored?
I already refactored the CSS files in order for them to have generic rules and classes and removing unused or wrong rules, I refactored all Javascript files using some patterns (not using prototype inheritance since it's not really useful here) and adding PrototypeJS and still need to finish aggregating JS functions (when possible) in Objects and included files.
Now I am finishing up adding Localization to pages that missed it or where it wasn't complete and I want to migrate the whole application to XHTML Transitional following W3C guidelines strictly.
I also have in mind to start using Struts Tiles to add templates and in the mean time remove the old "Tables Layout" the frontend is currently using, so actually redesigning the whole application.
But I am at a loss here: is what I am doing useful? Does all this work need to be done or am I just going too far? What would you add up? What would you do instead?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我认为这个 Stack Exchange 线程(如何重构现有的 web应用程序?),会更好地回答你的问题。
希望有帮助。
I think this Stack Exchange Thread (How to approach refactoring an existing web application?), would better answer your question.
Hope that helps.