Spring Facts

  1. Spring Java Configuration is the answer of Rod Johnson to all xml haters, with javaconfig you can configure the whole Spring IOC in pure Java
  2. Spring Autowiring with Annotations will lead you to a more readable and smaller xml configuration file
  3. Spring Transactions with Annotations will let you fine-grained configuration of your service layer transactionality
  4. Spring and Terracotta play together very well, if you're worried about HA/Clustering have a go
  5. Spring and REST: the version 3 of Spring will let you write RESTful service with just a couple of annotations
  6. Spring Testability is unbeaten: there's nothing as easy to test as a POJO, in addition to that Spring offers autowiring and transaction managment inside the tests
  7. Spring OSGi: assuming that OSGi is a good idea Spring is already there
  8. Spring is not a silver bullet but you'll have to point me a gun in order to consider EJB3 as an alternative

Spring & Hessian, how cool!

I've tried today to expose some of our services in our application service layer. All those classes are simple POJOs, autowired with Spring. I've chosen Hessian for few reasons:
  • I never liked xml, soap, etc...
  • we need web services over http (so no RMI)
  • it's very fast
  • we might need different type of clients connecting to the application (Hessian apparently supports not only plain old Java but also JavaFX, Flex, almost every decent popular programming language)
Well the modification to the code (I've changed a couple of xml files) took less than an hour. You can find the instructions here, there's nothing else I can add to that document, it just works. Many people says that Java is death or will die soon but what Spring gives "to the masses" is still incredibly valuable and I found always very quick to implement a change in the code or make a big redesign of the codebase. Lately I've been impressed by the autowiring features and the java config new stuff. Have a look, java is perhaps struggling but still not death.

What's really agile?

Today we ended a scrum sprint, two weeks long. In two weeks a team of five developers managed to setup a project using state of art tecnologies such as DRW, ActiveMQ, ServiceMix, Hibernate, Spring, Atomikos XA Transactions. Not only we have a use case up and running and we are able to show case it to the customer. Now,  few choices in my opinion made this "more agile". - The usage of Maven, we have probably 50 dependencies, I can't imagine how to handle this with ant. - The usage of Hudson as CI tool, simple UI, no need to read the manual - The usage of Spring, in a couple of hours we had all we need (DAOs, JMS senders and receivers especially) - The usage of Hibernate3 with annotations, can't be faster to write down your domain - The usage of Jetty to have a fast feedback locally - Well, ovious maybe but worth mention, we wrote tests first, we used Junit4.5 - Flexible pair programming, we paired only when in trouble or when we felt the solution was mature enough to be showcased and shared in the team - Focused work, one developer on the Web UI, one on the deployment, one on the ServiceMix/ActiveMQ, one on the Transactions + Design of the system I call this agile, hard work and good fun.