I just read the sample chapter for Raible’s Spring Live book on SourceBeat. It was decent. Here are my thoughts.
Liked:
- The example he is working through is done Tests-first (TDD).
- The explaination/example of using the tomcat targets in ant was good…I’d never done that before (though I knew it was out there) so it was good to see them in action.
- The example of MockStrutsTestCase…I definitely need to try this out (actually Matt asked me at one point if the AutowiringStrutsRequestProcessor would work with it…need to look closer).
Didn’t Like:
- Doesn’t use the spring base test cases to autowire the actions…but I can understand the need for simplicity in this chapter.
- Has comments telling the user to “Organize Imports” I would expect the source example to be complete and then include a hint to do an organize imports.
- His business delegate is “Web Friendly”…basically it takes Strings and converts where it shouldn’t. Not major…just don’t like the feel of it.
- I think he should have split the adding transactions via Spring AOP stuff to a different section. Seems like too much is being crammed into one section.
- Made his form request scope…then explaination of it was confusing.
- Step 8 on page 45 says you need to also list the applicationContext.xml…I don’t think this is true (I’ll have to check) I think the web app context is automatically set as the parent context.
- It was a bit long for a “quick start” tutorial.
All-in-all, it was a good read. I’d like to read the rest, but not sure about 30 a year…
UPDATE: Just read through the ref-guide and found that the reason for specifying the appcontext in the plugin is to get around a problem with MockStrutsTestCase…namely, that it will not load the listeners (and hence the parent spring context). I guess this won’t cause problems when running this way from an actual container? Will there be 2 instances of all the beans in applicationContext.xml at 2 different levels in the context tree?
April 27, 2005 at 10:54 pm
If you’d like to see any changes made to the sample chapter, feel free to enter an issue in Spring Live’s Issue Tracker and I’ll try to address it in the next update.
http://issues.sourcebeat.com/secure/BrowseProject.jspa?id=10000