0% found this document useful (0 votes)
1K views20 pages

Apache Wicket

Apache Wicket is a Java-based web application framework that uses components to build web pages. It allows developers to treat web pages as objects and components as Java widgets, addressing the impedance mismatch between object-oriented programming and request-response web applications. Wicket enables building web UIs with reusable Java components in a more object-oriented way compared to traditional MVC frameworks.

Uploaded by

mohankumarvsk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
1K views20 pages

Apache Wicket

Apache Wicket is a Java-based web application framework that uses components to build web pages. It allows developers to treat web pages as objects and components as Java widgets, addressing the impedance mismatch between object-oriented programming and request-response web applications. Wicket enables building web UIs with reusable Java components in a more object-oriented way compared to traditional MVC frameworks.

Uploaded by

mohankumarvsk
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 20

Apache Wicket

Java Web Application Framework

What is Wicket?

Web Application Framework Component-Component-based Framework Wicket 1.4 is Java 1.5+ compliant

Where does Wicket fit?

Request / Response

JSP Request / Response

Model 2 (MVC)

Struts, Spring MVC, Stripes

Advantages of R/R

Rendering views is generally quite fast Development can leverage existing tag libraries Recruiting developers may be easier Modern implementations have good support for DI and IoC frameworks

Disadvantages of R/R

Controller implementations must explicitly consider multiple concurrent users and threads Controllers generally work literally in terms ofHTTP requests and responses Controllers often explicitly manage state Not strictly Object Oriented The programming model is skewed

The Impedance Mismatch


The Programming Model Programming in Java - do we regularly focus on how the JVM manages object instances and variables? Generally, website development requires an understanding of the HTTP protocol. IE: manually managing state within and across requests forces front end handlers to be protocol specific.

What if ... ?

What if we considered a page ... a Page? What if we considered a button ... a Button? And upon clicking a button, handled an onClick event? What if web-development resembled Swing or eventdriven development? What kind of framework could possibly enable this?!

Enter ... Wicket


Component-based framework Instead of creating a controller, servlet or action class ... create a Page Place components on said Page and define how each component reacts to user input Build the Page in Java to manage HTML page elements ... not the other way around

Web App Config

web.xml

Wicket Config

WicketApplication.java

General Structure

Layout the element hierarchy Style the elements Markup (HTMLs Role) Code (Javas Role) Properties Files

Hello World

Markup

Java

Result

Forms (HTML)

Markup

Forms (Java)

Java

Component Family

Advantages

POJO-centric Avoid overuse of XML configuration files Fully solve back button problem Easy to create bookmarkable pages Reusability Easy to integrate with Java security Compatible with any ordinary HTML editor

Wicket Resources
Wicket Links http://wicket.apache.org/ http://wicketstuff.org/ http://cwiki.apache.org/WICKET/ Wicket Books Wicket in Action (Manning) Pro Wicket (Apress)

You might also like