On 8/24/06, JP <[EMAIL PROTECTED]> wrote:
> I like James Bennetts's example a lot, but I'd like it more if the form
> class were ModelForm, descending from a more general Form class that
> would look much like the base Manipulator class of today.

I think you're confusing me with someone else...

> I'm afraid that I find the idea in Brantley Harris's proposal of
> raising a Form as an exception as a form of flow control really
> counter-intuitive. Apologies and it's just my opinion of course, but it
> has a sort of  "too clever" feel to me. Also, exceptions are very
> expensive, and I don't see the practical benefits of that usage pattern
> over something like:

The benefit, as I see it, is that it's much simpler and much more
descriptive of what's actually going on; you've got some data, you're
trying to save an object from it. Which, logically, translates into a
try/except block around the form's 'save' method; that makes the code
crystal-clear on what you're actually trying to do.

The expense of an exception is something to talk about, but I think it
does need to be talked about in the context of how often most
applications actually write to the DB, and how many of those writes
are mediated by a manipulator.

-- 
"May the forces of evil become confused on the way to your house."
  -- George Carlin

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To post to this group, send email to django-developers@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-developers
-~----------~----~----~----~------~----~------~--~---

Reply via email to