2012 Apr. 27

Create Instances of Annotations (for UnitTests)

Usually you don’t have to test Annotations. But you might want to test the effects of your Annotations and (given an Annotation with parameters) this can get quite awkward if you try to write classes or methods for every variant to annotate and test.

2012 Apr. 18

Wrapping or Proxying Wicket Components - A story of failure in three acts

When working on Wicket CRUDr, I encountered a problem which could be used easily by using a simple wrapper or proxy for existing components. These components are to be created by factory methods and need some additional functionality (like specific implementations of the onModelChanged-methods). Since I wanted to dumb down these factories and didn’t want to have everyone implementing new factories to have to know about these, I thought, it would be nice to add the functionality afterwards.

2012 Apr. 12

Scaffolding with Wicket

What I like least in web development is to write simple CRUD editors. These no-brainer lists and forms without any logic or other fun stuff, that are needed just for data entry or administration of a web application. I don’t talk about any of these fancy client-facing editors that contain the juice of the application but the simple database-to-model-to-browser-to-model-to-database-workhorses that do the heavy lifting in the background. Other frameworks or programming languages try to help you writing these by providing scaffolding methods that either create those forms on the fly at runtime or by using code generators. There are a couple or attempts to do this with Wicket but none that suited my needs.

2012 Feb. 15

Off to new shores!

Shortly after hitting the 2000 readers mark, this is the next major step for this blog (at least as far as I’m concerned). I decided to leave my previous provider and move the blog over to my server. It might seem odd to host a blog about java-development with an additional focus on Apache Wicket using a PHP powered blog software, but I just didn’t like JRoller and writing my own doesn’t seem interesting enough right now with all those pet projects and ideas haunting my mind. So, that’s it, Wicket Game will be running from this site, will be PHP driven and not following the NIH-pattern for time being. I wouldn’t say “from now on” since this is just a side project to my pet projects and I don’t want to commit myself to this software, this domain or this URL…

2012 Jan. 24

2000 Readers

At some time during the last night, this blog saw the 2000th reader passing through. Starting very late in March 2011, it first picked up some readers with a non Wicket related rant which is still number two in the list of the most-read posts, second only to a little tale about wickettester.

2011 Dec. 15

JNDI with Eclipse, Jetty, Hibernate (and Wicket)

In a previous post (Sending an email programmatically via an password protected SMTP-server), I pondered about where to put the config-files for my mail server and database since all of the environments (my dev box, the test server and the production machine) use different accounts with different passwords (and partially different settings). I decided that the best place would be the webserver users home directory, which solves the problem of having different configurations on different systems but introduces a new risk of a new deploy-step needed to update changed configurations (namely added database entities in hibernate.cfg.xml) which I simply forgot more than once. Since it only happened on the test server which didn’t start due to missing entities this was easy to spot, easy to fix and not a problem as such. But chances are, that this might happen with more important things that don’t fail at once so there’s got to be a better way, which comes by the name of JNDI (which translates to Java Naming and Directory Interface and not to Just Not Directly Intuitive which might be fitting as well).