tl;dr When writing integration tests for Spring applications, align them with your functional decomposition approach, because that means you will test more cohesive elements of your code base. That orientation produces tests better aligned with the “Four Pillars of a Good Test” (from “Unit Testing—Principles, Practices, and Patterns” ) than the traditional, horizontally-sliced approach. Spring…
On behalf of the community and all contributors to the release, I am excited to announce the availability of jMolecules 2.0 . Five years after its first major version, we now ship the second generation, marking an important step in our vision to empower developers to write architecturally evident code and ultimately produce more understandable and thus better software. I would like to spend a few…
One of the most favorite topics of mine is improving software quality — and software maintainability in particular — through the means of decomposition. A problem associated with that, of course, is how to measure the success of a particular strategy chosen. Software metrics are a common means used to project the current state of a system into something seemingly measurable. In today’s blog post,…
I’m currently busy booking travel for quite a few conference and JUG appearances that have been in the pipeline for a while. It’s gonna be a wild mix of Spring Modulith talks and workshops, Domain-Driven Design, jMolecules and a Spring get together with members of the core team. Some of these events are commercial, but others are free to attend. Be sure to sign up, I would love to see you! 28.09.…
It has been almost exactly 15 years since Jeffrey Palermo posted the first blog of his series on the Onion Architecture . In that post, he summarized ideas that essentially form a continuation of the Hexagonal Architecture approach by Alistair Cockburn. Although I have always thought that both of these approaches to code organization do not necessarily constitute “architectures”, I find them…
I’d like to announce the availability of Moduliths 1.1 GA. Moduliths is a toolkit to create modular, monolithic applications based on Spring Boot. The release ships with significant improvements and new features: Module detection SPI - #137 Improvements to Module Canvas Custom component grouping - #130 Event listeners report type they’re interested in - #132 Origins of published events - #139…
The RESTBucks sample project has served as showcase for various Spring related technologies in the context of building a hypermedia based API implementing a high-level business process for almost a decade. It has evolved significantly since then and – in the last couple of months – accumulated quite a batch of changes. I think that it’s worthwhile to have a look at them and how new libraries,…
Expressing architectural concepts in code often stops at naming conventions and technologies implicitly describing these concepts. jMolecules provides annotations and types to describe architectural context and technology specific integration to derive concept specific default mappings and boilerplate code to minimize the gap between architectural idea and the code written to implement those.…
NOTE: This post has been largely superseded by “Architecturally evident code with jMolecules”. Make sure you rather read this one for the most up to date state of affairs. When it comes to implementing building blocks of DDD, developers often struggle to find a good balance between conceptual purity and technical pragmatism. In this article I’m going to discuss an experimental idea to express some…
I’ve recently been pulled into a discussion about the effect of contracts in distributed systems both technically and regarding team communication. As usual, 140 characters are quite a limitation for reasonable discussion I thought I’d summarize my ideas here. Where do we come from? Let’s get the elephant out of the room: everyone is talking about microservices these days. Just like so many…
Recently, I stumbled over a blog post by Jonathan Channon explaining how he got to realize that hypermedia APIs are not some magical thing but rather a pragmatic approach to reduce coupling between services. Also, I’ve been traveling conferences with a talk on Domain-Driven Design and REST recently that covers the aspect of hypermedia as well and features an — as I think — rather nice example of…
I’m quite frequently getting pulled into discussions on Twitter about the different flavors of Dependency Injection . Also, I’ve repeatedly expressed my distaste for field injection but as Twitter is not the right communication channel to give an in-depth rational about my opinion. So here we go. Let’s discuss this stuff with a bit of (quite generic) context: we want to code a component that has a…
Yesterday evening, a few tweets made it into my Tweetbot column listening to tweets related to Spring Data. The one raising my attention was pointing to a blog post creatively entitled “ Spring Data MongoDB - A Mismatch Made In Hell ”. As the title already suggests, it contains a rather rigid critique of the features and design approaches we chose for the MongoDB module in the Spring Data project.…
*Jürgenization noun jərgenajzeʃən* The process of turning code to solve a problem at hand that might look sufficient at the first glance into rock solid, quality assured, perfectly documented and extensible code. This process might consist of a complete rewrite of the code that originally made it into the process (Karma level 0) to only minor modifications (Karma level 10), usually depending on…
I’ve been recently pulled into some Twitter conversations about the quality of the new open data portal “launched” by the German government available at govdata.de . I put launched in quotation marks as the launch has been a rather rocky one critized through out the web . I in particular made fun of the very verbose api resource the portal exposes. If you do a GET on it all you get returned is a:…
I am currently travelling conferences and Java User Groups with a talk called “Whoops! Where did my architecture go?”. It discusses approaches to create and maintain logical architectues in Java code bases, challenges, tools and tries to outline some ideas how one can accomplish this. A core part of the argumentation is the discussion about the importance of Java packages. Jens Schauder has…
When my former Wordpress-based blog crashed quite a while ago, I didn’t really bother to set it up again as I was to busy with other things. But as I felt the urge to go beyond Twitter posts to elaborate on certain topics in the recent time I thought I’d give it yet another spin. The course of re-setting up the blog essentially consisted of two aspects: selecting a new blog software, and trying to…
Pretty much every application out in the wild is using logging to some extend. As applications tend to have bugs (yes, yours as well) it’s a common requirement to alter log levels at runtime. As JMX (Java Management Extensions) is a standard to monitor and manage applications it seems to be a reasonable approach to expose the loggers used in an application via JMX to allow tuning of log levels via…
In the #java.de IRC channel someone pointed me to this request for enhancement in Hibernate recently. The bottom line here is that Hibernate’s statistics feature that can be used to capture persistence metrics (information about query executions and execution times and so on) does not include queries triggered through using the criteria API. This is quite a a reasonable request for enhancement in…
As summer’s fading out more or less, it’s time to take a look at upcoming times. Autumn is usually quite packed with conferences and this seems to continue this year. I’ll kick off my conference autumn by speaking at WebAppDays in Düsseldorf (Sept. 27th/28th) presenting Roo as rapid java application development framework as well as giving an overview about tcServer , the SpringSource commercial…
Our latest Hades release of the 2.0 branch is introducing transactionality of DAO instances as main new feature. Of course you can read up the reference documentation for some general guidelines but I want to use the chance to give a more detailed look into why we introduce this and how some details work. These days, some kind of back-to-the-basics approach regarding architecture layering is…
Sonar is a great tool to take care of code quality in your software projects. I use it heavily to monitor the open source projects I am involved with . When working on getting Hades published into Maven central I had to polish it’s pom.xml and felt the need to align the parent project’s artifact to our chosen OSGi compatible package notation for artifacts. So prior to releasing it to Maven central…
As you probably already might have noticed, yesterday we released Hades 1.5. Alongside with that the firs 2.0 release candiate sees the light of the day, too. Let me just take some lines to elaborate on the specialty of this release. Why 1.5? The first question that might arise is why this release is 1.5 whereas it’s predecessor was 1.1.2. Originally the release was planned as 1.2 but as it…
Java web application developers often face the need to inject a regular Spring bean into a non-Spring-managed artifact like a Servlet or a JSP tag.. If you browse the web for you find various quite outdated solutions to it. No offense, by the time being these were quite appropriate solutions. One of them you’ll probably will find is the following: public class MyServlet extends HttpServlet {…
Yesterday I gave a talk on REST based web applications with Spring 3. REST based web applications with Spring 3 from Oliver Gierke You can also grab the sample code at GitHub .
It’s been official for a few days now, so I thought I could drop a public note about me joining SpringSource Germany (division of VMware) as Senior Consultant beginning March 1st this year. Time to look back on three exciting years at Synyx and an outlook of what’s about to come. I joined Synyx almost exactly 3 years ago. Since then I had an exciting time with awesome folks, a wide variety of…
If you have worked with Spring 2.5 annotation based web MVC framework you know that it allows you to freely design you controller method signatures: @RequestMapping(value = "users", method = GET) public String showUsers(Model model) { model.addAttribute("users", userManagement.getUsers()); return "users"; } As you can see we use a parameter of type Model that will we automatically get an instance…
The June issue of the German JavaMagzin features an article about Hades written by myself. I sketch out issues implementing persistence layers briefly and introduce solutions to these issues using Hades. Furthermore fellow developer Alexander Hanschke introduced Java User Group Mannheim in yet another article, too. Check out the current issue and get your copy. Beyond that, we at Synyx decided to…
Today I devoted my day to a general check in how far Hades can be run with the latest Spring 3 milestone . After managing the typical Maven foo I had a project profile up and running that builds Hades against Spring 3 M3 and executes the tests against it. In case you try to migrate some of your code, too, and wonder where spring-agent JAR has gone: its org.springframework.instrument now. But back…
As you might not be aware of, besides injecting dependencies into beans Spring is able to inject dependencies into objects that are not instantiated by Spring. This becomes especially handy if you’re stuck to Domain Driven Design leveraging a rich domain model over an anemic one. As there’s been some buzz around that functionality on twitter, I just put some small quickstart project together that…
Let me prodly announce version 0.5.0 of Hades. As our project home gives you the quick overview and access to the latest binaries, sources and documentation I want to use this post to elaborate a little bit on the changes in 0.5.0 as well as the future roadmap. Streamlining of the Spring namespace Version 0.5.0 one more time simplyfies the XML required to setup Hades DAOs with Spring. The only…
The latest episode of the JavaPosse podcast presents a session of the this year’s JavaPosse roundup on Scala and application modularity. Although I attended the conference I did not attend this session, which is rather sad in retrospect as the attendees discuss a lot of things I also deal with. As a note aside I want to mention, that I am of course aware of OSGi and it’s capabilities, that prvide…
Although it took me a while to get used to them, I now pretty much like the annotation based programming model for controllers in Spring MVC. The major advantage over the traditional inheritance based approach is, that the methods, that are bound to requests are simple public methods, that can easily be unit tested. So while unit testing the behaviour of the method is fine, one actually might want…
It’s been a silent release, nevertheless I want to post a tiny shout about it. Hera is a small plugin library that allows you to create pluggable architectures based on Spring using build time configuration. You might want to find out details by skimming my introducing blog post about it. Version 0.4 is not a very feature rich release as there is actually only one new one. With this release you…
The first two days are over, time to wrap up the first half of it. The actual conference started on Tuesday but the day before there was a Hackathon on alternative languages on the JVM. But let me start from scratch. My flight to the states was actually quite nice although it took me almost 24h to finally get to Crested Butte, Colorado. Crested Butte is situated in the western Rocky Mountains…
Passionatedly practicing conference driven development I’d like to announce version 0.4 of the DAO implementation library Hades. Eclipse plugin Using Hades namespace configuration in Spring applications can now be simplyfied by installing the Hades Eclipse Plugin from our update site. The plugin will extend Spring IDE to know the Hades namespace, parse the DAO beans correctly and thus provide the…
2 more days and I will make my way to Crested Butte, Colorado to join this year’s Java Posse Roundup . Not having attended an “Uncoference” before I really look forward to this style of conference as the concept sounds promising. The week will be packed with geek activities but also leave room for leisure as Crested Butte is situated in a large skiing area actually. Last year’s pictures look…
Today I’ve got an email by Thomas Braun who considered to play around with Hades. He is facing an application with an existing data access layer based on Spring’s HibernateDaoSupport class. This raised the question of how to integrate Hades into the app without changing existing code. Thomas was using AnnotationSessionFactoryBean to create the SessionFactory from annotation metadata. As Hades…
As I have twittered already, I am reading “Clean Code” by Robert C. Martin right now. I expected the book to be a very fundamental one. Although there are a few parts I do not entirely agree with, I just rummaged throught chapter 11 “Systems” on my way home and was surprised how condensed Robert summarizes principles constructing software systems that I usually promote discussing such topics with…
Episode 121 of Software Engineering Radio deals with the topic of OR Mappers. Michael Plöd introduces the concept of object-relational mapping technologies, discusses advantages and disadvantages. The content of the episode is very basic to a large extend, which makes it ideal to get an introducing idea of the topic. The reason I discuss this here is a discussion Arno (the interviewer) is…
As i twittered a few days ago, I stumbled over a subtle issue in the core Java library. Not as extreme as here but one to raise ones eyebrows, too. I just wanted to write a small method to access an enum value by its String representation or use a default, if the conversion fails: public static <T extends Enum<T>> T toEnum(String value, T default) { // Checking values omitted return (T)…
Yesterday I gave a presentation about Hades at the Java User Group Karlsruhe. It was preceeded by an introduction to Aspect Oriented Programming by David Linsin and Florian Waibel of Netpioneer that showed the usage of AOP to define system architecture constraints. You can download the slides as well as the sample code here or all stuff at the JUG Karlsruhe Google group .
Attenting Devoxx last week , I had the chance to talk to Joshua Bloch about an compiler issue I had a while ago implementing static factory method pattern from his book. Take this as example: public class PluginRegistry <T extends Plugin<S>, S> { public static <T extends Plugin<S>, S> PluginRegistry<T, S> create() { return new PluginRegistry(); } } PluginRegistry<Plugin<String>, String> registry =…
After the announcement of the release of Spring 3.0 M1 Jürgen Höller blog comments complained the artifacts not to be available in a Maven repository. Actually, according to Chris Beams, it now is. Take a look at his blog comment . I’m leaching it from the servers right now…
I’m taking a break currently, skipping one of the talks here. Devoxx is actually the most exciting conference I ever attended and I want to take the chance to recap some of the impressions I got here. After 4 days of non-daylight, lots of coffee and coke, I really have to say that I liked it very much. I will see a presentation by Stephan Janssen on the new Parleys.com as well as some other ones…
I am pleased to announce version 0.3 of Hades , an open source project I lead. The release bundles a new ExtendedGenericDao implementation based on EclipseLink as well as some major package refactorings. For more information and a detailed changelog see the project homepage .
Tomorrow some colleagues and me will be travelling to Antwerp, Belgium to attend this years Devoxx (formerly known as JavaPolis / Javoxx) conference. I really look forward to this as conferences are always a good change to sniff the latest news and currents as well as meeting a lot of fellow developers . Furthermore I will give a short intro into Hades on Tuesday . I will try to sum up every day…
Browsing the latest JavaMagazin leader written by Stefan Tilkov , I stumbled about a phrase in his abstract, that triggered some thought I wanna share with you. Stefan claims REST to be a more lightweight approach to web services than SOAP. First I have to admit, that I clearly favour REST style webservices over SOAP one, too. The projects I worked with them were clearly less cluttered, less…
There some upcoming talks on Hades I will give on a variety of locations and events. As I don’t want to deprive the dates from you, here we go: Dec, 9th 2008 - Devoxx Conference, Antwerpen Dec, 17th 2008 - Java User Group, Karlsruhe Jan, 15th, 2008 - DevDusk, Frankfurt Perhaps some of you will attend one of these events. Don’t hesitate to contact me, get in touch and come by to share thought.
Java EE development has been packed with lots of metadata since day one. Things have changed a lot over times and we have been provided with more elegant solutions. I don’t want to go deeply into the ongoing debate on Annotations versus XML but rather go one step back and discuss metadata on a more conceptual level. What is metadata? Wikipedia names “data about data” and further explains: In data…