IT Poetry

Wicket headeaches
March 26, 2008, 12:38 am
Filed under: Programming

After using Wicket for some time i think its really good, but here is a summary of what could be better.

Problems with Wicket

  • Pages and components are forced to derive from a base page which can not even be instantiated without a special test environment.
  • The provided test tool, feels fairly immature and can not be used to test pages that need more input than what’s given in the constructor. (Tester does setupRequestAndRespones before startPage, which deletes changes to parameters.)
  • There’s a strange problem that you get a PageExpiredException if the visibility of component in onDetach(). This is an example of the unintuitive problems that I’ve run into when trying to do a bit more advanced things.
  • The test utilities has no/strange support for cookies.
  • The test utilities assumes that localization should be done according to the environment of running the tests, which means that assumptions regarding content can not be made without dealing with localization.
  • The logic programmer have to declare all components explicitly, and must allways instantiate all of them. The wicket could have defaulted to invisible if not instantiated, and should be more flexible in how components can be put on the page. It takes quite some effort to dynamically put content on the page.
  • Template pages are difficult to customize by special pages.
  • Wicket lacks some essential components, for example the programmer have to create his own components to insert an image tag to an external image!
  • I had to create my own page plumbing to serialize some XML to the user! (Even there was a suggested way to do this, there was no documentation to stop me from spending a lot of time with it. So either its the documentation or Wicket’s fault. I lost time, so I don’t care which one.)
  • Wicket uses final methods everywhere. -What’s the point? This just gives me head aches when I can’t mock like I want to!
  • At least to me, Wicket encourages a component model oposite to MVC. After my first bigger refactoring, I realized that I could simplify both the code and testing a whole lot by forcing a bit of separation of concern into my web app.

Some impressive things to balance with:

  • Good job with warning of serializable members. Pages should probably not have serializable members annyways! (Log4j, though)

Leave a Comment so far
Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: