zby has asked for the wisdom of the Perl Monks concerning the following question:

I am the author of a scaffolding for Catalyst (Catalyst::Example::InstantCRUD). The purpose of it is two-fold - first you can treat it like you treat h2xs or ExtUtils::ModuleMaker - something that generates a template. Second it is meant as a learning tool - it generates a working application so one can check how it works and try to customize it. Currently it uses a traditional URI schema: /name/view/id, /name/edit/id etc. I am thinking about adding a REST functionality to it - but this would mean quite a bit of changes: So it introduces a lot of complications - that would be an additiona obstacle for those that don't want to go the full REST path, both the learners and those who just use it as a template generator. Among the other frameworks I see that Django uses the traditional URI structure - and I think Rails uses REST.

Do you thing REST is worth those complications? Or maybe I should generate two applications: one RESTful and another one more traditional (in two additional subdirs)? Or maybe you have some other ideas?

Replies are listed 'Best First'.
Re: to REST or not to REST?
by locked_user sundialsvc4 (Abbot) on Mar 06, 2009 at 17:14 UTC

    Certainly I feel that you are now constrained by your “installed base” to offer whatever you have in mind as an alternate to what you have already supplied to CPAN. You've got no way to know (AFAIK...) just how many times your work may have been deployed “in production” by somebody-out-there.

    Yes, I think that “RESTfulness” might be perceived as advantageous for an “instant CRUD” product. It might therefore be an alternate package that you want to implement, thus providing your customers with a useful option.

Re: to REST or not to REST?
by bellaire (Hermit) on Mar 06, 2009 at 12:21 UTC
    The benefits of REST (in this case) seem to be semantic. I don't think there's any inherent benefit other than the fact that if you are familiar with REST and you like the way it works, then this will seem natural to you. I'm not sure that it's worth the modifications to the dispatch method. In particular, I think the question you need to be asking is whether or not RESTful applications are commonplace using Catalyst or not (who cares about other frameworks?). If they are, or if there is a demand, then it could be a good idea. If not, I'm not sure it's worth the effort. In any event, if you do go forward with it, I'd have it as an option (or dual setup as you suggested) rather than switching completely away from the traditional Catalyst dispatch method.
      Well - I am asking this here exactly to test the demand :) Pure REST certainely is not commonplace in Catalyst now - but perhaps there are people who would like to switch to more RESTful schema?