[jboss-user] [JBoss Seam] - Re: JBoss EL performance vs Sun EL

mgrouch do-not-reply at jboss.com
Sat Sep 15 21:16:36 EDT 2007


Now here is an illustration how ridiculously inefficient JSF design is.
It forces developer to write the most inefficient code

Example:

based on type value stored in columnBean.type you need to render
several different HTML controls

So you would have to repeat

<s:fragment rendered="#{columnBean.type == 'type1'">
  |   fragment1
  | </s:fragment>
  | 
  | and so on.

In regular programming language there would be a 'switch' statement
and since conditions are mutually exclusive after one condition is met
there is no need to evaluate others.

1) In JSF for N mutually exclusive 'rendered' conditions they will
ALWAYS be evaluated N times!!!

2) Even worse there is no syntax to assign columnBean.type to a variable
so it will be EVALUATED EACH TIME!!!

3) Even worse it will be evaluated using REFLECTION!!!

4) JSF will give you temptation to write condition as STRING comparison
    (Though this is avoidable, but most people write it exactly that way cause
     declaring a constant is not supported)

Please, correct me if I'm wrong about something. (Might be things are not that bad)





View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4084793#4084793

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4084793



More information about the jboss-user mailing list