Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-14 Thread Will Crawford
On 13 August 2013 16:37, John Napiorkowski jjn1...@yahoo.com wrote: [...] The main issue that I see is that we have too many ways to do exactly the same thing (return JSON for AJAX endpoints) and no clear reason why any of them are better for a given purpose. Additionally, some of them are a

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-14 Thread Will Crawford
On 14 August 2013 10:53, Will Crawford billcrawford1...@gmail.com wrote: [...] Also, making it easier to restore a session id after deserialising a request. I was asked to implement an API that passes session IDs with an XML request body, rather than in the URL or a cookie. It turned out to be

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-14 Thread John Napiorkowski
On Wednesday, August 14, 2013 5:53 AM, Will Crawford billcrawford1...@gmail.com wrote: On 13 August 2013 16:37, John Napiorkowski jjn1...@yahoo.com wrote: [...] The main issue that I see is that we have too many ways to do exactly the same thing (return JSON for AJAX endpoints) and no

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-14 Thread John Napiorkowski
On Wednesday, August 14, 2013 6:15 AM, Will Crawford billcrawford1...@gmail.com wrote: On 14 August 2013 10:53, Will Crawford billcrawford1...@gmail.com wrote: [...] Also, making it easier to restore a session id after deserialising a request. I was asked to implement an API that

RE: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-13 Thread Craig Chant
Hi John / Alex Am I missing something here? In my model I create and return the JSON... use JSON qw(encode_json); my %json_hash ; ... add some hash stuff to be made into JSON ... # return JSON return encode_json \%json_hash -- In my controller

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-13 Thread John Napiorkowski
Craig, Great points and thanks for the code example (I wish more stuff like this was floating around in Catalyst oriented blogs, etc.) Just stepping back a bit, the purpose of the research spike was to see what, if any, features could be incorporated into Catalyst core to improve and

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-13 Thread Alexander Hartmaier
On 2013-08-13 17:37, John Napiorkowski wrote: Craig, Great points and thanks for the code example (I wish more stuff like this was floating around in Catalyst oriented blogs, etc.) Just stepping back a bit, the purpose of the research spike was to see what, if any, features could be

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-13 Thread John Napiorkowski
On Tuesday, August 13, 2013 12:42 PM, Alexander Hartmaier alexander.hartma...@t-systems.at wrote: On 2013-08-13 17:37, John Napiorkowski wrote: Craig, Great points and thanks for the code example (I wish more stuff like this was floating around in Catalyst oriented blogs, etc.)

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-12 Thread John Napiorkowski
Hey Bill (and the rest of you lurkers!) I just updated the spec over at  https://github.com/perl-catalyst/CatalystX-Proposals-REStandContentNegotiation/blob/master/README.pod I decided to remove regular expression matching from the body parser stuff, which I think resolves the merging questions

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-12 Thread Alexander Hartmaier
On 2013-08-12 16:58, John Napiorkowski wrote: Hey Bill (and the rest of you lurkers!) I just updated the spec over at https://github.com/perl-catalyst/CatalystX-Proposals-REStandContentNegotiation/blob/master/README.pod I decided to remove regular expression matching from the body parser

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-12 Thread John Napiorkowski
On Monday, August 12, 2013 2:33 PM, Alexander Hartmaier alexander.hartma...@t-systems.at wrote: On 2013-08-12 16:58, John Napiorkowski wrote: Hey Bill (and the rest of you lurkers!) I just updated the spec over at

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-12 Thread Marius Olsthoorn
I'm not sure if it fits this discussion, but I think automatic JSON serialization is problematic since the serializer often has to guess if a value needs to be serialized as a string or a number. This is not a problem if you consume it with Perl or Javascript but it might be problematic for some

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-12 Thread John Napiorkowski
On Monday, August 12, 2013 4:56 PM, Marius Olsthoorn olst...@gmail.com wrote: I'm not sure if it fits this discussion, but I think automatic JSON serialization is problematic since the serializer often has to guess if a value needs to be serialized as a string or a number. This is not

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-12 Thread Alexander Hartmaier
On 2013-08-12 22:26, John Napiorkowski wrote: On Monday, August 12, 2013 2:33 PM, Alexander Hartmaier alexander.hartma...@t-systems.at wrote: On 2013-08-12 16:58, John Napiorkowski wrote: Hey Bill (and the rest of you lurkers!) I just updated the spec over at

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-12 Thread John Napiorkowski
On Monday, August 12, 2013 5:56 PM, Alexander Hartmaier alexander.hartma...@t-systems.at wrote: On 2013-08-12 22:26, John Napiorkowski wrote: On Monday, August 12, 2013 2:33 PM, Alexander Hartmaier alexander.hartma...@t-systems.at wrote: On 2013-08-12 16:58, John Napiorkowski

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-09 Thread Bill Moseley
On Thu, Aug 8, 2013 at 9:27 PM, John Napiorkowski jjn1...@yahoo.com wrote: https://github.com/perl-catalyst/CatalystX-Proposals-REStandContentNegotiation I currently extend HTTP::Body in a similar way that you describe. But I have them a separate classes so I just do: use My::Multipart;

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-09 Thread John Napiorkowski
On Friday, August 9, 2013 12:00 PM, Bill Moseley mose...@hank.org wrote: On Thu, Aug 8, 2013 at 9:27 PM, John Napiorkowski jjn1...@yahoo.com wrote: https://github.com/perl-catalyst/CatalystX-Proposals-REStandContentNegotiation   I currently extend HTTP::Body in a similar way that you

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-09 Thread Bill Moseley
On Fri, Aug 9, 2013 at 12:11 PM, John Napiorkowski jjn1...@yahoo.comwrote: What's the use case you have in mind? Something like first check for something like 'application/vnd.mycompany.user+json' and then fall back to 'application/(?:vmd.*+)?json' if you don't find it? Is that an actual

Re: [Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-09 Thread John Napiorkowski
On Friday, August 9, 2013 4:52 PM, Bill Moseley mose...@hank.org wrote: On Fri, Aug 9, 2013 at 12:11 PM, John Napiorkowski jjn1...@yahoo.com wrote: What's the use case you have in mind?  Something like first check for something like 'application/vnd.mycompany.user+json' and then fall

Out of office 10/4-10/5 (was: [Catalyst] More detailed proposal for changes related to content negotiation and REST)

2013-08-09 Thread Steve
Thank you for your email. I will be out of the office Thursday and Friday, returning Monday the 8th. I will respond to your email at that time. Please call our office for any immediate concerns: 616-459-0782. -- Steve

Out of office 10/4-10/5 (was: Out of office 10/4-10/5 (was: [Catalyst] More detailed proposal for changes related to content negotiation and REST))

2013-08-09 Thread Steve
Thank you for your email. I will be out of the office Thursday and Friday, returning Monday the 8th. I will respond to your email at that time. Please call our office for any immediate concerns: 616-459-0782. -- Steve

Out of office 10/4-10/5 (was: Out of office 10/4-10/5 (was: Out of office 10/4-10/5 (was: [Catalyst] More detailed proposal for changes related to content negotiation and REST)))

2013-08-09 Thread Steve
Thank you for your email. I will be out of the office Thursday and Friday, returning Monday the 8th. I will respond to your email at that time. Please call our office for any immediate concerns: 616-459-0782. -- Steve

[Catalyst] More detailed proposal for changes related to content negotiation and REST

2013-08-08 Thread John Napiorkowski
Hey All, I had a bit of time on a few plane rides recent to get a chance to write down all the various thoughts and ideas I've heard around what could be a minimally useful expansion of how Catalyst handles content types beyond classic form data, etc as well as some features to make it easier