Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Which J2EE web development framework to choose for a simple, accessible application?

I want to write a simple web application, on J2EE, with these characteristics:

  1. I don't need any AJAX, and it should even work with JavaScript disabled on the browser.
  2. It is a simple CRUD application
  3. I would need full control on the way each element is laid out on the page - no compromise on the GUI's look and feel.
  4. I can use plain old JDBC for data access - no o/r mappers necessary
  5. Bookmarking of pages is necessary (wherever it makes sense to bookmark, that is).
  6. Many of my users use tabbed browsing very much.

What I'd like the framework to do is:

  1. Give me a nice abstraction to retrieve GET and POST parameters
  2. Give me a nice facility to display validation errors and other errors to the user
  3. Give a set of standard safety features - prevent cross-site scripting, prevent the user from setting a dropdown input to a value that isn't there in the dropdown, et.al
  4. Be performant, scale well for over 200 concurrent users, on a not-so-powerful server. (no clusters - single node, a shared app server with multiple production applications)
  5. Be stable; because I'd like to have that application running without a major refactor for at least 3-4 years

I looked at a few frameworks, and this is what I felt..

  1. Plain Servlets/JSP - I need to code everything myself - this would take time, and probably have many bugs
  2. Struts (1.x) - Doesn't provide too many advantages over the plain servlet approach; while it does map POST and GET parameters to form beans, the other features I'm looking for aren't there; and I need to invest a lot of time coding them myself
  3. JSF - I'm scared of it because of the performance problem I've read about. It seems like the view construction and maintenance takes up too much memory. Also, JSF won't work well with bookmarks and tabbed browsers.
  4. Tapestry - I took a look at Tapestry 5. While it looked good, it too seemed to be incompatible with tabbed browsing and bookmarking. While there is certainly support for "activation context", it is only a single string. It can't restore the state with GET parameters and hidden form fields (yet). Additionally, there seemed to be concern about the longevity of the framework - it appeared that it evolves without backward compatibility.
  5. Apache Turbine - It looked good at first; but the fact that it's quite old and there's no much activity going on scares me.

Any suggestions on what would be good for me? Thank you!

PS: I'm constrained to use one that's licensed under Apache license (v2, preferably) or BSD license

like image 215
Pradyumna Avatar asked Nov 07 '09 15:11

Pradyumna


People also ask

What is J2EE Web application?

A J2EE Web application is built to conform to a J2EE specification. You add Web components to a J2EE servlet container in a package called a Web application archive (WAR) file. A WAR file is a JAR (Java archive) file compressed file.

What is J2EE framework?

J2EE is a set of specifications, which define the standard for developing multi-tier enterprise applications with Java. The J2EE platform provides a complete framework for design, development, assembly, and deployment of Java applications built on multi-tiered distributed application model.

Does Java have a front end framework?

We've included Java frontend frameworks that let you create the view layer, ORM and persistence frameworks that allow you to interact with your database, Java backend frameworks that help with creating microservices and REST APIs, Java frameworks built on top of other Java frameworks, and more.

Is Java EE a framework?

Java EE (Enterprise Edition) frameworks are powerful tools to create complicated and broad bodies of enterprise applications. Java is already one of the most popular and trusted programming languages for developers.


2 Answers

Spring-MVC is another option to consider

like image 196
rlovtang Avatar answered Sep 23 '22 05:09

rlovtang


Stripes is an MVC java web framework that pioneered the 'Convention over Configuration' pattern for java web development. Spring MVC has adopted some of these patterns but I still prefer Stripes because it does one thing and does it well.

like image 32
Darryl Stoflet Avatar answered Sep 22 '22 05:09

Darryl Stoflet