views:

382

answers:

7

I work in a medium to small team ( 10 people ) developing and supporting several web enterprise applications.

We have a dozen of them built with a house-made framework with asp-classic working against ms-sql server.

We are evaluating the migration to a new development stack.

We'd like it to be open (free) and simple.

I've been looking around the java web frameworks, but all of them seem to be extremely overbloated for our needs (with the possible exception of http://www.playframework.org/, which I couldn't study yet...)

We are thinking about porting our own framework to this new stack, rather than adopting a whole new stack that we are unaware of ...

so far now, we though about the following possibilities

  • plain java - jsp - jsf

  • groovy - gsp (no grails at all)

  • jruby (no rails at all)

we feel really comfortable working with dynamic languages (well, as dynamic as classic asp can be) and with a lean and understandable framework...

I see no small and simple web frameworks for java, like there are for php or ruby...

I really like groovy, but I see no web implementations outside of grails... Besides the language documentation doesn't seem to be quite complete (I might be looking in the wrong place, perhaps)

php could be an option, but I think it would be hard to advocate for it in my current work...

any other option, advice, pros and cons?

thanks a lot

-- edit

some related link http://stackoverflow.com/questions/116978/can-anyone-recommend-a-simple-java-web-app-framework

+1  A: 

I've had great success in simple web projects using Spring MVC with JSTL JSPs. Spring MVC is a framework that can be kept pretty darn simple (1 additional XML file used for configuration). You can eschew all the fancy options and just specify a set of JSPs that you want to associate with view names, then forward to those views by specifying their names in the controller.

Spring MVC can also easily scale up and be as complex as you need, letting you switch from JSTL to JSTL with Tiles, or Struts, or JSF, or Wicket. It can also handle complex web flows using the Spring Web Flow project. But for most projects I just keep it simple -- build a JSTL JSP, create a controller that provides the objects that JSP needs, and associate them by having the controller return that view. Once you get the project set up and you're familiar with the configuration, it takes maybe a couple minutes to wire a new page into place.

Kaleb Brasee
mmm... I think I'll give it a try...
opensas
+4  A: 

I'd suggest you take another look at Grails. It does use hibernate and spring under the covers, but for most situations, you don't need to know the details of those frameworks. There's a large community and lots of documentation/blogs/mailing lists for support, as well as a thriving plugin community with over 300 plugins solving pretty much any need.

If you're still put off by grails, you could look into the play framework. I don't have any experience with it, but there has been some traffic recently around it on hacker news and the like. I know it uses groovy for the templating language.

Ted Naleid
just noticed that you mentioned the play framework in your post. I'd still suggest trying out grails using a quick prototype.
Ted Naleid
+2  A: 

I cannot recommend anything, but strongly recommend that you consider these things:

  • Rapid development. Basically you want to save a page file, and reload it in the browser. Instantly! It can be done, do not settle for long deployment times.
  • Plain, readable text files!
  • Convention coding instead of explicit coding - big XML files will eventually drive one or more developers insane. The less, the better.
  • Good tool support (just having syntax coloring may be a big help)
  • Consider the long term support of your choice. You are basically remarrying with your software - will it still be maintained in 10 years? By whom? Will you have alternatives (JSR's are great - look at the amount of servlet engines)?

And WHEN you choose - get the source code for it, and ensure that it builds correctly. It will never be easier than now, and some day you WILL need to fix something inside. On short notice! (You may even consider allocating resources for donating documentation/patches/time to the open source project you are building your business on).


EDIT: A few more things:

  • You want to be able to verify things at compile time. One of the things that make it possible to build cathedrals in Java is that the static typechecking prevents a lot of nasty runtime errors. "Oh, THAT method? Well, it's not here, sorry. Boom!"
  • You want good error reporting. Built in! Try throwing a NullPointerException deep, deep down and see what 1) the user and 2) the developer is told about it. Anything that requires going to a log file to get the details WILL cause calls at 3 AM eventually.
  • Look into scalability from the start. Any non-trivial customer will need to and the world goes to multicores, so you might as well think about it already now. What will you do when all the magic pixie performance dust has been used and it just isn't enough: The application requires more than a single box.

And read this: http://www.pragprog.com/titles/mnee/release-it

Thorbjørn Ravn Andersen
YES! you are reading my mind...so... which one???
opensas
I saw a very convincing demo of JavaServer Faces version TWO, which I'll look into as we have an existing version ONE application which needs upgrading. But version ONE has so many pain points I will not recommend going that direction without actually battle experience :D
Thorbjørn Ravn Andersen
I've now migrated the JSF version ONE application to version TWO with facelets. It is much better, and recommended if you can get a supported container to run it in. If not, Glassfish v3 is ok.
Thorbjørn Ravn Andersen
+1  A: 

You're forgetting about the other major player in this field: the LAMP stack (linux, Apache, MySQL and mod_perl). All components are free, there are many books available on LAMP development and each of these components, and there are vast numbers of libraries and components already available.

Ether
_P_ is supposedly PHP not Perl.
Thorbjørn Ravn Andersen
You are absolutely right, in fact I feel pretty comfortable working with php, but as I said, lamp (nor ruby, nor python) is not an option where I work, it's either .net or java...
opensas
@opensas: You didn't say that. You just said you wanted "open (free) and simple".
Ether
you said "PHP could be an option". The lamp stack can be used with Java - Apache Tomcat for example, so don't write it off too quickly, its currently the most reliable hosting platform around. Talk it over with your other devs, they might like the idea of going with something less bloated and complicated than ASP, .NET or Java.
gbjbaanb
sorry, I should have been more categoric about it... I agree with you, lamp (or wamp in this case) stack is less bloated far more deployment friendly than .net or java... I don't think I can convince the IT staff about it...
opensas
Ether: I also agree with you, lamp is free and simple, I had a couple of personal projects I developed with php, and I have almost rewritten the whole framework in php, but php is not an option where I work, perhaps I should modify the question the let it be clear...
opensas
+2  A: 

If you are afraid of Grails and need Java, try Stripes and read the excellent Stripes book (http://www.stripesbook.com/blog/). You can buy the eBook pdf for $23. The book covers the framework in amazing detail. Stripes is a very strong, lightweight MVC framework that deals with all the common problems of web development (templates, url mapping, form validation, security, internationalization, testing) but it won't automagically create the database layer for you unless you want it to by using Stripernate. You can also use Groovy with it. You can use it standalone or with Spring.

Jason M
+1  A: 

If you like Groovy but don't like Grails you could try Gaelyk, which is a lightweight Groovy framework. However, AFAIK you can only use Gaelyk if you're hosting the app on the Google App Engine

If your apps won't be hosted on GAE, and you really don't want to use Grails, another option is to use Groovlets, Groovy template servlet, GSPs.

However, personally I think it's a big mistake to dismiss Grails. It really is a great framework, and you can go a long way without knowing much about Spring and Hibernate. One of your complaints is a lack of Grails documentation. I think you must have been looking in the wrong place, because in addition to all the books available, there's a very extensive reference document and a lot of other documentation available on the website. Finally, there's a very active mailing list.

Don
thanks for the advice, I'll definetely give grails a try... totally out of topic, is it possible to dbug gsp pages??? I still couldn't find a way to do it?
opensas
I haven't found a way to debug GSPs themselves, but most of the logic in the GSPs should be encapsulated in TagLibs, and they can be debugged just as easily as any other Groovy code.
Don
+1  A: 

My platform of choice is JRuby - Rails (3) because of its very rich and powerful ecosystem, but mainly because:
* very easy to use
* many MANY libraries
* fast support via IRC
* deep documentation

You can also check out Scala + Lift Web Framework ( imho best static typed language, nice framework )

clyfe