Archive for the ‘Development’ Category

Measuring code quality with Sonar

February 26th, 2010 by Allard Buijze
(http://blog.jteam.nl/2010/02/26/measuring-code-quality-with-sonar/)

sonar-blackonwhite At JTeam, we continuously strive for good quality code. The reason is very simple: bad quality code slows down the development process. The small investment pays out in even the simplest of projects.

Measuring code quality is not a matter of a single metric. Instead, software quality has many aspects, some of which can be captured in metrics. Those metrics can be nicely assembled within a single application, which gives a nice overview of the state of an application: Sonar.

Read the rest of this entry »

Wicket root mounts

February 24th, 2010 by Erik van Oosten
(http://blog.jteam.nl/2010/02/24/wicket-root-mounts/)

One of the very easy things with Wicket is mounting pages on the first words of a URL; listening to URLs like http://shop.nl/article/4513 is programmed before you can say xiphophorus clemenciae.
One of the very hard things with Wicket is mounting pages where the first words of the URL are a parameter; listening to a URL like http://twitter.com/erik_van_oosten is just completely impossible.

Completely impossible? Wicket 1.5 will make this easy but is very instable for now. This article shows you how to mount pages on the root URL with Wicket 1.4. We will need to apply some hacks so hang on!

If you are only interested in using the technique you can skip to the last section ‘Understanding the demo’.

Read the rest of this entry »

Axon Framework – the CQRS framework for Java – version 0.4 released

February 21st, 2010 by Allard Buijze
(http://blog.jteam.nl/2010/02/21/axon-framework-the-cqrs-framework-for-java-version-0-4-released/)

logoLast week, I published the 0.4 release of the Axon Framework. Axon helps developers build high performance, scalable and extensible applications using the CQRS pattern. The 0.4 release is a major step towards 1.0, and includes transactional event handling, high-performance caching repositories and easy configuration of event sourcing support. Furthermore, we have also built a demo application that uses Flex to get real-time updates pushed from the server.

Read on to find out more.

Read the rest of this entry »

Free Java hosting with the Google App Engine

February 4th, 2010 by Tom van Zummeren
(http://blog.jteam.nl/2010/02/04/free-java-hosting-with-the-google-app-engine/)

Lately I have been looking into and playing around with the Google App Engine. In this post I want to give a little introduction to the Google App Engine, why it can be interesting and how to work with it.
Read the rest of this entry »

CQRS – Designing domain events

January 27th, 2010 by Allard Buijze
(http://blog.jteam.nl/2010/01/27/cqrs-designing-domain-events/)

logo Command-Query Responsibility Segregation (CQRS) is slowly but steadily gaining ground as an architecture that helps developers to develop scalable, extensible and maintainable applications. Events play a major role in this architecture, and the way you design these events greatly influence the extensibility of your application.

In this post, I describe some CQRS event basics and design considerations that help keep your application extensible.

Read the rest of this entry »

Logging to the syslog from a java application

January 14th, 2010 by Jettro Coenradie
(http://blog.jteam.nl/2010/01/14/logging-to-the-syslog-from-a-java-application/)

Every application needs logging, it can help you during development and when debugging those annoying things that do not work in production. One question is where to put the logging events. All linux servers use a system log to log events that take place on the operating system level. You can find logs for the kernel, deamons, user actions and a lot of other items. The nice part about system logging is that maintenance people will always know where to look and that it is possible to use one server for logging.

At the moment I am on a project that uses a fair amount of servers. We have more than 20 servers for the different environments and a lot of components to investigate when trying to find problems. Think about squid logs, apache httpd logs, tomcat logs and more. To make this doable, we have a syslog server.

An application running in Tomcat does not log to the system log by default. In our situation, we want our components to log to different files. Syslog has a special facility that makes it easy to do just that.

This blog post discusses the different parts of configuring system logging from a java application using the well known log4j.

Read the rest of this entry »

Migrating content with Spring Integration – A real life example

January 13th, 2010 by Roberto van der Linden
(http://blog.jteam.nl/2010/01/13/migrating-content-with-spring-integration-a-real-life-example/)

In one of the projects we need to migrate content from multiple websites into Hippo CMS. One of the interesting parts of this migration is that one of the websites will constantly provide us with updates of the content. Therefore it makes the migration a continuous process.

In this post I will explain how we use Spring Integration to migrate content, handle errors, measure performance and deal with the fact that content could contain references to other content that is not imported yet.

Read the rest of this entry »

Using ehcache monitor

December 22nd, 2009 by Jettro Coenradie
(http://blog.jteam.nl/2009/12/22/using-ehcache-monitor/)

Screen shot 2009-12-22 at 10.25.31 AM.png

In my previous blog post serving a heavy load rss feed with spring 3 and ehcache I showed a solution for rss and caching using ehcache. After posting, Alex Miller commented about using a new product from ehcache called ehcache monitor. As curious as I am I decided to have a look.

In this blog post I give you a short introduction into the new monitor tool. I’ll use the sample from the previous post. I’ll explain the steps to take to do the test yourself, including installation. I will also show the screens to show you the actual monitoring.

Read the rest of this entry »

Rethinking architecture with CQRS

December 21st, 2009 by Allard Buijze
(http://blog.jteam.nl/2009/12/21/rethinking-architecture-with-cqrs/)

question_and_answer Many applications use some form of persistent storage to store its state. However, important information about this state is lost: why is the state as it currently is. Furthermore, a single model is used to store information that is retrieved for many different purposes, often resulting in extremely complex and bog-slow SQL queries.

Command Query Responsibility Segregation (CQRS) is an architectural style that makes a clear distinction between commands that change the application state and queries that expose the application state.

Read the rest of this entry »

Serving a heavy load rss feed with Spring 3 and EHCache

December 17th, 2009 by Jettro Coenradie
(http://blog.jteam.nl/2009/12/17/serving-a-heavy-load-rss-feed-with-spring-3-and-ehcache/)

For a project I am doing there was a feature request to come up with an rss component for their new website. This seems pretty easy but the amount of possible feeds (100.000) and the potential for very high load made us think about a custom made solution based on ehcache, spring 3 and rome.

Some of the requirements for the solution have already been mentioned. The following list gives an overview of the things to consider.

  • Over 100.000 of possible feeds.
  • Every search on the page can be used as a feed
  • Certain feeds will be under very high load
  • Content can easily be cached

Within this post I will discuss the different technical requirements for caching in these kind of solutions. I will also step through the creating of a feed using spring 3 and finally I present the demo application that can actually be used as a web application that exposes news content using a feed as well as a website.

Read the rest of this entry »