[python-uk] hexagonal Django

Chris Withers chris at python.org
Wed Dec 5 08:33:41 CET 2012


On 04/12/2012 17:46, Menno Smits wrote:
> On 2012-12-04 14:46, Jonathan Hartley wrote:
>
>> I haven't, yet, but I'm thinking of refactoring a vertical slice of our
>> monster Django app into this style, and I'd love to hear if you think
>> it's crazy / brilliant / obvious / old-hat, etc.
>
> Since you mentioned this a few weeks back, I've been thinking about this
> approach a lot and doing a fair bit of background reading on the idea. I
> think it falls in to the brilliantly-obvious category, at least for any
> app of significant size. I plan to start using these ideas for my next
> big work project (not Django however). Previously, I've tended towards
> less flexible, harder-to-test, layered architectures.

The biggest concern I have with this approach is that it appears to 
preclude taking advantage of any features of your storage layer. If your 
business objects have to not know or care about their underlying 
storage, how do you take advantage of nice relational queries, stand 
alone text indexing service or other specific features of the 
architecture you've chosen?

There's also the risk that you end up testing each bit (business, views, 
storage) in isolation and never get around to doing the automated 
integration testing required to ensure artifacts of implementation 
(*cough* bugs) don't cause problems across those boundaries...

That said, I'd love to see a project that's a good example of this, are 
there any around online in Python? The closest thing I can think of is 
the move to the component architecture that Zope did from v2 to v3; 
architecturally brilliant but actually killed off the platform...

cheers,

Chris

-- 
Simplistix - Content Management, Batch Processing & Python Consulting
             - http://www.simplistix.co.uk


More information about the python-uk mailing list