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.
Related
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.
We've got an app that needs to run in a Java app server. I've got to develop a webapp to go with it. I've started reading about Ruby on Rails, and I really like the approach: MVC, convention over configuration, tons of stuff taken care of for you.
I may be dreaming the impossible dream, but are there any Java webapp development frameworks out there that work in a similar way?
Straight JSP is miserable, because logic and presentation are mixed. Simple template systems, like Velocity and Freemarker don't do the database stuff. I don't know much about Spring.
Everybody here knows Java, and we don't have time before the next release cycle to learn an entirely new language and library, else I'd plunge into RoR in a serious way.
Not impossible at all. It's already been done.
Here are a few Java-equivalents:
Grails http://www.grails.org/
SpringRoo. http://www.springsource.org/roo
Spring MVC. http://www.springsource.org/
All are products of SpringSource. If you're getting serious about Java web development, I highly recommend you check them out.
Grails was actually inspired by Rails, hence the name, so you'll see many similarities in features and paradigms between the two, including MVC, convention-over-configuration, and code generation. So if you're looking to get right into Rails-like development in Java, I highly recommend Grails. I should note that Grails has more features than Rails, some of which I think Rails should adopt. An example is Grails provides a service layer to handle all business logic. You could easily implement a service layer in Rails, but its convenience we all love, and because Grails includes it, it is more convenient. I've hopped between Rails and Grails once upon a time, both great frameworks.
Keep in mind that you can do Rails development with Java as well, via JRuby, which is not a bad option either. You get all the features of the Ruby language (v. 1.8), along with the ability to integrate and use Java libraries within your Ruby code.
SpringRoo is SpringSource's new code generator framework, so you can use it with the Spring framework to aid in agile/rapid application development.
Grails is actually built on-top of the Spring framework and Groovy. Groovy is Java-derivative which looks more like a scripting language and provides all the meta/dynamic programming goodness that you see in languages such as Ruby and Python. However, Groovy allows you to write Java code as well, so there's no need to learn it, not entirely at least.
Have a good look at the the Play Framework. I think that it's the best way to develop Java web applications at the moment. Certainly the quickest. There is no deploy cycle. Save the code and refresh the browser.
It comes with Hibernate and a host of enhanced functionality that streamlines the development process. Totally REST based and stateless.
Add in jQuery and it feels like web heaven.
I need support in order to speed up development process. I received a request to start developing a website with java technology. I usually develop in C# - ADO for Entities - ASP.NET MVC - MSSQL server - Visual Studio. Best of these choices were:
- C# Intellisense.
- ORM.
- Complete Security Management of Users, Roles.
- Separation of Concerns into MVC.
I was wondering if any can help me to determine best Java MVC Framework - DB - IDE based on these premises, Start a project with:
- Integrated security for users, roles
- MVC
To shed more light, to replicate same functionalities I can have each time I start a website using C# ASP.NET MVC 2 project. example http://nerddinnerbook.s3.amazonaws.com/Images/image020.png
First, let's discuss IDE, ORM, and security, and DB: In my opinion, the best Java IDE is IntelliJ IDEA. It's from the same folks who have developed Resharper for Visual Studio. It has the most powerful editor of all Java IDEs and has built-in support for many popular Java frameworks.
ORM: The most powerful ORM library in Java is Hibernate. Hibernate itself is an implementation of Java Persistence API (JPA) standard. EclipseLink is another implementation of JPA, but Hibernate is a better option IMO.
Security: Spring Security is probably the most powerful security (authentication and authorization) framework available in the Java world.
DB: If you are comfortable with SQL Server, then keep on using that. However don't use Microsoft's JDBC drivers. Instead use a driver from DataDirect: http://web.datadirect.com/products/jdbc/index.html. If you don't want to use SQL Server, MySQL is a great FOSS choice and Oracle, DB2, etc. are other options.
For the Web framework, there are several options:
Option 1: If you want a RAD style framework, choose Grails. Grails is similar to Ruby on Rails but uses JVM and a Java-like but dynamic language named Groovy. Grails' ORM API is called GORM, which is built on top of Hibernate, but is much easier to use. Grails also uses Spring Security for managing security.
Option 2: If you want an enterprise-grade framework, choose JBoss Seam + JavaServer Faces. JSF is a component-based MVC framework, and there are plenty of great JSF libraries available for use: RichFaces, OpenFaces, etc. Seam integrates JSF with EJB and together they make a great enterprise framework. However it has a steep learning curve.
Option 3: Use Spring + SpringMVC + JPA.
Option 4: Use Struts 2 .
Final remarks: If you are looking for an easy-to-learn MVC + ORM framework, use Struts 2 + JPA. If you are looking for a RAD and easy-to-use MVC + ORM framework, use Grails. If you are looking for a robust and enterprise-grade (but not-easy-to-learn) framework, use JBoss Seam.
Not only Spring MVC but the whole Spring eco system will get you up and running with the least surprises. You can also download the Spring Tool Suite (a preconfigured eclipse version tailored for Spring) to get an integrated development environmanet which knows about all spring stuff.
But Spring - Spring MVC - Hibernate - Spring Security and STS seems to cover your needs and will provide a sound basis to do the project without too many bad surprises. This leaves you to focus on the customer and the jump to Java.
Afterward you might consider different options in the Java space, as there are plenty of other frameworks available with their strong points. But in the short run it is better to limit the number of moving parts
The standard, most common framework/orm setup is spring/hibernate. Both of these tools have unfortunately been grown to ridiculous extremes over the years, so they may seem daunting in size, but a simple setup with each is much easier than it may seem from looking at all of the options on their respective sites.
Best suggestion would be to follow a step-by-step to get a basic spring/hibernate setup going and just expand off of that. At one point I had a prototype project like this I'd use to generate a "starter-set" to bootstrap projects.
BTW, I'd also suggest a simple ant build script. Some people may suggest maven, but it's enormous and very (imo overly) complex, and you're going to have enough new tools to wrap your head around to want to avoid having to learn another large command set.
Welcome to the Java world. The best thing (and in some cases also the worst thing) about the Java domain is that you can create your own stack based on your requirements. You're not necessarily bound to a single vendor as is commonly the case in the .NET domain.
Since it seems you're in a greenfield situation you can:
Adopt the webdevelopment stack of a large commercial vendor like Sun/Oracle (JSF/EJB3 + NetBeans/JDeveloper + Glassfish/Weblogic + MySQL/Oracle) or IBM
Adopt the webdevelopment stack of a smaller open source vendor like JBoss, SpringSource.
Take a look at JBoss Seam and SpringSource Grails and Roo (the latter two are based on the frequently mentioned Spring/Hibernate frameworks)
Mix and match your own stack based on the above and your requirements. Although this requires deep knowledge of the various technologies, frameworks, tools available.
You have lots of options as you can see. Now since your interested in a productivity focused stack - and I suspect an opensource one - and you have no legacy I recommend either Grails or Roo. In which Roo is probably the most accessible one since you don't have to learn Groovy. If you don't like the generation tooling I advice you the stick to the Spring stack and just adopt Spring/JPA/etc.
As for IDE, the only Java IDEs worth their salt IMHO are Eclipse and Netbeans, especially since both of them are free. Use Eclipse for extensibility and ease-of-use, use Netbeans if you need to rapidly develop a GUI.
If we only need to graphically authorize a user,
view a few tables representation (from database),
ability to change data in the database visually
what tools to use to write such a web application that will run on Tomcat?
What framework allows to do that in the most straightforward, easy-to-manage and elegant way?
I would look at Spring Roo as the framework for building your app. It will allow you quick construction of most of the features you are looking for in several minutes. (or so they claim)
There are so many elegant web frameworks available to choose from...
A JSF solution is a one suggested by the Java EE standard - if you select JSF you'll have to be more verbose in the code, but you'll have the assistance of tools such as the Visual JSF designer in NetBeans. Using JSF2 is a much better idea, IMO.
I personally recommend you to have a look at Wicket - it's a great Java web framework, centered around ideas such as ellegance, simplicity and usability.
There are many more great frameworks out there, but this is a start.
You can also try Grails. It's Java + Groovy scripting + Spring Framework + GORM + Spring Security. Less boiler plate.
Tools: Spring Source Tool Suite (Eclipse based IDE).
For example, I am looking for an Appfuse equivalent for .NET MVC apps.
I use Appfuse in Java to crank out a quick web app pre-configured with the front-end and backend frameworks of my choice. Appfuse used ANT or Maven to build a web application.
Seeing as .net has equivalent frameworks & tools to Java, i.e. ANT and NANT, Hibernate and NHibernate, log4j and log4net, Spring and Spring.Net; Is there an equivalent project to Appfuse for .net?
Appfuse is an open source project and application that uses open source tools built on the Java platform to help you develop Web applications quickly and efficiently.
It was originally developed to eliminate the ramp-up time found when building new web applications for customers.
I think the closest thing to what you are looking for is called S#arp Architecture
Pronounced "Sharp Architecture," this
is a solid architectural foundation
for rapidly building maintainable web
applications leveraging the ASP.NET
MVC framework with NHibernate. The
primary advantage to be sought in
using any architectural framework is
to decrease the code one has to write
while increasing the quality of the
end product. A framework should enable
developers to spend little time on
infrastructure details while allowing
them to focus their attentions on the
domain and user experience.
Accordingly, S#arp Architecture
adheres to the following key
principles:
* Focused on Domain Driven Design
* Loosely Coupled
* Preconfigured Infrastructure
* Open Ended Presentation
Update: The Sharp Architecture project is now located here: