Spring Roo 是适合我的工具吗? (见帖子中的要求列表)
我看了一些 Roo 的视频和演示,我有点喜欢它。然而,在开始使用它之前,我想向更有经验的 Roo 程序员询问一些事情。
Roo 使用了大量的 AOP。是否可以编写自定义 Java 代码并让 Roo 生成的文件“独处”?或者说整个 Roo 结构需要一些 AOP 知识吗?换句话说,如果我想定制Roo项目(添加非CRUD功能),我需要搞乱AOP吗?
我见过生成实体的控制台方法。 Roo 可以将我已经运行的数据库转换为 Roo 代码(为我生成实体)吗?
有时我有很大的实体。我不想向用户界面显示某些列。这种定制容易实现吗?
获取当前视图 - 我想导出用户现在在 UI 中看到的内容(例如 XML)。自动导出固然很棒,但至少我可以轻松地在 UI 视图中获取当前数据吗? (假设用户在数据库表中看到 10% 的数据,我想将它们存储在 XML 中)
我的数据库经常更改。 Roo 如何应对不断变化的实体?这就是动态添加/删除某些列...
导入数据(或全新的数据库)。我需要动态删除并创建数据库。因此,用户界面可能会发生一些变化(新列),并且数据肯定会发生变化。它可以与简单的“运行脚本并刷新”一起使用吗?
回滚。撤消您所做的任何更改。它是否为这样的事情提供内置支持?
报告或至少与流行的报告工具集成。
那么你觉得怎么样? Roo 适合这些吗?我应该尝试一下吗?或者我最好从头开始使用简单的 GWT、JSF 等?
OT:看到这个需求,欢迎留言你会选择什么样的Java框架。我现在正在考虑 GWT(有点知道)、JSF 或 Spring Roo(不,我不打算自己编写 JavaScript UI);-)
I watched some videos, demos of Roo and I kind of liked it. However before starting using it, I'd like to ask few things more experienced programmers with Roo.
Roo uses lot of AOP. Is it okay to write custom Java code and let Roo generated files just "be alone"? Or does whole Roo structure require some AOP knowledge. In other words, if I want to customize Roo project (add non CRUD functions), do I need to mess with AOP?
I've seen console approach of generating entities. Can Roo convert my database that already runs into Roo code (generate entities for me)?
Sometimes I have big entities. I don't want to show certain columns to UI. Is this kind of customization easily achievable?
Getting current views - I'd like to do some exports of what user sees right now in UI (say to XML). Auto export would be great, but at least can I easily fetch current data in UI view? (say user is seeing 10% of data in DB table, I'd like to store them in XML)
My database often changes. How does Roo go by with changing entities? That's dynamically adding/removing certain columns ...
Importing data (or whole new databases). I need to drop&create database on-the-fly. So UI might change a bit (new columns) and data will change for sure. Will it work with simple "run script and refresh"?
Rollbacks. Undo any changes you did. Does it provide built-in support for such a thing?
Reporting or at least integrating with popular reporting tools.
So what do you think? Does Roo match these? Should I give it a try? Or am I better to start from scratch using say plain GWT, JSF, whatever?
OT: seeing this requirements, feel free to leave comment what kind of Java framework would you choose. I am now thinking of GWT (kind of know that), JSF or Spring Roo (no, I am not planning to write JavaScript UI myself) ;-)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
根据我对Roo的了解,答案如下:
不,你不需要搞乱 AOP。除了您将放置一些代码的文件之外,大多数 Roo 生成的文件(如 .aj 等)都可以“单独保留”。
是的,[查看 Roo 逆向工程步骤][1]。
是的。
是的。
请参阅我对问题 2 的回答。
是的
不。不支持回滚。有一个相同的功能请求待处理。不过,也有解决方法。
这与您使用 Roo 的任何普通 Java 应用程序没有任何不同。
希望以上回答能够澄清!
Here are the answers per my knowledge of Roo:
No, you don't need to mess with AOP. Most of the Roo generated files (like .aj etc.) can be "left alone" apart from the files where you will put some code.
Yes, [check out the Roo reverse engineering steps][1].
Yes.
Yes.
Refer my answer to question 2.
Yes
No. There is no support for rollback. There is a feature request pending for the same. However, there are work arounds.
This wouldn't be any different than any of your normal Java application just because you use Roo.
Hope the above answers clarify!