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.
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.
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
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.
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.
Related
I am looking to learn Web Development with Spring 3.x and also looking at integrating hibernate into it. What is the best resource for learning Web Development with Spring MVC and Hibernate? I am new to this, so would like some resource that takes me from the ground up. Also recommend the best IDE for this.
Kind Regards
Spring in Action is a good book to get started: http://www.amazon.com/Spring-Action-Craig-Walls/dp/1935182358
It covers MVC and Hibernate in short and concise chapters to give you a quick start. For IDEs, I would recommend Eclipse with the Spring IDE plugin installed.
Hope that helps!
It depends a little bit on what you mean by " I am new to this". New to web development in general? ... new to java in general or just new to Spring and Hibernate? Spring Roo might be a great tool in general, but in terms of learning you're better off rolling as much as possible by hand. At least in the beginning. That's because it will take you to places where you WILL learn. Things will break, produce weird results, etc., all in all you'll get to know how everything jells. Hibernate in and of by itself can be an adventure. So for starters I'd forego the convenience of Roo and get your hands really really dirty.
I'd vote for starting a project and come back for more when you get stuck.
Start a project with spring ROO, it will setup all the best practices for you.
Also, use spring STS IDE, it comes with a few eclipse plugins already installed.
I'm looking for good java MVC web application development kit (or framework), with servlet engine, database persistence layer and viewer layer included and ready to go? One example is TDK (Turbine Development Kit), but it's kinda outdated, and their M.E.T.A. is very hard to work with (it uses maven 1.0).
Thanks,
David
There's AppFuse and Roo if you're looking for "make it go".
If you're not dead-set on Java, there's Grails (and JRuby on Rails).
Give a shot to AppFuse. It will leverage either Struts 2 or Spring MVC for you, with a nice persistence layer.
There are many good 'stacks' that you could use, some of which have already been mentioned.
They all have their own strengths & weaknesses, and you really need to select a stack that best fits your requirements.
The Spring/Roo, AppFuse & Seam are all great, but they do come with a certain amount of... errm... bloat.
You may find that picking and mixing technologies actually provides you with a lighter weight and more performant solution, so long as the technologies you choose integrate relatively seamlessly.
If you're looking to package a full execution environment including the servlet engine as part of your application, Jetty is a good choice, and you can easily integrate it into a Maven build environment.
You may also want to investigate using HyperSQL for your database, which will allow you to prototype using an SQL compliant database without having to worry about installing a full database manager such as MySQL or PostgreSQL.
is Spring Roo supposed to be only a tool for rapid development of web applications, thanks to all that scaffolding, source code generation and similar stuff, such as grails for groovy.
Or can it be utilized as a source code generator / osgi platform for building enterprise applications ? What I mean is, that there are source code generators, that generate only domain model and light DAO layer based on metadata definition when starting a new project and you have to stick to the objective - create a web app. But there are also generators, that generate the entire DAO and service layer - fantastic for iterative dev process of bigger apps - and you are not restricted otherwise, you are just using it to build you enterprise app step by step. With this you can really build a huge enterprise applications / platforms that will be maintainable for a very long time.
Also the OSGI model could be employed in a way, that you might develop a core portal application for instance, with a package of social office addons that you may plug in, etc. etc.
My point is, that Java development needs to be "Rubyfied". I mean Ruby on Rails environment where you have everything unified and standardized. A platform that could rule the java world some time :-)
Since Thomas and #jhericks trashed Spring Roo I'm going to say I actually like it mainly because its not a framework. Roo also (now) support multi-maven modules.
To answer your question: Spring Roo is not framework. It is code generation.
So yeah it is a code generation platform not only for web apps but any Java app.
There are couple of reasons why some people don't like Roo:
It uses AspectJ
It uses Spring
It does Code Generation
After building several applications with Spring Roo I can say its greatest value is its ORM generating abilities and its DataOnDemand test generation.
Other than that Spring Roo is really just Spring *.
Frameworks like Play and Ruby on Rails are just not really the "Java Way". That is most Java (Web) Apps I see are combination of libraries and not a giant framework.
As far as I experienced, Spring Roo is meant to be a RAD/bootstrapping tool for web applications. There are some major features missing and not on the roadmap that would make it truly useful in an enterprise application context. An example being multi-module Maven support.
This rather polemic article and its follow ups summarize quite well how I feel about Roo and similar projects like Seam Forge.
If you are looking for something RoR-like for Java check out the Play Framework that currently seems to gain momentum.
I had been persistently trying spring roo since its milestone release until three months ago.
With the new STS release, I am about to try mucking around with it again. But, hold on, I am not about to waste my time again.
Preamble:
The last time I tried Spring Roo, it was a totally dysfunctional, especially the GWT and GAE integration part. Spring Roo was on an advertising path effectively saying "Finally a spring and gwt integration". I feel that that advertisement is misrepresented.
Questions:
Has anyone actually succeeded in creating a working GWT integrated project using spring roo?
It has been six months, and Spring Roo still cannot do GWT beyond a simple example and, therefore, still does not fulfill that advertisement. Is there a road-map towards achieving a GWT deployable spring roo? In agile management, we have road maps we try to think will get us where we want to be in a time frame we hope to conform to. I would like to see a road-map for deployable GAE and GWT integration, because I would like to put in place technology plan for my projects.
Should I abandon considering spring roo due to absence of a publicly available road map and wait for another two years before reviewing roo again?
Should I tell my cooperatives and associates (and anyone interested in my opinions) not to consider using roo as a deployable gwt and gae integration technology until another two years'?
It sounds to me like you should be considering an alternative.
I'm not sure how you came up with "another two years". No one of us, Spring included, knows the precise answer.
Do you know of any tool that would do like Ruby on Rails' Scaffolding (create simple CRUD pages for any particular class to allow quickly populating a database with dummy data), only which used Java classes with Hibernate for database access, and JSP/JSF for the pages?
It is a drag when you are programming one part of an application, but need data that can only be added with another part that is not ready yet, or very cumbersomely by directly inserting it into the DB.
Grails is a very nice Rails-like framework built on top of Spring MVC. For persistence, they use GORM, which is basically an ActiveRecord-like framework built on top of Hibernate. Pretty slick.
If you already have Hibernate entities, they can actually be used immediately in Grails with no additional work.
You can try Telosys Tools, an Eclipse plugin for
code generation (scaffolding) working from an existing database
with customizable Velocity templates.
It's very simple and easy to use.
The tutorial for code generation with Spring MVC and Spring Data is here : https://sites.google.com/site/telosystutorial/
See also : http://tools.telosys.org/
Eclipse Marketplace : http://marketplace.eclipse.org/content/telosys-tools
I'm a little late on this one but it popped up in the "Related" links →
JBoss Seam and it's Seam Gen tasks are exactly what you are looking for (Hibernate + JSF). You can generate an entire web app from a Hibernate fronted database in seconds.
you can use grails. Grails tries to be Groovy on Rails -- uses Rails behind the scene for scaffolding, etc. Since you can pretty much write full scale java code in a groovy class, you can have the CAKE and EAT IT too.
Grails is somewhat different from Rails, even though it was based on Rails and has a similar feel. Grails uses spring to help wire your services together. The environment is not only dynamic (with Groovy) but also allows you to use Java (static environment) as well. It is really cool, especially if you're coming from a java environment. The Grails folks took the Rails idea and expanded it using the Domain Driven Model. Rails is still data model centric where you have to deal a lot with the database to create your objects (which is called a model), where as Grails allows you to design applications using the true domain object model where you deal with objects from the domain class' perspective instead of the database.
There is a good tutorial here on how to do this in Netbeans. I've used this wizard before with good results. Out of the box you can select which persistance framework to use and the JSF pages it produces are quite nice and clean.
Spring + AspectJ + Hibernate + CLI = Spring Roo RAD framework.
Give it a try.