spring roo vs appfuse generate service /dao layer

爱⌒轻易说出口 提交于 2020-01-01 05:16:25

问题


I am looking for feedback from experienced users on spring roo and appfuse. Which do you think does a better job reverse engineering database tables and generating a service layer, dao layer, and jpa entities?

If I am not mistaken, spring roo currently cannot reverse engineer a database.


回答1:


You are correct that you can't reverse engineer a database in Roo. There's an open JIRA item for this which you can vote up.

However, you could try using the Eclipse Hibernate tools to reverse engineer your database, then modify those objects to make them Roo Entities. That probably would involve a lot of manual work though.

For AppFuse, there's the AppFuse Maven plugin which can create the entire AppFuse project for you from an existing database. I'm not sure if it's currently working though, because the last person I mentioned it to said they couldn't get it working.

Depending on your requirements, you may also want to give the Grails framework a try. There's a tool called GRAG that can reverse engineer a Grails application from a database.




回答2:


Just a quick update to inform all users that stumble upon this thread now (or at least after today :)); With the new 1.1.0 release, Spring Roo now does support incremental database reverse engineering out of the box. See this release annoucement.

As a comment on the actual question: I don't think either of the two is way better than the other in the actual entity generation, but there is a big difference of course between AppFuse and Spring Roo aside from the entity generation. If you actually need DAO's, this is something that comes out-of-the-box in AppFuse and put partly in Spring Roo, but there is also a great addon for Spring Roo (Hades addon) that does a great job at this, maybe even better than AppFuse. Main reason to go for AppFuse, in my humble opinion, is if you require another Web Framework (ie Wicket. Tapestry or JSF) as front end then Spring MVC or GWT, as these are currently the only well supported Web Frameworks within Spring Roo (more coming though, like Flex etc.). Other reason you might go for AppFuse is if you want to use an IDE with full intellisense and code-completion support, but don't want to use Eclipse (you can use other IDE's, and build works perfectly well with Spring Roo, but due to the AspectJ files, which aren't recognized by Netbeans, other IDE's then Eclipse currently don't do code completion well for the Spring Roo generated/managed files).

But if you don't mind Eclipse (or better even the Spring Tools Suite) and do want to use GWT and/or Spring MVC, I'd recommend Spring Roo. Main reasons to go for Spring Roo is the, in my humble opinion, higher productivity, far better support, far higher momentum and activity, lower learning curve (for quick CRUD app generation) and of course the Rails like command shell from which you can quickly setup and configure your application.

Ps. Note that I haven't used AppFuse actively for over a year, so my knowledge of AppFuse is a bit rusty.




回答3:


Roo is good to quickly put up stuff up (round-tripping is amazing)..but the lack of out-of-the-box provide for a services layer puts my needs in a bind. I know I can do @Services annotation and place code appropriately as mentioned in the documentation(too much work at startup). I wished Roo gave me a choice to have a services+dao layer...out-of-the-box. That would (have made)/make Roo a killer app, imho




回答4:


The ROO-435 issue is actually our most requested feature, so I'll be implementing that in Spring Roo within the next few weeks. In the meantime, Jason's suggestion of using the Eclipse Hibernate tools to create JPA annotated entities is an immediate solution that is fully Roo compatible.



来源:https://stackoverflow.com/questions/1963672/spring-roo-vs-appfuse-generate-service-dao-layer

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!