[mochikit] Re: Async status success return codes question

2007-07-06 Thread Bob Ippolito

On 7/5/07, Karen J. Cravens [EMAIL PROTECTED] wrote:

 On Jul 5, 8:19 pm, Bob Ippolito [EMAIL PROTECTED] wrote:
  with (the ones that you actually run into in the wild). It's easy to

 Given the increasing popularity of REST, seems pretty likely you'll
 start running into a wider range of response codes in the wild.

 It's kind of disturbing to learn it's that noncompliant; we haven't
 settled on a library yet, but Mochikit was the front-runner for me.
 Now I'm back to I dunno, let's put all the names in a hat and pick
 one, since Wirebird makes use of pretty much the full range of HTTP
 responses.

As demonstrated it's effectively three lines of code to do whatever
you want to do with HTTP status codes, and you only have to write it
once. If that really makes such a difference, then I doubt MochiKit is
the right choice for you. There are many cases where you actually have
to write code, but MochiKit's behavior is well documented so at least
you know what it's going to be doing.

-bob

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



[mochikit] Re: Async status success return codes question

2007-07-06 Thread Bob Ippolito

On 7/6/07, Karen [EMAIL PROTECTED] wrote:
 On 7/6/07, Bob Ippolito [EMAIL PROTECTED] wrote:
  As demonstrated it's effectively three lines of code to do whatever
  you want to do with HTTP status codes, and you only have to write it
  once. If that really makes such a difference, then I doubt MochiKit is
  the right choice for you. There are many cases where you actually have
  to write code, but MochiKit's behavior is well documented so at least
  you know what it's going to be doing.

 Yes, I saw the example, but it's more of a philosophy issue... it's a
 matter of the right tool for the task. I need a stickler-for-the-rules
 RFC-compliant library; Mochikit seems to have a more pragmatic
 approach. This works 99% of the time, but I'm that obscure 1%.


It works 100% of the time. If you're doing something obscure with
status codes (anything obscure, even successful codes that aren't
2xx), you need to use an extra three lines of code in this case. That
doesn't mean it's broken.

-bob

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



[mochikit] Re: Async status success return codes question

2007-07-06 Thread Karen

On 7/6/07, Bob Ippolito [EMAIL PROTECTED] wrote:
 As demonstrated it's effectively three lines of code to do whatever
 you want to do with HTTP status codes, and you only have to write it
 once. If that really makes such a difference, then I doubt MochiKit is
 the right choice for you. There are many cases where you actually have
 to write code, but MochiKit's behavior is well documented so at least
 you know what it's going to be doing.

Yes, I saw the example, but it's more of a philosophy issue... it's a
matter of the right tool for the task. I need a stickler-for-the-rules
RFC-compliant library; Mochikit seems to have a more pragmatic
approach. This works 99% of the time, but I'm that obscure 1%.

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



[mochikit] Re: Async status success return codes question

2007-07-06 Thread Bob Ippolito

On 7/6/07, Karen [EMAIL PROTECTED] wrote:
 On 7/6/07, Bob Ippolito [EMAIL PROTECTED] wrote:
  It works 100% of the time. If you're doing something obscure with
  status codes (anything obscure, even successful codes that aren't
  2xx), you need to use an extra three lines of code in this case. That
  doesn't mean it's broken.

 It means it's not RFC-compliant out of the box. I'm not saying that's
 a bad thing overall (the other 99% of the time, you don't want
 overhead for bits that almost no one uses), I'm just saying it's a bad
 fit for me.

 Three lines of code for this fix and that does start to add up; at a
 certain point it becomes more efficient to start with a more low-level
 library rather than try to impose a new design philosphy on a more
 advanced one.

Given that you can write your own functions, and those functions can
call other functions, you only have to do it once.

-bob

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



[mochikit] Re: Async status success return codes question

2007-07-06 Thread Arnar Birgisson

On 7/6/07, Karen [EMAIL PROTECTED] wrote:
 It means it's not RFC-compliant out of the box. I'm not saying that's
 a bad thing overall (the other 99% of the time, you don't want
 overhead for bits that almost no one uses), I'm just saying it's a bad
 fit for me.

 Three lines of code for this fix and that does start to add up; at a
 certain point it becomes more efficient to start with a more low-level
 library rather than try to impose a new design philosphy on a more
 advanced one.

The whole point of using advanced design like deferreds in a
high-level library/framework like MochiKit, is that it's easily
extendable to handle edge cases like yours, with little extra code.
You can go with something more low level, but in my experience you'll
just end up with more code to maintain.

Arnar

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