Wicket Katas

Download Link:
Kata 1
Kata 2
Kata 3
Kata 4
Kata 6

Wicket Katas are eleven objectives I had to accomplish by modifying the Professor Johnson’s wicket examples. Essentially, the purpose of this assignment was to familiarize myself with the Wicket framework through basic objectives. For each kata, every student had to note the overall time it took to complete each kata. In class I worked with Kylan Hugh and Christopher Ramelb to finish some of these katas, but I had to leave class early due to a different responsibility.

Kata 1A
Time: 3 hours
This kata was simple as it only needed to add time to the Date object using combination of the methods “getTime()” and “setTime().” But the problem is when the page is called again like in Kata 1B, the date needs to refresh. I had a problem with refreshing the date until I found the example in Wicket in Action textbook. To output the time for next week, I decided to store a time offset value. In this value I stored the one week offset in milliseconds.

Kata 1B
Time: 30 minutes
The HelloWorldPage is called again.

Kata 1C
Time: 1 hour
The hardest part was understanding where to write the code to go into “deployment mode.”

Kata 2A
Time: 15 minutes
At first the image did not show on the page, but I figured out that the image needed to be placed inside the package to show properly.

Kata 2B
Time: 3 hours
I really did not understand the method of wicket storing values for the page so I thought that I had to create a form. At first I created a textbox with “bold” as its value so I could visualize the value. I then had to understand the method of handling the parameters. Once I figured out how to use the PropertyModel object, I realized that Wicket does not use hidden inputs due to its programming model.

As such, I finished this kata by adding a session state class to store the class names of “bold”, “italic”, and “normal.” By storing this in the session object, I could call this from every link to stylize the text through the “onComponentTag” method. In the same way, I used the latter method to change the text on the button to “Make text bold”, “Make text italic”, and “Make text normal.”

Kata 3A
Time: 15 minutes

The kata was similar to Kata 2A.

Kata 4A
Time : 5 minutes
In class Kylan figured out how to implement the Velveeta cheese. When running “ant -f verify.build.xml,” I noticed that JUnit tests for Gouda cheese as the first element in the cheese list, so I moved the Velveeta cheese right after the Gouda cheese.

Kata 4B
Time : 5 minutes
Again, in class Kylan finished this kata so the time taken was a matter of me understanding the problem.

Kata 6A
Time : 5 minutes
I used the Mozilla Firefox add on called Firebug to find out that the blue stripes were class names, so I just removed the reference in the HTML page.

Kata 6B
Time: 5 minutes
This was easy HTML and CSS changes.

Kata 6C
Time: 30 minutes
This kata required reading in a properties file which was easy to implement with Java’s Properties class.