[python-uk] hexagonal Django

Michael Foord fuzzyman at voidspace.org.uk
Wed Dec 5 14:08:08 CET 2012

On 5 Dec 2012, at 07:33, Chris Withers <chris at python.org> wrote:

> 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?

I guess you still need to provide an abstraction for these features, even if only one backend supports the abstraction.

> 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...

Well, you need integration / acceptance / functional / end to end tests *anyway*.


> 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
> _______________________________________________
> python-uk mailing list
> python-uk at python.org
> http://mail.python.org/mailman/listinfo/python-uk


May you do good and not evil
May you find forgiveness for yourself and forgive others
May you share freely, never taking more than you give.
-- the sqlite blessing 

More information about the python-uk mailing list