[Catalyst] Search example in any docs?

J. Shirley jshirley at gmail.com
Wed Sep 24 15:53:56 BST 2008


On Wed, Sep 24, 2008 at 7:00 AM, Jesse Sheidlower <jester at panix.com> wrote:
> On Tue, Sep 23, 2008 at 05:45:17PM -0700, J. Shirley wrote:
>> On Tue, Sep 23, 2008 at 4:34 PM, Dr. Jennifer Nussbaum
>> <bg271828 at yahoo.com> wrote:
>> >
>> >
>> > Thanks. I do appreciate this, and its a neat solution, but the problem wasnt that i dont know how to put common elements in a base class, the
>> > problem is that nowhere in the Cat docs, formal or informal, are there any examples of doing searches with web apps.
>> >
>>
>> Right, because any solution would be model specific.  Which puts it in
>> the realm of wiki nodes or CatalystX modules that profess preference
>> for an ORM model.
>
> [...]
>
>> Wiki!  Wiki!  Document what you've done and post on here.  Wiki nodes
>> are a living document and can evolve with time and evolve into better
>> solutions.
>>
>> What you're asking for is more a model, though, not Catalyst (which is
>> just a framework, no more, no less).
>
> I'm about to get on a plane now, but I did want to comment on this
> thread, as someone at least theoretically concerned with the docs.
>
> Though there have now been several responses along
> J. Shirley's lines, I have to say that I agree with the OP
> here. It doesn't matter if a search-generation routine is tied
> to one or another ORM, it should be documented somewhere, as
> this is a very common task. The docs are very heavily tied to
> specific elements--most of them assume you're using DBIC; the
> Tutorial shows the use of DBIC and FormFu; everything shows TT
> views, etc. If you're using the Rose modules for your DB
> layer, there's a lot less in the docs; if you're using DFV for
> forms (as I do) there's not much there; etc. So there's no
> reason that search can't also be demonstrated using DBIC.
>

The tutorial is the only one that assumes DBIC.  That isn't
necessarily the technical documentation of Catalyst.  That is a
Catalyst Tutorial.

I view docs as what is under the Catalyst::Manual space, though.  If
you count wiki and advent calendars, sure, but the problem has been
posted about on the advent calendars.  I suggested the wiki, though.

I do think that TT is the standard view in the docs, mostly because it
has the least offensive syntax to people just wanted to read what is
going on.  DBIC (or any model class) is not that way.  You have to
learn DBIC for it to really make sense.

> So I don't think that showing a basic search example using
> DBIC would somehow violate the idea of Catalyst-as-framework.
> I hope the OP does document her ideas on the wiki, and it would
> be nice if Zbigniew does exend the Advent article. But a short
> addition to the Tutorial showing a simple search, or a Cookbook
> entry on this, would, I think, be a Good Thing.
>

CatalystX::Cookbook would probably be the better place for it, rather
than in Catalyst::Manual.  Bonus points for included code (perhaps in
the form of t/search.t and t/lib/TestApp/Controller/Search.pm?)

-J



More information about the Catalyst mailing list