Originally posted by John Todd:
And those are kids??!
http://www.jcp.org/en/jsr/detail?id=127
I guess comparing Wicket to JSF is like comparing Hibernate to
EJB 1 Entity Beans.
In a past life I taught a course on programming languages. A theme that seemed to motivate the progression of languages was the desire for better mechanisms for abstracting common aspects of applications so that code could be re-used. From machine language to assembly language we developed the macro. From assemply language to 3rd generation languages we obtained the subroutine (functions and procedures). Functional programming we obtained higher-order code that could receive operations as input parameters and return operations as results. Object oriented languages could also do this because objects embedded operations, and operations could receive and return objects. In addition, object oriented languages such as Java added inheritance and
polymorphism. In Wicket you can use all of those techniques (via Java) to parameterize and re-use your views, and any pieces thereof.
Using
JSP, incontrast, is like going all the way to reliance on assembly-language style macros for re-using pieces of your view. I don't think JSF makes re-use any easier -- it mainly gives you more powerful components as initial building blocks and the opportunity for tools to help you assemble them.
The people who created J2EE web technology are not stupid, but I think they were trying to imitate Microsoft technology rather than working from first principles. JSP technology was so that Java programmers could embed Java into HTML files much as Microsoft's ASP let users embed Visual Basic code into HTML. (Then we got a whole lot of frameworks to deal with the fact that embedding programming language statements into HTML was really not a very good idea -- though it was an approach that high school students found easy to comprehend.)
JSF imitated ASP.NET -- which in turn imitated client-server rapid-application-develelopment tools, which were intended to let users design with a WYSIWYG tool and program by entering code and data by clicking property editors. That makes it easier to do the common tasks, at the expense of making it harder to do the less typical tasks. For example, if you want to abstract and generalize some of your view functionality and make it available for re-use, you're expected to build a GUI program (a set of design-side component classes) for developers to execute inside the
IDE to enable him to insert your component into programs.
With JSF it will be too much effort to re-use much code. The only advantage is that if you do go through all the trouble of preparing a design-side interface, the your component's users won't have to read the JavaDoc to learn its API.
I think it all comes down to the question as to whether you want a tool that makes it easier for a bad programmer to write bad code, or a tool that makes it easier for a good programmer to write good code.

[ September 26, 2008: Message edited by: Frank Silbermann ]