SpringOne day 2 keynote
Gregor Hohpe – Where did all my beautiful code go?
– Why is it that, even with a fantastically rich toolset, and the best and brightest developers, we still get crappy stupid code being written? (Gregor provided some examples from the google codebase)
– Its all about having a good representation of the business domain
– understand your domain
– choose your models
– choose a language to represent the model
– map the model well to the language
– protect your model
– program for humans, not for machines
– models – UI flow, state/workflow models, class identifications and object associations.. Models don't have to be executable; shouldn't necessarily be a direct input to generating code; might just be a useful way of looking at the problem domain.
– declarative DSLs (XSLT, BPEL, etc) – can be very expressive, but they're almost impossible to debug and the tooling is generally not as good
– Don't allow cruft from APIs to bleed into the domain classes; facade away things like java.util.Calendar & associated horibbleness
– protecting your model – if you make your code accessible then people are more likely to understand it enough not to break it – program for people, not for machines.