Hi everyone Looking for some grey beard opinion.
I recently came across Alistair Cockburn's "Hexagonal architecture", aka. "ports and adapters". http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html The names are dubious but the basic idea is not new: separate the domain model (business model, app logic, etc) from orthogonal concerns such as the DB. It seems to be a good idea in theory. It obviously would make testing very easy. But how does it work in practice? SQL alchemy is great in that it supports this, to a degree, with the old-style class-table-mapper method. We could then not use a declarative hierarchy but instead use a late-stage mapping function to dynamically build the tables from the domain model. Would declarative be amenable to this late-stage process instead of early binding in metaclasses? But the resulting mapped classes are then bound to the database layer and there I suspect the abstraction starts to leak e.g. autoloading relationships, event hooks, etc. Does anyone have any experience trying to go all the way like this? What are the pitfalls, and are they surmountable? Is it a worthy goal or a fool's errand? -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.