We're nearing the end of our second iteration on a new project. I started out by setting myself a few goals to explore. I'd like to write them down here, so I can come back in a few months to see what remains of them. You're welcome to comment on these goals.
Overall
- readable, intent revealing software
- DRY, YAGNI, BOYSCOUT et all...
Entities:
- IAggregate root has interface
- No ID (I'm not sure if I can pull this one off with NHibernate)
- No (public) setters except for things like name, description, ...
- State based tests
- Testdata: take a look at
NBuilderServices
- almost no logic
- infrastructure: queries, mapping, ...
- hosted in spring.net
- Behaviour based tests
Controllers
- no logic
- only view concerns
- choice of view to render
- navigation (redirect)
- forward call to service
- Behavior based tests
- hosted in spring.net
Repository
- only handles aggregate roots
- only the following methods: add/remove/query
Queries
- Separate query objects that get passed in the 'query' method of repository
- Preference in this order: LinqToNH, Criteria, HQL
- Integration tested
Security
- RhinoSecurity?
WCF
- Service hosting in Spring
Testing
- Heavy emphasis on readability
- Intent (test) Driven Development
- Fitnesse first (red), then unit test(R=>G=>R), integration test (R=>G=>R), Fitnesse green