Hi Ian, Welcome aboard!
On Thu, 2010-08-26 at 08:52 +1000, Ian Booth wrote: [...] > What would I do? Well layered architectures I've worked with in the past > include a persistence layer containing data access objects (DAOs). These > are responsible for collaborating with the O/R mapping infrastructure to > retrieve/save objects from the domain model and it's here where the O/R > mapping logic is placed. For testing purposes, the DAOs can be stubbed > out or an alternative method can be used, but the key point is that > business domain objects are created for the various unit tests without > the need for the database. The approach also typically results in a much > simplified design, one which preserves the solution's architectural > integrity and reduces unnecessary coupling between layers. > > What do others think? Are my thoughts sensible? Is the type of I like your suggestion. Here are some thoughts: - ISTM that we could do this incrementally without disrupting anything, so we don't need a coordinated effort to do it all at once - We'd obviously need a standard way of writing the test doubles and automatic validation (at least for the API, I guess?) for them - Most of our tests[1] use the LaunchpadObjectFactory to create the objects they need to interact with, so we could easily make these tests a lot faster if we had a factory that creates mock objects instead of the real DAOs. - Before we start doing the last item above we need to make sure our DAOs are properly unit tested because currently those parts are only tested indirectly > refactoring that would be required to "fix" the current implementation > something that would be considered for inclusion in the MGPP? I'm sure it'd be a lot of work, but as I said above I think we can do it incrementally. Also, I don't even know what MGPP stands for, so I can't answer that. Anyway, I'd be really happy to help evaluating the feasibility of such a refactoring and/or doing it. [1] At least most of the ones that have been touched in the last couple years -- Guilherme Salgado <https://launchpad.net/~salgado>
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Mailing list: https://launchpad.net/~launchpad-dev Post to : [email protected] Unsubscribe : https://launchpad.net/~launchpad-dev More help : https://help.launchpad.net/ListHelp

