Showing posts from 2011

How to find the right balance in between functionality and technology

The fundamental goal of each software developer is to build and deliver the right software that satisfies their customers. A software developer that wants to succeed, must be a professional focusing on a positive outcome of the project. He needs to find the right balance between building the right software and building the software right. Read my article here:

(My) Top 5 enhancements of Spring MVC 3.1

After many months of development Spring 3.1 has been released. The release is shipped with some exciting features like caching abstraction, bean profiles and container configuration simplifications. This release introduced also many useful enhancments to Spring MVC. Read my full article at GOYELLO blog here:

Spring 3.1 HttpPutFormContentFilter: supporting PUT request with form encoded data

Spring MVC 3.0 introduced many useful features to work with RESTful interface, including URI templates, content negotation, http method conversion and more. While dealing with RESTful or REST-like API you may like to utilize REST key principle - its Uniform Interface.

Pretty Time - timestamp formatting made easy

Today I was looking for an utility to help me with formating timestamps to user friendly string values like: "moments ago", "few minutes ago", "in couple minutes" etc. Why to write my own implementation, when for sure someone already did it before? And did it better? While googling ("pretty+time+in+java") I found Pretty Time library and I tried it out.

5 things I like in Java 7

Java Platform, Standard Edition 7 was finally released. And even though Lambda, Jigsaw, and part of Coin were dropped from Java 7, it still has some features that I belive will speed up and generally improve development of Java applications. The below list is my personal choice.

Spring 3.1 MVC: xml-free configuration in Servlet 3.0 environment

Starting from Spring 3.1.0.M2 you can configure Servlet Context programatically in Servlet 3.0 environment (Tomcat 7 for example), with no web.xm l and no xml at all. This article demonstrate working Hello World example with xml-free web application configuration. Update: See Spring MVC Quickstart Maven Archetype (no-xml Spring MVC 4 web application): to get started with Spring MVC. The project is actively maintained and just got updated: To start with the project I used STS and I created new Template Project ( File > New > Spring Template Project > Spring MVC Project ). Once the project was created I made some small modification to the POM file: removed Spring Roo dependencies - why they are there - I don't know changed Spring version to 3.1.0.M2 - to have new functionality in place change maven-war-plugin configuration - s

Spring Security 3.1: Enhanced security namespace configuration

Security namespace configuration in Spring Security 3.1 improved. The change that made my life easier is the possibility of using multiple <http> to configure security in web application. Each <http> can now configure separate filter chain for different request pattern. This is very useful when you have a web application that consist of standard web application and the API and you want API to be accessible only with basic authentication. To achieve that in Spring Security 3.1 you need to define security configuration as following: <?xml version="1.0" encoding="UTF-8"?> <beans xmlns="" xmlns:xsi="" xmlns:sec="" xsi:schemaLocation="

How-To: JSR303 validation groups in Spring MVC 3 wizard-style controllers

Beginning with Spring 3, Spring MVC has the ability to automatically validate @Controller inputs. To trigger validation of a @Controller input, simply annotate the input argument as javax.validation.Valid . Simple. But there is one drawback with automatic validation: using JSR303 validation groups is not possible. A group defines a subset of constraints. Instead of validating all constraints for a given object, only a subset is validated. Each constraint declaration defines the list of groups it belongs to. To trigger group validation group class or classes need to be passed to the validator. As mentioned, validation is triggered by with @Valid annotation. and there is no way you say which validation groups should be used in validation of @Controller input parameter. Until Spring 3.1 is ready and solves the problem, to utilize JSR303 validation groups manual validation is needed. Note: Have a look at the follow up post that describes the automatic validation with Spring's @ Started!

package pl.codeleak; public class Codeleak { public static void main(String[] args) { System.out.println("Blog started..."); } }