T
he Web application frameworks available todayoffer a wealth of development styles. Well-known Web development technologies such asJavaServer Faces, ASP.NET, and the Google WebToolkit use event-driven, component-oriented designsthat resemble traditional GUI programming. Thisapproach makes sense as Webapplications become more likedesktop applications in sophisti-cation and functionality all thetime. However, many of theseframeworks can be unwieldy,requiring heavy tool supportand having steep learningcurves. Also, the mingling of code and markup often chal-lenges testability, refactoring,and separation of concerns. AJava Web application frameworkcalled Wicket takes a light-weight approach to the compo-nent-oriented model to over-come these and other chal-lenges.At its core, Wicket is a Java framework for processingmarkup. It represents Web applications, each page inthem, and each component on each page as classes.Wicket then uses a simple naming convention to asso-ciate the classes responsible for dynamically manipulat-ing markup with HTML files via the classpath. Thesefiles are truly just plain HTML — validating documentsdevoid of JavaServer Pages (JSP)-style "tag soup," andfreely editable by designers.With markup processing as itsbase, Wicket extends to supportall aspects of modern Web appli-cation development by heavilyand effectively using the compos-ite and visitor patterns, as well aswell-conceived inheritance hierar-chies and interfaces.Using test-driven design to devel-op a FileDropoff applicationexample, this article illustratesWicket's approach to testability,authentication and authorization,form handling, page nesting, fileuploads with progress feedback,and the classic back-button problem. Throughout thedevelopment steps, the example highlights noteworthypieces of code and describes what's going on behind
2
The Java Developer's Guide to Web Development Frameworks. Copyright 2008, Jupitermedia Corp.
The Java Developer's Guide to Web Development Frameworks
[ ]
Java Web Development the Wicket Way
By Daniel Carleton
Download the source code for this article at: http://assets.devx.com/sourcecode/20755.zip
Jupiterimages
A Java Web application framework called Wicket takes alightweight approach to the component-oriented model toovercome these and other challenges.
“”
Leave a Comment