Skip to main content

Welcome to Geoff Hayward's weblog.

Here are the photos I took at Devoxx Poland Java conference this year.

If the slideshow does not work for you here is a link to the Devoxx Poland photos.

 Comments: 0 Tags:DevoxxJava EEJava SE
Go to post

This Sunday I am heading to Krakow to attend the 2015 Devoxx Poland Java conference. It's the first Devoxx in Poland. The conference has sold out all of its 2000 tickets. Wow, 2000 Java programmers in one place at one time. I can hardly wait. The conference commences on Monday and runs for three days.

I have planned out which talks I'm hoping to watch. Being keen on distributed computing, I am looking to go to most of the microservices talks. I would like to learn what's new in microservices (slash distributed computing), how it's being done nowadays, and what the current known pros, cons, issues and solutions are.

The conference has a few interesting looking talks on security too. I am hoping to go to the security talks. Being keen on RESTful web services, I would like to go to Erik Jan de Wit talk on OAuth2.

As well as the great content of the conference, I'm looking forward to the opportunity of chatting with other Java developers. Devoxx Poland here I come.

 Comments: 0 Tags:DevoxxJava SEJava EE
Go to post

Whilst fixing a defect in this blog's platform I realised that a particular business rule could be moved out of the code; into a database view. The movable business rule was "All posts returned to the front-end should have a published state". This rule extends to include a post's tags. That is "only the tags of a published post should appear in tag summaries".

One way to add this business rule would be to preform a WHERE published = true check in each respective query. The check would be executed by the database but is declared in the code. The declaration of the check is also in many places. I found it is particularly easy to forget to declare the check when joining tables. In the case of the tag summaries the check got over looked in a join between tags and posts.

Another way to add this rule to the platform would be to create a database view that encompasses the rule. Each query that has the aspect would then use the view. The business rule is then given once, declared and executed in the database. The join between tags and posts would then be:

SELECT *
FROM tags t
JOIN published_posts p
[...]

Where 'published_posts' is a database view; not a table.

 Comments: 0 Tags:Software Engineering
Go to post

Some context: I'v just been bug fixing a JavaFX 8 application. The application has a JavaFX ComboBox that lets a user select a file name from a list. When a selection is made the file is read into a TextBox. This functionality worked fine until a clear button's event was added to the same controller.

@FXML
public void clear(ActionEvent event) {
    [...]
    myCombobox.getSelectionModel().clearSelection();
}

When a JavaFX ComboBox is cleared with .getSelectionModel().clearSelection() the onAction events of the ComboBox is called. This makes it important to null check within the onAction event.

@FXML
public void selected(ActionEvent event) {
    if (myCombobox.getValue() != null) {
        [...]
    }
}

To conclude: If the onAction event of a ComboBox uses the ComboBox's value within the event it pays to null check the ComboBox's value.

 Comments: 0 Tags:JavaFX 8Java SE
Go to post

After several weeks of programming a bespoke blogging platform it's finished. Well kind of finished. I will get to that. The blogging platform is for Web Developers, who need the back-end application part of a platform but do not wish to be tied to one language and template engine for their own front-end development work.

Why the need? I decided to create my new website with Java EE 7. I am a huge fan of Java EE 7 and JSF 2.2. The blogging platform is simply a by-product of that wish.

In the next iteration I intend to crate a REST API so that the front-end can be an authenticated REST client. Thus achieving the goal of language and template engine independence. In the meantime I'm road testing the blog platform with my own website. Once the next iteration is ready I will probably commit the platform to a public GitHub repository. You can find more information about the blog platform over at javablogplatform.blogspot.co.uk/.

Why the new website? My blogging goal has changed since creating the old website. I wish to have more of a weblog. The subject area of this new website will be anything Java EE, Software Development, and MSc study related. For convenience I have created an archive of my old posts. The Joomla ResponsiveMedia download can also be found there.

So here goes

Go to post