Discussions

General J2EE: Struts vs. Jade

  1. Struts vs. Jade (1 messages)

    A strategic partner of ours came in and gave a presentation on the Jade framework recently. They mentioned that the Jade framework is a more scalable framework and cited several shortcomings of Struts, our soon to be standard framework. They are as follows:

    1. Performance issues. That is to say that since struts is a single servlet framework there will be memory issues once we get over 100 concurrent users hitting a web site.

    2. Security limitations on the application server side since it is a single servlet framework.

    3. Inability to analyze site usage, once again due to the single servlet model.

    Has anyone worked with both of the framework and can give an opinion on one vs. the other. If you can share your thought I would be very grateful.

    Josh Pak

    Threaded Messages (1)

  2. Struts vs. Jade[ Go to top ]

    I have never heard of Jade, but I have used struts...

    1. What memory issues are they talking about? Do they mean 100 concurrent sessions or 100 concurrent requests? Servlets are multithreaded, so there are no contention issues. (but that wouldn't be a 'memory issue' anyway)

    2. We do our authentication with a login page which stores a cookie in the users browser, and our base struts Action class checks that it's there. Our base struts Action class also does authorisation for individual requests, based on the identity of the user and the identity of the action. This works -- Jade may make things easier.

    3. You can either front your servlet engine with a web server (which is a good idea if your site has much static HTML) and look at its logs, or log from your struts action classes.

    Jade may well be a great product, but I don't see the points mentioned as valid (although I don't understand what they mean by the first one).

    There are things struts doesn't do too well -- it is a very loose framework, and it's easy to end up with different developers doing things different ways, and to find that some of those ways are not very nice.

    Some rules I think are good:

    - never modify the struts classes themselves -- you may want to upgrade one day.

    - be sure that you have the right split between the code in your Action classes and the code in your EJB's (or helper classes) -- there's nothing worse than an Action class which is trying to do too much.

    - don't use parameters in the request to make one Action class do two things. You can reinvent the goto statement this way.

    - I'm sure there are other important rules that I haven't learnt yet!

    Tom