Best practices for API wrapper development?

2012-05-08 Thread Dave Hodgkinson
I hated the Amazon one, it was overkill. Probabl my usual approach of flinging hashes around is suboptimal. Schwern's position on the shoulders of giants by using DBIC for a relatively simple interface might be too heavy. Examples you like?

Re: Best practices for API wrapper development?

2012-05-08 Thread Alex Balhatchet
Way back in '06 when I first wrote WebService::Nestoria::Search I was encouraged to copy the style of Yahoo::Search - given that it was written by Jeffrey Friedl and is now maintained by Tim Bunce I think that counts as "on the shoulders of giants" too :-) The style is very Do It All Yourself but

Re: Best practices for API wrapper development?

2012-05-08 Thread Tom Hukins
On Tue, May 08, 2012 at 04:52:14PM +0100, Dave Hodgkinson wrote: > I hated the Amazon one, it was overkill. Probabl my usual approach of > flinging hashes around is suboptimal. Schwern's position on the shoulders > of giants by using DBIC for a relatively simple interface might be too heavy. It's

error/exception aggregation during a "big" dbic load

2012-05-08 Thread Bob MacCallum
Hello - I would greatly appreciate any suggestions for how to keep track of errors while loading a big chunk of data into a dbic schema (in a txn_do(...), from a file). The problem is that I don't want to throw an exception as soon as I encounter the first error (for example a user record missing

Re: Best practices for API wrapper development?

2012-05-08 Thread Dave Hodgkinson
On 8 May 2012, at 21:22, Tom Hukins wrote: > On Tue, May 08, 2012 at 04:52:14PM +0100, Dave Hodgkinson wrote: >> I hated the Amazon one, it was overkill. Probabl my usual approach of >> flinging hashes around is suboptimal. Schwern's position on the shoulders >> of giants by using DBIC for a rel

Re: Best practices for API wrapper development?

2012-05-08 Thread Dave Hodgkinson
Cheers, I'll check it out. On 8 May 2012, at 17:03, Alex Balhatchet wrote: > Way back in '06 when I first wrote WebService::Nestoria::Search I was > encouraged to copy the style of Yahoo::Search - given that it was > written by Jeffrey Friedl and is now maintained by Tim Bunce I think > that coun

Re: Best practices for API wrapper development?

2012-05-08 Thread Dave Hodgkinson
Wow. That has WAY more than I want! But in a way, it's quite similar. One of the things I'm trying to avoid is building a class for each kind of thingy we get back, which is what Net::Amazon does horribly and unmaintainably. Yahoo::Search appears to sidestep this with a single ::Result. I like t

Re: error/exception aggregation during a "big" dbic load

2012-05-08 Thread Yan Fitterer
One obvious approach would be to validate the data in a separate step. Sent from my iPhone On 8 May 2012, at 22:03, Bob MacCallum wrote: > Hello - I would greatly appreciate any suggestions for how to keep track of > errors while loading a big chunk of data into a dbic schema (in a > txn_do(..

Re: error/exception aggregation during a "big" dbic load

2012-05-08 Thread Bob MacCallum
On Tue, May 8, 2012 at 11:13 PM, Yan Fitterer wrote: > One obvious approach would be to validate the data in a separate step. > > Yes, this had occurred to me, and there is even a (Java) validator tool for the input files we are using which might work out for us (I haven't looked at it in detail)