This is a great book! I’m always on the lookout for new beta versions to be published so I can read the new chapters that are released.
I don’t think PragProg allows forums anymore on their site (only errata) and I have a question about the latest chapter 12. First, I really appreciate that chapter since many times books don’t get into higher level application design topics (maybe to avoid “flame wars”)
Question I have is about the good “general rule” advice to put all pure functions manipulating queries, changesets, and multis into their associated schema modules and put all the impure code into context modules. Right now I put all changeset code in the schema modules but usually leave the multi (and query) code in the context module… generally since my multis and queries are affecting multiple DB tables/schemas so they don’t really belong in any specific schema module. Are you recommending maybe using Multi.merge
extensively to build up the whole multi in the context module calling functions in the schema modules… or something else?
I looked at the sample code that comes with the book and can’t find much use of multi (yet). Are there any large/decent scale OSS projects I can study that follow the recommended pattern… especially as it relates to Multi or query use defined in schema modules?