Rich Domain Objects and Spring Dependency Injection are compatible
I’m currently working in a an environment where most developers are Object-Oriented fanatics. Given that we develop in Java, I think that it is a good thing – save the fanatics part. In particular,...
View ArticleSpring method injection with Java Configuration
Last week, I described how a Rich Model Object could be used with Spring using Spring’s method injection from an architectural point of view. What is missing, however, is how to use method injection...
View ArticleMy case against autowiring
Autowiring is a particular kind of wiring, where injecting dependencies is not explicit but actually managed implicitly by the container. This article tries to provide some relevant info regarding...
View ArticleIntegrate Spring JavaConfig with legacy configuration
The application I’m working on now uses Spring both by parsing for XML Spring configuration files in pre-determined locations and by scanning annotations-based autowiring. I’ve already stated my stance...
View ArticleSpreading some JavaFX love
I’m not a big fan of JavaFX: version 1 was just a huge failure, and investing in fat-client architecture in 2013 is either because you have very specific needs or are completely out of your mind....
View ArticleSolr, as a Spring Data module
At the end of October, I attended a 3-days Solr training. It was very interesting, in light of the former Elastic Search talk I attended mid-year. As an old Spring Data fan, when I found out Spring...
View ArticleGuava is an heavyweight library and I would like this to change
Google Guava is an useful library that offers many different but unrelated features: For my Vaadin projects, I like using Event Bus to promote loose coupling along my components Guava offers Functional...
View ArticleWebJars and wro4j integration
WebJars is an easy way for server-side developers (such as your humble servant) to manage client-side resources such as Bootstrap, jQuery and their like, within the same package management tool they...
View ArticleExtrinsic vs intrinsic equality
Note: the following article is purely theoretical. I don’t know if it fits a real-life use-case, but the point is just too good to miss Java’s List sorting has two flavors: one follows the natural...
View ArticleReusing front-end components in web applications
In the Java SE realm, GUI components are based on Java classes with the help of libraries such as AWT, Swing or the newer JavaFX. As such, they can be shared across projects, to be inherited and...
View ArticleChaining URL View resolvers in Spring MVC
Standard Java EE forward to internal resources go something like this: Admittedly, there’s no decoupling between the servlet code and the view technology, even not with the JSP location. Spring MVC...
View ArticleVaadin and Spring integration through JavaConfig
When I wrote the first version of Learning Vaadin, I hinted at how to integrate Vaadin with the Spring framework (as well as CDI). I only described the overall approach by providing a crude servlet...
View ArticleIntroduction to Mutation Testing
Last week, I took some days off to attend Devoxx France 2014 3rd edition. As for oysters, the largest talks do not necessarily contain the prettiest pearls. During this year’s edition, my revelation...
View ArticleThe Visitor design pattern
I guess many people know about the Visitor design pattern, described in the Gang of Four’s Design Patterns: Elements of Reusable Object-Oriented Software book. The pattern itself is not very complex...
View ArticlePlaying with constructors
Immutability is a property I look after when designing most of my classes. Achieving immutability requires: A constructor initializing all attributes No setter for those attributes However, this design...
View ArticleScala on Android and stuff: lessons learned
I play Role-Playing since I’m eleven, and me and my posse still play once or twice a year. Recently, they decided to play Earthdawn again, a game we didn’t play since more than 15 years! That triggered...
View ArticleA single simple rule for easier Exception hierarchy design
Each new project usually requires setting up an Exception hierarchy, usually always the same. I will not go into details whether we should extend RuntimeException or directly Exception, or whether the...
View ArticleBack to basics: encapsulating collections
Younger, I learned there were 3 properties of the Object-Oriented paradigm: Encapsulation Inheritance Polymorphism In Java, encapsulation is implemented through usage of private attributes with...
View ArticleThe right bean at the right place
Among the different customers I worked for, I noticed a widespread misunderstanding regarding the use of Spring contexts in Spring MVC. Basically, you have contexts, in a parent-child relationship: The...
View ArticleFirst release of Integration Testing from the Trenches
My job as a software architect is to make sure the builds I provide have the best possible quality, and more specifically internal quality. While Unit Testing sure helps creating less regressions,...
View Article