JavaZone 2007: Simplicity - Lessons learned from enterprise application development
BEKK's own Trond Arve Wasskog has a session on doing things the simple way. He has been an architect together with Johannes Brodwall on BBS' NICS project. NICS is a system for moving sums of money between banks.
Simplicity is not easy to define, but there are some ground rules: Fewer are better than many, etc.
Infrastructure
The project used two-phase commit to synchronize a database and a message queue. They needed load balancing and redundancy. The special setup only worked in special server environments, not on the developer machines.
They solved this by dropping JMS and using the database for messages. This required some glue code for sending and receiving messages, but meant they could drop 2PC. It also meant it was now testable on developer machines. As Johannes noted in his talk, they eventually decided to drop WebSphere itself.
Trond Arve thinks the app server itself is a dated concept, and would prefer to mix-and-match features. He now uses Jetty, Hibernate and Spring in his projects.
Process engines are evil! They never work: You need a lot of new knowledge to develop, deploy, support them. In their engine they would need VB-like scripting on misc steps in the process flow. By removing it, they saved a whole lot of complexity.
Deployment: why is it so hard? As Johannes noted, their new application model makes deployment a breeze.
Operations: work early on with IT operations staff.
Design
They designed their own scheduling system using DDD, which turned out only 1 of 5 projects could use successfully. In the end, they opted for a much simpler solution: An existing scheduler which uses JMX on the application. Easier to test since you no longer have to rely on an EJB timer.
Documentation
Process vs. product. Documentation in itself has no value, the communication is the value.
Architecture documents tend to only be shared between architects. Trond Arve used an approach where he intentionally didn't update his architecture documents, but when people asked if they were updated he'd rather take a personal discussion: "What are you trying to achieve?"
Functional testing
User stories should generate functional tests, not unit tests. The spec should mirror the tests. Tools to use: FIT, RSpec, etc. Should be human readable (unlike JUnit :) ).
Instead of a Windows-based automatic test application, they used Fitnesse, which more people knew. It was easier to automate.
Closer integration between testers and developers. No artificial separation.
Technical tests
JUnit test from Hell: A 700-line test case, impossible to understand. When the process engine was removed, the test shrank to a fraction.
No code means no maintenance cost and no bugs.
Development environment
Use a pre-packaged Eclipse version with a number of plugins, etc.
Use VMWare to duplicate complicated environments.
Configuration management
Johannes described the simple application model they now use. It makes it really easy both to deploy and to roll back.