Send Catalyst mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.rawmode.org/mailman/listinfo/catalyst
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Catalyst digest..."
Today's Topics:
1. Re: Re: AJAX under application/xhtml+xml (John Napiorkowski)
2. Re: Re: AJAX under application/xhtml+xml (Daniel McBrearty)
3. Mason configuration in YAML (Marc Logghe)
4. Authorization::ACL - basic question (Will Smith)
5. Re: Request for comments: model class for REST queries
(Adam Jacob)
6. Re: Re: AJAX under application/xhtml+xml (Ashley Pond V)
7. Re: Mason configuration in YAML (Kevin Old)
8. Re: Request for comments: model class for REST queries
(Christopher Heschong)
----------------------------------------------------------------------
Message: 1
Date: Thu, 7 Dec 2006 06:10:58 -0800 (PST)
From: John Napiorkowski <[EMAIL PROTECTED]>
Subject: Re: [Catalyst] Re: AJAX under application/xhtml+xml
To: The elegant MVC web framework <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=iso-8859-1
--- Ashley Pond V <[EMAIL PROTECTED]> wrote:
> On Wednesday, Dec 6, 2006, at 21:06 US/Pacific, A.
> Pagaltzis wrote:
> > * apv <[EMAIL PROTECTED]> [2006-12-07 01:35]:
> >> Does anyone have sample code of anything AJAXy
> (don't care
> >> about the library or if it's hand rolled) that
> runs under
> >> application/xhtml+xml?
> >
> > Why do you want to serve that?
> Just to be a tough guy. :) Trying to stay on top of
> things,
> I suppose. "Do it right." Start to move into the
> sort of space
> jrock was talking about on another thread where you
> can serve
> all your content in the same way and let the
> presentation layers
> decide the rest.
> >
> >> By default Prototype puts out incompatible script
> tags and
> >> I know in the past some of y'all said you like
> other libraries
> >> better anyway.
> >
> > jQuery works OOTB in real XHTML. Go take a look at
> the docs on
> > the website. If the tutorial and code samples
> don't make you Want
> > Now, nothing I say will be able to. :-)
> >
> > (Don't miss the handy reference at
> <http://visualjquery.com> if
> > you go for it.)
> That's great. I looked at it quite awhile back but
> never
> played with it. I'll give it a spin.
Just another thumbs up for Jquery. I found I could
use this for almost everything I do javascript-wise.
There is a companion project called 'Interface' which
has a whole bunch of additional dynamic controls if
you need them. The community is very active as well.
--john
>
>
> -Ashley
> (I just realized I upper-cased Ajax before, sigh).
>
>
> _______________________________________________
> List: [email protected]
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
>
http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com. Try it
now.
------------------------------
Message: 2
Date: Thu, 7 Dec 2006 16:53:33 +0100
From: "Daniel McBrearty" <[EMAIL PROTECTED]>
Subject: Re: [Catalyst] Re: AJAX under application/xhtml+xml
To: "The elegant MVC web framework" <[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
i just looked at the tutorial, a lot more clear and to the point than
other libs I have looked at. Think I'm gonna go with it.
On 12/7/06, John Napiorkowski <[EMAIL PROTECTED]> wrote:
> --- Ashley Pond V <[EMAIL PROTECTED]> wrote:
>
> > On Wednesday, Dec 6, 2006, at 21:06 US/Pacific, A.
> > Pagaltzis wrote:
> > > * apv <[EMAIL PROTECTED]> [2006-12-07 01:35]:
> > >> Does anyone have sample code of anything AJAXy
> > (don't care
> > >> about the library or if it's hand rolled) that
> > runs under
> > >> application/xhtml+xml?
> > >
> > > Why do you want to serve that?
> > Just to be a tough guy. :) Trying to stay on top of
> > things,
> > I suppose. "Do it right." Start to move into the
> > sort of space
> > jrock was talking about on another thread where you
> > can serve
> > all your content in the same way and let the
> > presentation layers
> > decide the rest.
> > >
> > >> By default Prototype puts out incompatible script
> > tags and
> > >> I know in the past some of y'all said you like
> > other libraries
> > >> better anyway.
> > >
> > > jQuery works OOTB in real XHTML. Go take a look at
> > the docs on
> > > the website. If the tutorial and code samples
> > don't make you Want
> > > Now, nothing I say will be able to. :-)
> > >
> > > (Don't miss the handy reference at
> > <http://visualjquery.com> if
> > > you go for it.)
> > That's great. I looked at it quite awhile back but
> > never
> > played with it. I'll give it a spin.
>
> Just another thumbs up for Jquery. I found I could
> use this for almost everything I do javascript-wise.
> There is a companion project called 'Interface' which
> has a whole bunch of additional dynamic controls if
> you need them. The community is very active as well.
>
> --john
>
> >
> >
> > -Ashley
> > (I just realized I upper-cased Ajax before, sigh).
> >
> >
> > _______________________________________________
> > List: [email protected]
> > Listinfo:
> > http://lists.rawmode.org/mailman/listinfo/catalyst
> > Searchable archive:
> >
> http://www.mail-archive.com/[email protected]/
> > Dev site: http://dev.catalyst.perl.org/
> >
>
>
>
>
>
____________________________________________________________________________________
> Any questions? Get answers on any topic at www.Answers.yahoo.com. Try
it now.
>
> _______________________________________________
> List: [email protected]
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
--
Daniel McBrearty
email : danielmcbrearty at gmail.com
www.engoi.com : the multi - language vocab trainer
BTW : 0873928131
------------------------------
Message: 3
Date: Thu, 7 Dec 2006 17:16:42 +0100
From: "Marc Logghe" <[EMAIL PROTECTED]>
Subject: [Catalyst] Mason configuration in YAML
To: "The elegant MVC web framework" <[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
Hi there,
I am struggling with the configuration of the Mason view in YAML.
I have this:
View::Mason:
comp_root: __path_to(mason/root)__
data_dir: __path_to(mason/data)__
But as it seems, it is never taken into account. I have also tried
forcing an array ref, whithout any succes:
View::Mason:
-
comp_root: __path_to(mason/root)__
data_dir: __path_to(mason/data)__
What am I doing wrong ?
Regards,
Marc
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061207/7d260c70/attachment-0001.htm
------------------------------
Message: 4
Date: Thu, 7 Dec 2006 09:09:24 -0800 (PST)
From: Will Smith <[EMAIL PROTECTED]>
Subject: [Catalyst] Authorization::ACL - basic question
To: catalyst <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="iso-8859-1"
Hi, sorry if I ask a question that has been answered.
How could I block out the whole set of actions instead of setting for
each. For example:
instead of doing authorization for each of action in books,pm controller
such as:
__PACKAGE__->deny_access_unless(
"/books/delete",
[qw/adminr/],
);
__PACKAGE__->deny_access_unless(
"/books/edit",
[qw/admin/],
);
Is there a general way do block the whole "/books" ? I've tried that and
it hung.
Thank you
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061207/3de6217d/attachment-0001.htm
------------------------------
Message: 5
Date: Thu, 7 Dec 2006 09:28:57 -0800
From: Adam Jacob <[EMAIL PROTECTED]>
Subject: Re: [Catalyst] Request for comments: model class for REST
queries
To: The elegant MVC web framework <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=us-ascii
On Wed, Dec 06, 2006 at 10:08:08AM -0500, Christopher Heschong wrote:
> Hi, I've created a simple library to make calls to REST services, along
> with an associated Catalyst model, and wanted to get some feedback. The
> class itself is called CRUST and basically it's just some very simple
glue
> for URI, LWP, XML::Simple (although any other serialization formatters
are
> supported). GET and POST are supported of course.
My first thought is that you are going to need to support the full range
of HTTP Methods. At the very least, you will need: GET, POST, PUT and
DELETE. You probably want to support OPTIONS and HEAD as well.
> Here's an example of how I might use it to talk to Yahoo! Answers:
>
> # Create a CRUST model
> package MyApp::Model::Amazon;
> use base 'Catalyst::Model::CRUST';
>
> __PACKAGE__->config(
> base => 'http://answers.yahooapis.com/AnswersService/V1/',
> query => { appid => 'YahooDemo' }
> );
The query part might be better named "params", since that's what
Catalyst uses.
> # Meanwhile in a controller nearby
> $c->stash->{answers} = $c->model('YahooAnswers')->get(
'questionSearch',
> query => $c->req->param('query')
> );
Ew! Do they really have URLs like questionSearch and getByCategory?
Very un-RESTful.
> Does anyone find this useful? SVN snapshot is available:
> http://svn.screwdriver.net/repos/code/CRUST
>
> Should this sort of thing being uploaded to CPAN? Anyone want to review
> the code beforehand?
Something like this is both useful and good. I'm not certain what the
best way to implement it is. I'll try and find some time to look at
your code soon.
Adam
------------------------------
Message: 6
Date: Thu, 7 Dec 2006 10:22:40 -0800
From: Ashley Pond V <[EMAIL PROTECTED]>
Subject: Re: [Catalyst] Re: AJAX under application/xhtml+xml
To: The elegant MVC web framework <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset=US-ASCII; format=flowed
On Thursday, Dec 7, 2006, at 07:53 US/Pacific, Daniel McBrearty wrote:
> i just looked at the tutorial, a lot more clear and to the point than
> other libs I have looked at. Think I'm gonna go with it.
I had a little proof of concept Ajax demo up in about 10 minutes; just
as long as it took to skim the docs. I haven't played with the other
libraries but I think jQuery is super nice and especially readable.
Skimming the base code, it also looks really cleanly done. Terrific.
-Ashley
--
------------------------------
Message: 7
Date: Thu, 7 Dec 2006 14:37:17 -0500
From: "Kevin Old" <[EMAIL PROTECTED]>
Subject: Re: [Catalyst] Mason configuration in YAML
To: "The elegant MVC web framework" <[email protected]>
Message-ID:
<[EMAIL PROTECTED]>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Hi Mark,
I'm pretty sure you need to do it like this:
In your YAML file specify comp_root and data_dir:
comp_root: __path_to(mason/root)__
data_dir: __path_to(mason/data)__
then in Mason.pm you can use it like this:
package MyApp::View::Mason;
use base 'Catalyst::View::Mason';
__PACKAGE__->config->{DEBUG} = 'all';
__PACKAGE__->config->{comp_root} = $c->config->{comp_root};
__PACKAGE__->config->{data_dir} = $c->config->{data_dir};
1;
Catalyst::View::Mason doesn't look for these by default (like
Catalyst::Plugin::Session, for instance) which is why you have to
specify them in the Mason.pm.
HTH,
Kevin
On 12/7/06, Marc Logghe <[EMAIL PROTECTED]> wrote:
>
>
> Hi there,
> I am struggling with the configuration of the Mason view in YAML.
> I have this:
> View::Mason:
> comp_root: __path_to(mason/root)__
> data_dir: __path_to(mason/data)__
>
> But as it seems, it is never taken into account. I have also tried
forcing
> an array ref, whithout any succes:
> View::Mason:
> -
> comp_root: __path_to(mason/root)__
> data_dir: __path_to(mason/data)__
>
> What am I doing wrong ?
> Regards,
> Marc
> _______________________________________________
> List: [email protected]
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/[email protected]/
> Dev site: http://dev.catalyst.perl.org/
>
>
>
--
Kevin Old
[EMAIL PROTECTED]
------------------------------
Message: 8
Date: Thu, 7 Dec 2006 15:14:19 -0500
From: Christopher Heschong <[EMAIL PROTECTED]>
Subject: Re: [Catalyst] Request for comments: model class for REST
queries
To: The elegant MVC web framework <[email protected]>
Message-ID: <[EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"
Adam, thanks for the feedback and suggestions! See below for more
comments:
On Dec 7, 2006, at 12:28 PM, Adam Jacob wrote:
> On Wed, Dec 06, 2006 at 10:08:08AM -0500, Christopher Heschong wrote:
>> Hi, I've created a simple library to make calls to REST services,
>> along
>> with an associated Catalyst model, and wanted to get some
>> feedback. The
>> class itself is called CRUST and basically it's just some very
>> simple glue
>> for URI, LWP, XML::Simple (although any other serialization
>> formatters are
>> supported). GET and POST are supported of course.
>
> My first thought is that you are going to need to support the full
> range
> of HTTP Methods. At the very least, you will need: GET, POST, PUT and
> DELETE. You probably want to support OPTIONS and HEAD as well.
Thanks. There are ->get and ->post methods already, plus ->request
($method, ...) for any other method LWP supports if you need those.
But it's probably a good idea to add them as methods by default.
Although what would you really expect to get back from OPTIONS? I'm
sort of expecting some XML or something back now.
>
>> Here's an example of how I might use it to talk to Yahoo! Answers:
>>
>> # Create a CRUST model
>> package MyApp::Model::Amazon;
>> use base 'Catalyst::Model::CRUST';
>>
>> __PACKAGE__->config(
>> base => 'http://answers.yahooapis.com/AnswersService/V1/',
>> query => { appid => 'YahooDemo' }
>> );
>
> The query part might be better named "params", since that's what
> Catalyst uses.
Another good point, will fix.
>
>> # Meanwhile in a controller nearby
>> $c->stash->{answers} = $c->model('YahooAnswers')->get
>> ( 'questionSearch',
>> query => $c->req->param('query')
>> );
>
> Ew! Do they really have URLs like questionSearch and getByCategory?
> Very un-RESTful.
(No comment... it's better than Amazon IMHO)
>> Does anyone find this useful? SVN snapshot is available:
>> http://svn.screwdriver.net/repos/code/CRUST
>>
>> Should this sort of thing being uploaded to CPAN? Anyone want to
>> review
>> the code beforehand?
>
> Something like this is both useful and good. I'm not certain what the
> best way to implement it is. I'll try and find some time to look at
> your code soon.
>
> Adam
One thought that crossed my mind was to make methods like:
$c->model('whatever')->get_questionSearch( [params] )
$c->model('whatever')->post_questionSearch( [params] )
or just
$c->model('whatever')->questionSearch( [params] ) #default to GET
instead of what I have now:
$c->model('whatever')->get('questionSearch(params => ...);
$c->model('whatever')->post('questionSearch(params => ...);
A bit of AUTOLOAD should do the trick, but would the above syntax be
better or worse?
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 2409 bytes
Desc: not available
Url :
http://lists.scsys.co.uk/pipermail/catalyst/attachments/20061207/bb60481e/smime.bin
------------------------------
_______________________________________________
Catalyst mailing list
[email protected]
http://lists.rawmode.org/mailman/listinfo/catalyst
End of Catalyst Digest, Vol 22, Issue 26
****************************************