What J2EE web development framework to choose for a simple, affordable application?

I want to write a simple J2EE web application with the following characteristics:

  • I don't need AJAX, and it should work with JavaScript disabled in the browser.
  • This is a simple CRUD application.
  • I need full control over how each element is laid out on the page - no compromises regarding the appearance of the GUI.
  • I can use plain old JDBC to access data - no need for o / r mappers
  • Bookmarking pages is necessary (wherever it makes sense for bookmarking, that is).
  • Many of my users use tabbed browsing very often.

What I would like to do is:

  • Give me a good abstraction for getting the GET and POST parameters.
  • Give me a good opportunity to display validation errors and other errors for the user.
  • Provide a set of standard security features - prevent cross-site scripting, do not let the user set a drop-down input for a value that is not in the drop-down list, et.al
  • Be functional, scale for more than 200 simultaneous users on a not very powerful server. (without clusters - one node, a common application server with several production applications)
  • Stability; because I would like this application to work without basic refactoring for at least 3-4 years.

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

  • Plain Servlets / JSP - I need to encode everything myself - it will take time and will probably have a lot of errors
  • Struts (1.x) - does not provide too many advantages compared to the usual servlet approach; while it displays the POST and GET parameters to form beans, the other functions I'm looking for are missing; and I need to spend a lot of time coding them.
  • JSF - I'm afraid of this because of the performance issue that I read about. It looks like the design and maintenance of the view takes up too much memory. In addition, JSF will not work with bookmarks and tabbed browsers.
  • Tapestry - I looked at Tapestry 5. Although it looked good, it also seemed incompatible with browsing tabs and bookmarks. Although there is some support for an โ€œactivation context,โ€ this is just one line. It cannot restore state with GET parameters and hidden form fields (for now). In addition, there was apparently concern about the durability of the structure - it turned out that it was developing without backward compatibility.
  • Turbine Apache - at first it looked good; but the fact that he is quite old, and there is not much activity there, scares me.

Any suggestions on what would be useful to me? Thanks!

PS: I am forced to use one that is licensed under the Apache license (v2, preferably) or the BSD license

+6
java java-ee web-applications web-frameworks
source share
8 answers

Spring-MVC is another consideration

+3
source share

Stripes is the MVC web framework that first developed the Configuration Convention template for developing a Java network. Spring MVC has adopted some of these patterns, but I still prefer Stripes because it does one thing and does it well.

+3
source share

This is more of a new java infrastructure, but I think it looks pretty awesome.

playframework

+3
source share

Perhaps the Grazhil? You don't need to use o / r matching (GORM), if you don't want this, you can use plain old JDBC

+2
source share

How about a wicket?

http://wicket.apache.org

  • Component-based infrastructure with full markup and code. Each component of the panel is associated with a more or less ordinary HTML markup file, which allows you to customize the appearance the way you want.
  • Encourages OOP, easy creation of custom components, and code reuse.
  • Feedback check structure.
  • AJAX support with built-in "fallback" behavior for browsers without javascript
  • Bookmarked pages support
+2
source share

JSF - I'm afraid of this because of the performance issue that I read about. It looks like the design and maintenance of the view takes up too much memory. In addition, JSF will not work with bookmarks and tabbed browsers.

Try Seam Structure

  • improved performance (added talk area)
  • fixed JSF works well with bookmakers and tabbed browsers
  • many other pros :)

The seam is good for two reasons:

  • This allows you to quickly create an application (basic CRUD, such as RoR or Grails style)
  • This will be a good basis for further development.

I want to write a simple application website in J2EE, with these characteristics: 1. I do not need AJAX, and it must work with JavaScript disabled in the browser.

With a good JSF library (Richfaces or Icefaces) writing JavaScript code is minimized. Why is JavaScript disabled in the browser?

2. This is a simple CRUD application

Seam is great for building a CRUD application using the seam-gen tool.

3. I need full control over how each element of the page - no compromises in the graphical interface appearance.

This is work for CSS code. Using facelets as templates will be less work for you.

4. I can use a simple old JDBC to access data - no o / r mappers are necessary for a simple CRUD ORM application is really cool, with Seam you will get it for free. But ORM is optional.

5. Bookmarking pages - necessary (wherever bookmarking makes sense, that is).

As already mentioned, Seam is no longer a problem. There are only POST requests in "plain" JSF, and that is the problem.

6. Many of my users very often use tabbed browsing.

The seam represents new areas (the conversation process and buissines), so now you can open several tabs and simultaneously perform several tasks / threads.

What I need to do the framework: 1. Give me a good abstraction to get the GET and POST parameters.

This is a feature of JSF.

2. Give me a good tool for error checking the display and other errors to the user

Seam integrates with the Hibernate Validator and has good message and i18n support.

3. Give a set of standard security functions - preventing cross-reference scripts, prevent the user from setting a drop-down value that is not in the drop-down list, et.al

JSF IMO libraries are good in this field.

4. Be successful, scale well for more than 200 simultaneous users, on a not-so-powerful server. (without clusters - single node, common application server with several production applications)

Performance - yes. Stamped correction of throws without reference to the application pattern helps to use in kind. Using POJOs in a state of performance representation is similar to other frameworks such as Struts or Spring. For use cases in the real world, see the seam on the production page .

5. Be stable; because I would like to run this application without basic refactoring for at least 3-4 years

Seam and JSF are sustainable technologies.

0
source share

Thanks to everyone. Tomorrow I will create some sample applications using Spring MVC, Stripes (and possibly Wicket) and see them in action :)

I will update this answer with what I find.

Thanks! -Pradyumna

PS: It is disappointing that I cannot mark several answers as โ€œANSWEREDโ€ in stackoverflow .. :( I have to wait and see what I finally solve ..

0
source share

When you try to run Stripes, you can quickly get started with Rayures (with Maven ) or Stripes-Quickstart (with Ant ).

0
source share

All Articles