Re: [python-uk] hexagonal Django

2014-09-11 Thread steve.allison
Old thread I know, but for the interested Brandon Rhodes' 'Clean Architecture' talk can be found at http://youtu.be/DJtef410XaM Steve > On 15 Aug 2014, at 11:22, Harry Percival wrote: > > Thanks Peter! I was speaking to Brandon at Pycon this year and he was > telling me this was going to be

Re: [python-uk] hexagonal Django

2014-09-11 Thread Harry Percival
This may be getting tenuous, but here's another example of what I think of as a "no-business-logic" app, and how we test-drove it: http://www.obeythetestinggoat.com/test-driving-a-docker-based-postgres-service-using-pytest.html Part of my blockage may come from the words "business logic" -- we d

Re: [python-uk] hexagonal Django

2014-08-15 Thread Jonathan Hartley
I think what you describe is a common situation. When I reorganised that application in a Django project, that was one aspect that bugged some of my coworkers. But I think there is potentially still some value there. The resulting one line business functions create a well-defined seam between

Re: [python-uk] hexagonal Django

2014-08-15 Thread Hansel Dunlop
You know, if you started writing a stand alone module called pythonanywhere that has no dependencies and was imported and used by Django, Tornado, and any of the other bits and pieces I think you might find a *few *things to put in there... Not that I have any knowledge of that code base, of cours

Re: [python-uk] hexagonal Django

2014-08-15 Thread Harry Percival
Thanks Peter! I was speaking to Brandon at Pycon this year and he was telling me this was going to be his next talk to take on the road, and I was definitely looking forward to seeing it. Matt O'Donnell was also there, and he's done a talk on this sort of thing recently too ( https://www.youtube.

Re: [python-uk] hexagonal Django

2014-08-13 Thread Daniel Pope
Coincidentally, I blogged on the topic of Django project organisation at the weekend. http://mauveweb.co.uk/posts/2014/08/organising-django-projects.html May be of interest? ___ python-uk mailing list python-uk@python.org https://mail.python.org/mailman

Re: [python-uk] hexagonal Django

2014-08-13 Thread Jonathan Hartley
Thanks for the Brandon talk link: I hadn't seen it yet and I'm eager to see anything new from him. > Oates I did embark on the Django refactor, and in my mind it was a success of sorts. Obviously we didn't derive any immediate business value from that refactor, but it did demonstrate that the

Re: [python-uk] hexagonal Django

2014-08-13 Thread Hansel Dunlop
The Brandon Rhodes talk sounds like a nice way of looking at the problem. What I've done with my latest BIG DJANGO APP is to put the business logic into a pure Python module, Which Django imports, initialises with a storage adaptor (which makes mocking this adaptor easy) and then uses. The storage

Re: [python-uk] hexagonal Django

2014-08-13 Thread James Broadhead
On 13 August 2014 08:17, Peter Inglesby wrote: > > I'm starting my week-long exercise on trying it out on a slice of our > existing Django monster. I'll report back. > > Echoes of Captain Oates here? > > Anyway, reviving an old thread: Brandon Rhodes talks provides a > straightforward and accessi

Re: [python-uk] hexagonal Django

2014-08-13 Thread Peter Inglesby
> I'm starting my week-long exercise on trying it out on a slice of our existing Django monster. I'll report back. Echoes of Captain Oates here? Anyway, reviving an old thread: Brandon Rhodes talks provides a straightforward and accessible summary of "The Clean Architecture" in a recent talk[0] a

Re: [python-uk] hexagonal Django

2012-12-13 Thread Jonathan Hartley
Thanks everyone. I've been enlightened, encouraged and forewarned by the responses to my initial question. (and thanks for the Rich Hickey talk, I hadn't seen that one) I absolutely empathise with the warnings to avoid needlessly creating extra layers or plumbing. I have a colleague who says

Re: [python-uk] hexagonal Django

2012-12-12 Thread Chris Withers
Yeah, what he said :-) (joking aside, John has summed this all up very nicely...) Chris On 06/12/2012 00:57, John Lee wrote: On Tue, 4 Dec 2012, Jonathan Hartley wrote: The last few weeks I've been thinking about the architectural pattern known as Clean, Onion, Hexagonal, or Ports'n'Adaptors

Re: [python-uk] hexagonal Django

2012-12-12 Thread Chris Withers
On 05/12/2012 14:13, Jonathan Hartley wrote: I guess you still need to provide an abstraction for these features, even if only one backend supports the abstraction. What I'm reading suggests that if, for example, your app needs to use a text indexing service, then that's an external system and y

Re: [python-uk] hexagonal Django

2012-12-06 Thread Mike de Plume
On Tue, 2012-12-04 at 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. All three, I suspect. Abstraction and pr

Re: [python-uk] hexagonal Django

2012-12-05 Thread John Lee
On Tue, 4 Dec 2012, Jonathan Hartley wrote: The last few weeks I've been thinking about the architectural pattern known as Clean, Onion, Hexagonal, or Ports'n'Adaptors (http://blog.8thlight.com/uncle-bob/2012/08/13/the

Re: [python-uk] hexagonal Django

2012-12-05 Thread Jonathan Hartley
On 05/12/2012 13:08, Michael Foord wrote: On 5 Dec 2012, at 07:33, Chris Withers 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 lo

Re: [python-uk] hexagonal Django

2012-12-05 Thread Andy Robinson
On 5 December 2012 07:33, Chris Withers wrote: > 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... ROTFL! I have to admit my first thought on reading that page and diagram

Re: [python-uk] hexagonal Django

2012-12-05 Thread Matt Hamilton
On 5 Dec 2012, at 07:33, Chris Withers wrote: > 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

Re: [python-uk] hexagonal Django

2012-12-05 Thread Michael Foord
On 5 Dec 2012, at 07:33, Chris Withers 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

Re: [python-uk] hexagonal Django

2012-12-05 Thread Chris Withers
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 mention

Re: [python-uk] hexagonal Django

2012-12-04 Thread Menno Smits
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 think

Re: [python-uk] hexagonal Django

2012-12-04 Thread Daniel Pope
I go a little way in this direction. I rarely go as far as dependency injection for business logic, but a good habit I picked up is to ensure that my business logic is put in appropriate places somewhere other than view functions, and all queries are kept with the models (ie. as Manager methods), a