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 many of the projects where he used to work 
at Microsoft Research used this pattern, and while he liked it overall, 
if he had to find fault, they found it to cause duplication of sorts, in 
things like the persistence component mapping fields of the business 
objects into database-compatible types. Hence adding a field meant both 
changing the core business object, and changing the persistence 
component to incorporate the extra field, and also the plumbing between 
the two.


I also heed the advice to beware shoehorning problems into a single 
one-size-fits-all solution.


I also liked people who brought up particular thorny areas with Django 
in particular, such as the admin views.


However, I'm hopeful that, in my particular case at least, the 
interfaces and extra layers will be close to trivial, and any 
disadvantages may be outweighed by extracting my database/network code 
from my business logic.


I'm starting my week-long exercise on trying it out on a slice of our 
existing Django monster. I'll report back.


Jonathan



On 10/12/2012 19:02, Chris Withers wrote:

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
 

(http://blog.8thlight.com/uncle-bob/2012/08/13/the-clean-architecture.html). 


I'm curious if many people are applying it in the Django world?

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.


I have to confess I've only very lightly skimmed the article (which
looks like it says some sensible things), but that's not going to stop
me pontificating in over-general terms and posting a video that I liked:

The best programmers I've worked with have a knack to ruthlessly pick
the simplest possible abstractions to fit the job in hand. They never
stop thinking to settle on any one-size-fits-all programming style. The
problem with those two statements I just made is that everybody can read
them and think that they agree with them. What *I* mean by simple is
close to what Rich Hickey means in the first part of this talk (though I
don't know enough to decide what I think about how he goes on to defend
Clojure and its design principles in those terms):

http://www.infoq.com/presentations/Simple-Made-Easy


(BTW, it's a shame to hear him give security as an example of a
separable concern, because it isn't one)

The best code, you look at the functionality, then the code, and think
"where is all the code?" and "how did such simplistic code happen to
implement exactly what was needed?". That's different from the "OMG,
what is all this stuff for" feeling you get from over-engineered or just
badly-factored code. The best code is easy to change in the sense that
changes in functionality require commensurate coding effort, and it's
clear what code would have to change. But it is also hard to change, in
the sense that any change that leaves the behaviour the same would
clearly make it worse -- including adding or removing abstraction.

I'd agree with Andy that not fighting too many battles with your
framework has a lot to be said for it (and that it's maybe more
important to nail basic coding practices of the kind you'd find in Code
Complete than to take even a single step away from what the django
tutorial tells you to do). But even short programs can gain simplicity
from ignoring the framework or abstracting it a little, where it suits
the problem, as it often does.


John
___
python-uk mailing list
python-uk@python.org
http://mail.python.org/mailman/listinfo/python-uk

__
This email has been scanned by the Symantec Email Security.cloud 
service.

For more information please visit http://www.symanteccloud.com
__




--
Jonathan Hartleytart...@tartley.comhttp://tartley.com
Made of meat.   +44 7737 062 225   twitter/skype: tartley

___
python-uk mailing list
python-uk@python.org
http://mail.python.org/mailman/listinfo/python-uk


[python-uk] Python roles in my team @ Bank of America, Canary Wharf, London

2012-12-13 Thread Fadhley, Salim
I'm recruiting Python developers for my own team at Bank of America. We will be 
running interviews over the holiday period with a view to making hires 
immediately. While we do have roles for beginner Python developers we are most 
eager to meet experienced devs. We have positions available for both 
contractors and permanent employees. 

Bank of America is a very good place to be a Python developer: There is a major 
project which aims to replace many 3rd party systems with in-house applications 
built in Python. With so many critical systems already running on the 
Python-based framework, skills in this language are valued very highly in our 
company.

Our team is in charge of delivering a API and GUI tool which is used by almost 
every line of business within this organization. 
 
If you are interested, please contact me directly (salim.fadh...@baml.com) or 
add me via LinkedIn  - http://www.linkedin.com/profile/view?id=11408420

You can also contact me after hours on 07973 710574

--
This message, and any attachments, is for the intended recipient(s) only, may 
contain information that is privileged, confidential and/or proprietary and 
subject to important terms and conditions available at 
http://www.bankofamerica.com/emaildisclaimer.   If you are not the intended 
recipient, please delete this message.
___
python-uk mailing list
python-uk@python.org
http://mail.python.org/mailman/listinfo/python-uk