Re: [Catalyst] Sending email from Catalyst and scripts

2007-05-23 Thread Chisel Wright
On Wed, May 23, 2007 at 07:41:21AM +0100, Mark Zealey wrote:
> Why can you not do something like $c->stash->{emails_to_send} and then just 
> fire them off in the end() action after the page has been returned to the 
> remote browser?
> 

Because I don't want to spend any longer between *click* and "page
loaded" than I have to.
I feel happier having a queue of emails that I can process at my
leisure.

I don't have any benchmarking or test cases to show that my way is
better, or faster - but I'm not claiming this. It's Just The Way I Do It
and it makes me feel more comfortable with the process.
-- 
Chisel Wright
e: [EMAIL PROTECTED]
w: http://www.herlpacker.co.uk/

  Sorry isn't an excuse when you do something stupid on purpose.

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


RE: [Catalyst] Sending email from Catalyst and scripts

2007-05-23 Thread mark
Exactly; sending the email in end() after the page has been sent off would
not delay the page loading...

Mark


___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Creating Good Adaptor or Bridge Models (WAS: Creating a thin Model)

2007-05-23 Thread Zbigniew Lukasiak

Some time ago I had this idea that the declarations we put into
MySite::Model::DBIC are entirely superfluous and that it would be much
simpler if we just needed to declare in the config file that the model
uses the MySite::Schema and have it generated automatically.  Matt
agreed and asked me to write tests for that feature - but I did not
know what should go into these tests.

So the idea is to be able to declare in the config file:

Model::ModelName :
  instantiate : MySite::Schema

and then use $c->model(ModelName) without actually creating the
MySite::Model::ModelName package anywhere.

So what are the tests that would go here?  I can think only about two:

- that $c->model(ModelName) is a Catalyst::Model
- that the config values are correctly used

Is there anything more?  This would automate what you put in the
first, simpler method of model building.

--
Zbyszek




On 5/22/07, John Napiorkowski <[EMAIL PROTECTED]> wrote:

--- Jamie Neil <[EMAIL PROTECTED]> wrote:

> Matt S Trout wrote:
> > If you get stuck, could you start a fresh thread,
> please? I think this one
> > has officially got confused now :)
>
> Ok. Just for the record though, this seems to be
> working fine so far:
>
>
> package MySite::Model::Widget;
>
> use strict;
> use warnings;
> use base qw/Catalyst::Model/;
> use MySite::Widget;
>
> __PACKAGE__->config(
>  connect_info => [
>  'dbi:Pg:mysite', 'username',
>  'password', { AutoCommit => 1 },
>  ],
> );
>
> sub new {
>  my ( $class, $c, $args ) = @_;
>  return MySite::Widget->new(
>  Catalyst::Utils::merge_hashes( $args,
> $class->config ) );
> }
>
> 1;

[CUT]

Hey,

Maybe we could summarize the best practice lessons
from this thread?  If so I'll be happy to put them on
the wiki someplace suitable.

So we are saying it's better to override new instead
of COMPONENT and that it's okay to return your class
directly in new and not have to create an accessor and
then use AUTOLOAD to dispatch method calls?

So when you just want to make the object available via
$c->model(...)->method you can do (in the catalist
model):

sub new {
  my ($class, $c, $args) = @_;

  return ExternalModule->new(
Catalyst::Utils::merge_hashes( $args,
$class->config )
  );
}

But if you are adapting and/or altering the method
calls it would be better to:

__PACKAGE__->mk_accessors(qw/some_object/);

sub new {
  my ($class, $c, $args) = @_;
  my $self = $class->NEXT::new($c, $args);

  $self->some_object(Someobject->new(
Catalyst::Utils::merge_hashes( $args,
$class->config )

  return $self;
}

sub adapted_method
{
  my $result = shift->some_object->internal_method;
  ## Do something to $result
  return $result;
}

The reason I ask is because there have been several
ways of doing this very basic type of thing floating
around CPAN and I'm sure I'm not the only one
confused.

Maybe we could try to generate a concise list of cases
and then try to work out a best practices example for
each?  I'm sure that would be a good thing for a wiki
entry or even as part of the POD docs.

--john

__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/




--
Zbigniew Lukasiak
http://brudnopis.blogspot.com/

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Sending email from Catalyst and scripts

2007-05-23 Thread Ash Berlin

mark wrote:

Exactly; sending the email in end() after the page has been sent off would
not delay the page loading...

Mark



Except that end is before the page has been sent back to the browser.

You would need some kind of hook in what ever engine you are using to 
support that. Not a bad idea mind, but I dont think anything exists 
currently.


-ash

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Sending email from Catalyst and scripts

2007-05-23 Thread Wade . Stuart






Chisel Wright <[EMAIL PROTECTED]> wrote on 05/23/2007 04:32:31 AM:

> On Wed, May 23, 2007 at 07:41:21AM +0100, Mark Zealey wrote:
> > Why can you not do something like $c->stash->{emails_to_send} and then
just
> > fire them off in the end() action after the page has been returned to
the
> > remote browser?
> >
>
> Because I don't want to spend any longer between *click* and "page
> loaded" than I have to.
> I feel happier having a queue of emails that I can process at my
> leisure.
>
> I don't have any benchmarking or test cases to show that my way is
> better, or faster - but I'm not claiming this. It's Just The Way I Do It
> and it makes me feel more comfortable with the process.

I do,  I have run backends for websites that send massive amounts of "send
to a friend" mailers.  These messages are user initiated and the way we
have found to be the most optimal in the past is to do the following:

* Insert the information into a queue (we typically use a database table).
* Run a periodic poller on that database that generates the email (the
period on the poller is determined by how long is an acceptable delay for
your app,  many times we use 5 -> 15 minutes).
* Deliver email to a queue and push email server -- this further maximizes
the effect.

In our typical usage scenario a person will send 1 -> 10 emails to friends
at the same domain.  This batching process not only takes the load off the
webapp,  but also allows the SMTP server to multisend to the recipient
domain's MX server very much more frequently.  This can reduce the load on
the queue server substantially depending on the pattern of generated mail
recipients.

-Wade



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Creating Good Adaptor or Bridge Models (WAS: Creating a thin Model)

2007-05-23 Thread Matt S Trout
On Wed, May 23, 2007 at 11:16:38AM +, Zbigniew Lukasiak wrote:
> Some time ago I had this idea that the declarations we put into
> MySite::Model::DBIC are entirely superfluous and that it would be much
> simpler if we just needed to declare in the config file that the model
> uses the MySite::Schema and have it generated automatically.  Matt
> agreed and asked me to write tests for that feature - but I did not
> know what should go into these tests.
> 
> So the idea is to be able to declare in the config file:
> 
> Model::ModelName :
>   instantiate : MySite::Schema
> 
> and then use $c->model(ModelName) without actually creating the
> MySite::Model::ModelName package anywhere.

Maybe something more like

setup_components:
  Model::ModelName:
class: Catalyst::Model::DBIC::Schema
instantiate:
  schema_class: My::Schema
  connect_info: 

?

> So what are the tests that would go here?  I can think only about two:
> 
> - that $c->model(ModelName) is a Catalyst::Model

That shouldn't even be required, an instantiate section in the config could
indicate calling ->COMPONENT if present and ->new if not, and the lack of
one would mean simply adding the class maybe?

> - that the config values are correctly used
> 
> Is there anything more?  This would automate what you put in the
> first, simpler method of model building.

How does the above sound?

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] DBIC/RDBO comparison (excuse new thread)

2007-05-23 Thread Matt S Trout
On Wed, May 23, 2007 at 03:07:48AM -0300, Nilson Santos Figueiredo Junior wrote:
> On 5/22/07, Matt S Trout <[EMAIL PROTECTED]> wrote:
> >* Queries accept "rich" values as arguments (e.g., DateTime and
> >Bit::Vector objects)
> >
> >-- expected in 09
> 
> This works (at least for DateTime objects). For instance:
> 
>  $rs->search( { my_date_field => { -between => [$dt1, $dt2] } } );
> 
> works as expected (of course, InflateColumn::DateTime is in place).
> 
> Am I missing something?

DateTime's base stringify -often- works. But not for every DB/config/tz/etc.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] ActiveRecord for Perl

2007-05-23 Thread John Siracusa
On 5/22/07 8:07 PM, Matt S Trout wrote:
> I discussed merging the projects with jcs a while back but he didn't see the
> point of the ResultSet chaining system, which I consider DBIC's key killer
> feature

I just didn't think a merge made sense since the two projects have different
philosophies and very different APIs.  It's not that I don't "understand"
result sets (RDBO will likely get them some day, in fact), they just weren't
as important to me.  I had a few specific things I wanted to do with RDBO
and I did them first.  It was a pragmatic approach.

> In the meantime, RDBO is a brilliantly well-written system and if you're with
> jcs in not seeing the point of the (functional-ish/set-arithmetic-ish
> resultset concept) and not wanting to be able to subclass to override at any
> level of the process, it's a very useful option.

IME, it's not a matter of "not seeing the point" of a resultset approach,
but rather a preference for a particular API type.  That is, it's a matter
of taste rather than one of ignorance.

> I usually tell people to examine both and choose whichever best suits their
> project - the experienced developers seem -usually- to end up going for
> "DBIx::Class by default, Rose::DB::Object when they need speed over features"
> but that's my personal experience from discussion with a few hundred perl
> developers, not a statement of intent/recommendation.
> Rose::DB::Object

Although performance may attract people to RDBO initially, I think the
people who decide to stick with it do so for other reasons: they like the
API, it has some particular feature they want, etc.  I've never taken a
survey, but that's my impression based on RDBO mailing list traffic and so
on.  I can tell you that I'd personally keep using RDBO even if it was the
slowest ORM, but perhaps that's not too surprising ;)

-John



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Session unexpectedly expiring

2007-05-23 Thread Alexandre Jousset

Hi,

Jeff Chimene wrote:

More breadcrumbs. The directory is getting created, but session_data
isn't getting created.


	I have similar problem... The symptom is that the directory is created 
with the wrong user (root). Each time I reboot the server I have to 
manually « chown www-data:www-data » the directory (don't remember its 
name). As you may have guessed, for the moment the directory is in /tmp 
(which content is deleted at each reboot).


	I don't care I am not in prod but I think if you specially create a dir 
somewhere else in your FS with good owner and configure Session to use 
it, everything should be OK.


Maybe it's not the same bug (is it a bug?). My 2p.

Regards,
--
--  \^/--
---/ O \-----
--   | |/ \|  Alexandre (Midnite) Jousset  |   --
---|___|-----

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Session unexpectedly expiring

2007-05-23 Thread Jeff Chimene
Jeff Chimene wrote:
> Hi,
>
> I'm trying to figure out why my sessions are expiring in
> script/xxx_cgi.pl but not script/xxx_server.pl
> The desired cycle is to login then redirect to another controller.
>
> When I run the standalone server, the session state is recovered, and
> control resumes with the next controller.
>
> When I run using Apache & the script/xxx_cgi.pl, the session state is
> marked expired and control returns to the login controller.
>
> I'm using the Session, Session::Store::FastMmap, Session::State::Cookie
> plugins.
>
> Thanks for your support!
>
> Cheers,
> jec
More breadcrumbs. The directory is getting created, but session_data
isn't getting created.

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] DBIC/RDBO comparison (excuse new thread)

2007-05-23 Thread John Siracusa
On 5/22/07 4:17 PM, Matt S Trout wrote:
> * In addition to inflate/deflate, column triggers can also be applied
> to get/set (user data) and load/save (to/from database) events.
> 
> -- DBIC has always allowed this via subclassing, triggers are just a
> performance hit you don't need.

The way RDBO implements triggers, there is zero overhead if you do not use
them on a particular column.  And I'd wager that even when they're in use,
their overhead is comparable to that of a C3 method call.

This is another one of those matters of taste.  The functionality is
similar, but the approach to providing it is different.  People tend to have
strong preferences about how features are exposed, sometimes even more so
than whether they exist or not.

Finally, I'll add the all the qualifiers in Matt's message ("pretty much",
"not exactly", "no, but", "largely works", "basically handles this") are one
of the reasons that I've heard cited by RDBO users for their preference.
DBIC is a much more dynamic project with features in many different states
of development simultaneously.  This is the traditional OSS development
model, and it is a strength of DBIC in many ways.  But some people prefer
the more staid, predictable march of RDBO development, where features tend
to be released fully-formed or not at all.  The gap between "pretty much"
and "yes, completely, with full documentation" is quite wide for many
"regular users."

I think it's good that both DBIC and RDBO exist.  TMTOWTDI and all that.
And if Rails has taught us anything, it's that having a Single, Official ORM
does not necessarily lead to higher quality or more features or any other
great benefit ;)

-John



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Sending email from Catalyst and scripts

2007-05-23 Thread Dave Rolsky

On Wed, 23 May 2007, Ash Berlin wrote:


mark wrote:

Exactly; sending the email in end() after the page has been sent off would
not delay the page loading...

Mark



Except that end is before the page has been sent back to the browser.

You would need some kind of hook in what ever engine you are using to support 
that. Not a bad idea mind, but I dont think anything exists currently.


You can do this sort of thing with mod_perl via $r->register_cleanup() 
(mp1). I'm sure there's a similar mp2 API, but I can't recall what it is.


The cleanup phase in mod_perl runs after output is sent to the client. 
Providing something similar for other Catalyst engines would be pretty 
cool.


Of course, if you're sending lots and lots of email, you're better off 
with an external queue, maybe processed via a daemon or cron. You don't 
want to tie up "expensive" app server processes sending email when they 
could be serving the next client.



-dave

/*===
VegGuide.Orgwww.BookIRead.com
Your guide to all that's veg.   My book blog
===*/

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Session unexpectedly expiring

2007-05-23 Thread Jeff Chimene
Jeff Chimene wrote:
> Hi,
>
> I'm trying to figure out why my sessions are expiring in
> script/xxx_cgi.pl but not script/xxx_server.pl
> The desired cycle is to login then redirect to another controller.
>
> When I run the standalone server, the session state is recovered, and
> control resumes with the next controller.
>
> When I run using Apache & the script/xxx_cgi.pl, the session state is
> marked expired and control returns to the login controller.
>
> I'm using the Session, Session::Store::FastMmap, Session::State::Cookie
> plugins.
>
> Thanks for your support!
>
> Cheers,
> jec
The issue was that I had removed 'libcache-fastmmap-perl' (Debian Etch)
and installed the version from CPAN. The pure CPAN version doesn't play
well on Debian. I removed the CPAN version of File::CacheMmap, installed
the Debian Etch version, and Apache created the session_data file. I'll
contact the Debian maintainer and see if there's any interest in
explaining the discrepancy.

FWIW, I'm not thrilled w/ Debianized Perl modules; I've been attempting
to migrate away from Debianized Perl to CPAN only. There may be some
inherent limitations in that approach.

Cheers,
jec

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Session unexpectedly expiring

2007-05-23 Thread Jeff Chimene
Jeff Chimene wrote:
> Jeff Chimene wrote:
>   
>> Hi,
>>
>> I'm trying to figure out why my sessions are expiring in
>> script/xxx_cgi.pl but not script/xxx_server.pl
>> The desired cycle is to login then redirect to another controller.
>>
>> When I run the standalone server, the session state is recovered, and
>> control resumes with the next controller.
>>
>> When I run using Apache & the script/xxx_cgi.pl, the session state is
>> marked expired and control returns to the login controller.
>>
>> I'm using the Session, Session::Store::FastMmap, Session::State::Cookie
>> plugins.
>>
>> Thanks for your support!
>>
>> Cheers,
>> jec
>> 
> The issue was that I had removed 'libcache-fastmmap-perl' (Debian Etch)
> and installed the version from CPAN. The pure CPAN version doesn't play
> well on Debian. I removed the CPAN version of File::CacheMmap
>   
Cache::FastMmap

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] ActiveRecord for Perl

2007-05-23 Thread Matt S Trout
On Wed, May 23, 2007 at 11:05:44AM -0400, John Siracusa wrote:
> > In the meantime, RDBO is a brilliantly well-written system and if you're 
> > with
> > jcs in not seeing the point of the (functional-ish/set-arithmetic-ish
> > resultset concept) and not wanting to be able to subclass to override at any
> > level of the process, it's a very useful option.
> 
> IME, it's not a matter of "not seeing the point" of a resultset approach,
> but rather a preference for a particular API type.  That is, it's a matter
> of taste rather than one of ignorance.

Hmm. I think that's a semantic mismatch, that's basically what I meant. That
you don't see the point for your purposes doesn't mean that you don't
understand why others do for theirs.

I still personally believe resultset chaining to be a lisp-vs-blub-ism, and
find that the majority of people who try it find it addictive, but that could
purely be a matter of my sample self-selecting.

> > I usually tell people to examine both and choose whichever best suits their
> > project - the experienced developers seem -usually- to end up going for
> > "DBIx::Class by default, Rose::DB::Object when they need speed over 
> > features"
> > but that's my personal experience from discussion with a few hundred perl
> > developers, not a statement of intent/recommendation.
> > Rose::DB::Object
> 
> Although performance may attract people to RDBO initially, I think the
> people who decide to stick with it do so for other reasons: they like the
> API, it has some particular feature they want, etc.  I've never taken a
> survey, but that's my impression based on RDBO mailing list traffic and so
> on.  I can tell you that I'd personally keep using RDBO even if it was the
> slowest ORM, but perhaps that's not too surprising ;)

I tend to think in terms of conceptual mapping rather than in terms of
API details, and I think I could fairly easily implement the DBIC API atop
RDBO and vice versa (modulo the odd missing feature on either side), so I
beg to disagree with your "they're too different" assertion.

At the point at which I originally discussed it with you I'd have been happy
to write a DBIC layer over RDBO if I'd been permitted to patch a resultset
concept into the latter, but I got the impression you didn't want it at
all; I'm glad to hear that you're planning to eventually add it to RDBO
but at this stage we're a little late in the game for a merge to be viable.

Never mind, maybe we can collaborate on a perl6 ORM when there's a production
implementation of the language for us to code to :)

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Debian + CPAN (was: Session unexpectedly expiring)

2007-05-23 Thread Jamie Neil

Jeff Chimene wrote:

FWIW, I'm not thrilled w/ Debianized Perl modules; I've been attempting
to migrate away from Debianized Perl to CPAN only. There may be some
inherent limitations in that approach.


I've been trying to go the other way and install as little as possible 
from CPAN. For those situations where Debian doesn't have it, or I need 
a newer version than the Debian one, I use dh-make-perl.


Works straight from CPAN most of the time, but sometimes you need to 
download first and hack the Makefile a bit.


--
Jamie Neil | <[EMAIL PROTECTED]> | 0870  454
Versado I.T. Services Ltd. | http://versado.net/ | 0845 450 1254

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] DBIC/RDBO comparison (excuse new thread)

2007-05-23 Thread Matt S Trout
On Wed, May 23, 2007 at 11:22:40AM -0400, John Siracusa wrote:
> On 5/22/07 4:17 PM, Matt S Trout wrote:
> > * In addition to inflate/deflate, column triggers can also be applied
> > to get/set (user data) and load/save (to/from database) events.
> > 
> > -- DBIC has always allowed this via subclassing, triggers are just a
> > performance hit you don't need.
> 
> The way RDBO implements triggers, there is zero overhead if you do not use
> them on a particular column.  And I'd wager that even when they're in use,
> their overhead is comparable to that of a C3 method call.

I should have known you'd have implemented them sensibly; I'm just too used
to everybody else not doing so :)

> This is another one of those matters of taste.  The functionality is
> similar, but the approach to providing it is different.  People tend to have
> strong preferences about how features are exposed, sometimes even more so
> than whether they exist or not.

I consider Moose method modifiers triggers by another name in a lot of ways,
and also with zero performance hit.

> Finally, I'll add the all the qualifiers in Matt's message ("pretty much",
> "not exactly", "no, but", "largely works", "basically handles this") are one
> of the reasons that I've heard cited by RDBO users for their preference.
> DBIC is a much more dynamic project with features in many different states
> of development simultaneously.  This is the traditional OSS development
> model, and it is a strength of DBIC in many ways.  But some people prefer
> the more staid, predictable march of RDBO development, where features tend
> to be released fully-formed or not at all.  The gap between "pretty much"
> and "yes, completely, with full documentation" is quite wide for many
> "regular users."

That's absolutely true - to be honest, the only time I've been annoyed about
somebody choosing RDBO was when a couple of people stated they'd done so due
to the attitude of new DBIC users on the CDBI list (a number of whom I ran
down in private e-mail and slapped for that attitude). There are plenty of
technical/philosophical reasons for choosing one or the other; making the
choice because they didn't like the attitude of a couple people I'd never
spoken to in my life irritated me a little.

> I think it's good that both DBIC and RDBO exist.  TMTOWTDI and all that.
> And if Rails has taught us anything, it's that having a Single, Official ORM
> does not necessarily lead to higher quality or more features or any other
> great benefit ;)

Hell yes, and I think we've stolen enough code off each other and used each
other ('each other' here being the projects, not you and I) as targets to
work against enough times that overall progress in the state of the art has
probably been furthered at least as much by both existing as it would have
been by the same developer effort level on a single project.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Debian + CPAN

2007-05-23 Thread Jeff Chimene
Jamie Neil wrote:
> Jeff Chimene wrote:
>> FWIW, I'm not thrilled w/ Debianized Perl modules; I've been attempting
>> to migrate away from Debianized Perl to CPAN only. There may be some
>> inherent limitations in that approach.
>
> I've been trying to go the other way and install as little as possible
> from CPAN. 
Why? My particular reason is Debian's release cycle; which reason may be
more of an assumption than reality. I have not compared CPAN package
release dates to Debian dates.
> For those situations where Debian doesn't have it, or I need a newer
> version than the Debian one, I use dh-make-perl.
I'll check dh-make-perl. That might render the above reason moot.
> Works straight from CPAN most of the time, but sometimes you need to
> download first and hack the Makefile a bit.
Thanks for the heads-up.

Cheers,
jec

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] new Catalyst::Model::DBIC::Schema released

2007-05-23 Thread Brandon Black

Catalyst::Model::DBIC::Schema 0.20 has been release into the wild.

Changes since the previous 0.18 release that's been out there for
about 9 months:

0.20  Wed May 23, 2007
   - Fix for rt.cpan.org #22426
   - Switch to Module::Install
   - Assorted small pod and cleanliness fixes
   - Some requirements bumped to the latest maint
 releases of the same major feature release

None of it should really rock the boat.  rt.cpan.org #22426 was a
Win32 failure in an optional test.

For the impatient: http://www.dtmf.com/Catalyst-Model-DBIC-Schema-0.20.tar.gz

-- Brandon

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] ActiveRecord for Perl

2007-05-23 Thread John Siracusa
On 5/23/07 12:47 PM, Matt S Trout wrote:
> I tend to think in terms of conceptual mapping rather than in terms of
> API details, and I think I could fairly easily implement the DBIC API atop
> RDBO and vice versa (modulo the odd missing feature on either side)

Sure, but what would the result look like?  I think it's wise to concentrate
on a single API.  Just look at CDBICompat for an example of how hard it is
to maintain two APIs, even when one is preexisting.  It's also a headache
for users: which is the "real" or "native" API?

> Never mind, maybe we can collaborate on a perl6 ORM when there's a production
> implementation of the language for us to code to :)

Yes, I've always considered this all prototype work for Perl 6...although
then we have to allow for the first two throw-away ORMs for Perl 6 as we all
learn how the heck to use the language in the best way.  It never ends... ;)

-John



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] ActiveRecord for Perl

2007-05-23 Thread Christopher H. Laco
John Siracusa wrote:
[snip]
> Yes, I've always considered this all prototype work for Perl 6...although
> then we have to allow for the first two throw-away ORMs for Perl 6 as we all

Let the CDBI port take care of that. :-P

-=Chris



signature.asc
Description: OpenPGP digital signature
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Lightweight error/messages reporting to templates

2007-05-23 Thread Paul Makepeace

I'm hoping there's a 'best practice' or common pattern for reporting
errors and messages to templates (not necessarily just forms).

I find myself doing stuff like,

my @errors; my @messages;
# ...
if ($some_err_condition) {
  push @errors, "whoops";
} else {
  $obj->update;
  push @messages, $obj->name . " updated!";
}
# ...
$c->stash(messages => join "", @messages);
$c->stash(errors => join "", @errors);

Which is then tediously copy & pasted amongst controllers that do that
reporting.

And then my template says something like,

 [% IF errors %]
   [% errors %]
 [% END %]
 [% IF messages %]
   [% messages %]
 [% END %]

At least with the template I have that as a MACRO I can call variously
but I'd at least like a way to have some kind of
context/controller-wide way of dealing with these errors & messages. I
don't quite understand Cat's object model well enough to do this
globally myself yet.

P

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Using C::P::Continuation (Was: Session timeout and re-Authentication from a Frame)

2007-05-23 Thread Charlie Garrison

Good morning,

On 15/5/07 at 9:03 AM +0100, Matt S Trout 
<[EMAIL PROTECTED]> wrote:



On Tue, May 15, 2007 at 12:52:25PM +1000, Steve H wrote:
 On a further note, with re-authentication after session 
timeout, it'd be  good to be able to 'park' the original 
request while the re-authentication  occurs, then continue to 
process it. Assume in this context that all state  would be 
persisted against the User (as opposed to the session-id).   
...maybe a response that then pops a temporary window to 
re-authenticate in  - thus helping to preserve the underlying 
targets for the parked then  subsequently executed request.  
Any ideas or code that can be leveraged?


Catalyst::Plugin::Continuation


Is there any further documentation for this plugin? Or any 
examples showing how to implement it for the issue above?


I've read the POD a few times and I don't "get it".

Thanks,
Charlie

--
   Charlie Garrison  <[EMAIL PROTECTED]>
   PO Box 141, Windsor, NSW 2756, Australia

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] ActiveRecord for Perl

2007-05-23 Thread Wade . Stuart





"Christopher H. Laco" <[EMAIL PROTECTED]> wrote on 05/23/2007 12:49:20
PM:

> John Siracusa wrote:
> [snip]
> > Yes, I've always considered this all prototype work for Perl
6...although
> > then we have to allow for the first two throw-away ORMs for Perl 6as we
all
>
> Let the CDBI port take care of that. :-P
>

Funny,  I consider it two throw away ORMs too.

=)


___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Lightweight error/messages reporting to templates

2007-05-23 Thread Michael Reece
i don't know about 'best practice' but what i have done is create a  
plugin that exposes $c->alert_error(), $c->alert_info(), and a couple  
of similar ones.


the controller does, roughly:

  $c->alert_error('You screwed up.'); # moreorless push @{ $c->flash- 
>{alert_errors} }, @_;

  $c->alert_info($obj->name . ' updated!');

these are stored in the flash (for redirect-after-successful-post).

i then populate stash/globals with the flash contents before  
rendering the view (mason in my case).


my mason autohandler then displays any @alert_errors/etc as appropriate.

i use the same system for $c->form_error(username => 'Username  
missing.'), which is deleted into %form_errors before rendering the  
view.  my custom form generators (mason components) know how to  
display those errors as appropriate when the form is rendered.




On May 23, 2007, at 11:29 AM, Paul Makepeace wrote:


I'm hoping there's a 'best practice' or common pattern for reporting
errors and messages to templates (not necessarily just forms).

I find myself doing stuff like,

my @errors; my @messages;
# ...
if ($some_err_condition) {
  push @errors, "whoops";
} else {
  $obj->update;
  push @messages, $obj->name . " updated!";
}
# ...
$c->stash(messages => join "", @messages);
$c->stash(errors => join "", @errors);

Which is then tediously copy & pasted amongst controllers that do that
reporting.

And then my template says something like,

 [% IF errors %]
   [% errors %]
 [% END %]
 [% IF messages %]
   [% messages %]
 [% END %]

At least with the template I have that as a MACRO I can call variously
but I'd at least like a way to have some kind of
context/controller-wide way of dealing with these errors & messages. I
don't quite understand Cat's object model well enough to do this
globally myself yet.

P

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/ 
catalyst@lists.rawmode.org/

Dev site: http://dev.catalyst.perl.org/


---
michael reece :: software engineer :: [EMAIL PROTECTED]



___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Using C::P::Continuation (Was: Session timeout and re-Authentication from a Frame)

2007-05-23 Thread Matt S Trout
On Thu, May 24, 2007 at 04:40:31AM +1000, Charlie Garrison wrote:
> >Catalyst::Plugin::Continuation
> 
> Is there any further documentation for this plugin? Or any 
> examples showing how to implement it for the issue above?
> 
> I've read the POD a few times and I don't "get it".

Ehm.

I'd go look for 'net-based tutorials on continuations in general - once you
get the concept the Catalyst implementation should be pretty clear.

-- 
  Matt S Trout   Need help with your Catalyst or DBIx::Class project?
   Technical DirectorWant a managed development or deployment platform?
 Shadowcat Systems Ltd.  Contact mst (at) shadowcatsystems.co.uk for a quote
http://chainsawblues.vox.com/ http://www.shadowcatsystems.co.uk/ 

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Catalyst and CGI::Ajax

2007-05-23 Thread Petri Ruutikainen
Hi!

 

Is there anyhow possible to include CGI::Ajax to Catalyst using Template
Toolkit (TTSite)? I know that using Prototype one can get Ajax functionality
to Catalyst but I have been unable to initiate that. Or is there some more
detailed tutorial about the matter (Ajax or Prototype used with Catalyst)
besides the Catalyst tutorial and/or Cookbook? A big thanks to anybody who
will be answering and setting me to the right (or left) track.

 

-Pete-

 


No virus found in this outgoing message.
Checked by AVG Free Edition. 
Version: 7.5.467 / Virus Database: 269.7.6/815 - Release Date: 22.5.2007
15:49
 
___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Catalyst and CGI::Ajax

2007-05-23 Thread Peter Karman



Petri Ruutikainen wrote on 5/23/07 3:59 PM:

Hi!

 


Is there anyhow possible to include CGI::Ajax to Catalyst using Template
Toolkit (TTSite)? I know that using Prototype one can get Ajax functionality
to Catalyst but I have been unable to initiate that. Or is there some more
detailed tutorial about the matter (Ajax or Prototype used with Catalyst)
besides the Catalyst tutorial and/or Cookbook? A big thanks to anybody who
will be answering and setting me to the right (or left) track.


IME using Ajax without any kind of Catalyst plugin or explicit view is pretty 
painless. Just include the relevant libraries in the .tt files, write the 
javascript to use them in your .tt files, and then write controller code to 
handle the requests. The pitfalls I have stumbled into have been more with the 
javascript itself rather than anything particularly Catalystic.


Understanding the relationship between your js and your Cat code (the request 
and response cycle) is important when it comes time to debug, and using the 
wrappers can (IME) actually impede the learning because there's simply too much 
magic going on.


See the example app here for how I do it with Prototype and Scriptaculous:
http://search.cpan.org/src/KARMAN/Catalyst-Controller-Rose-0.02/t/examples/CatRose/

And yes Dojo/Mocha/YUI/lib-de-jour lovers, I know Prototype isn't cool anymore. 
;)

--
Peter Karman  .  http://peknet.com/  .  [EMAIL PROTECTED]

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Constants that refer to rows in a lookup table.

2007-05-23 Thread Perrin Harkins

On 5/22/07, Bill Moseley <[EMAIL PROTECTED]> wrote:

So, what have you found that works nicely?

use MyApp::Const qw/ cart_pending /;  # potentially long list
cart_status => cart_pending  # runtime checking

use MyApp::Const qw/ :cart /; # Shorter list :)


cart_status => MyApp::CONST::pending, # global constants


# Make it very clear where a constant should be used
# by adding the constants as methods to the cart namespace

cart_status => $cart_class->pending_status


I think I've done all of these over the years.  Adding them as methods
is probably my favorite, but importing constants is okay (although I
use $CART_PENDING_STATUS so it will interpolate in strings).  Put the
constants in the cart class -- MyApp::Const becomes a mess very
quickly.

What bothers me about these is that I have the constants in two
places, but elaborate schemes to read them on startup always seemed
like they create more problems than they solve.

If I had one where the contents changed a lot at runtime, I would just
make a real ORM class for the lookup table and hope that my database
caches queries well.

- Perrin

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] How to stop Catalyst::Engine::HTTP::POE?

2007-05-23 Thread Jon Schutz
I am using Catalyst::Engine::HTTP::POE in a test harness; when the tests
complete, I would like to gracefully terminate all child processes that
C::E::HTTP::POE starts.

My code forks and starts C::E::HTTP::POE, then later my cleanup code
kills the forked child, but extra processes (grandchildren) created by
C::E::HTTP::POE get left behind.

Being naive w.r.t POE, I have tried POE::Kernel->stop() to no effect.

I can see in the code how I could dig out the list of child processes
from internal data structures in C::E::HTTP::POE and terminate them, but
obviously that's not the right way.

In C on Linux, I would set the children to die with the parent using
prctl(PR_SET_PDEATHSIG, SIGKILL) - my efforts to find an equivalent in
perl have failed but I presume there must be a way...

Currently I've worked around the problem by sending a termination signal
to the whole process group, which is a really bad idea - literally
suicide - so I'd appreciate any comments/suggestions.

A few months ago I raised the idea of a standard
Catalyst::Engine::shutdown method or equivalent (related to a different
problem at the time).  Response was fairly quiet at the time, so I guess
I'm the only one hitting this type of problem, yes?

-- 

Jon


___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] How to stop Catalyst::Engine::HTTP::POE?

2007-05-23 Thread Andy Grundman


On May 24, 2007, at 12:03 AM, Jon Schutz wrote:

I am using Catalyst::Engine::HTTP::POE in a test harness; when the  
tests
complete, I would like to gracefully terminate all child processes  
that

C::E::HTTP::POE starts.

My code forks and starts C::E::HTTP::POE, then later my cleanup code
kills the forked child, but extra processes (grandchildren) created by
C::E::HTTP::POE get left behind.


Are you using preforking?  When you kill the parent it should take  
out all the children, maybe there is a bug.


___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] How to stop Catalyst::Engine::HTTP::POE?

2007-05-23 Thread Jon Schutz
Hi Andy,

On Thu, 2007-05-24 at 00:35 -0400, Andy Grundman wrote:
> On May 24, 2007, at 12:03 AM, Jon Schutz wrote:
> 
> > I am using Catalyst::Engine::HTTP::POE in a test harness; when the  
> > tests
> > complete, I would like to gracefully terminate all child processes  
> > that
> > C::E::HTTP::POE starts.
> >
> > My code forks and starts C::E::HTTP::POE, then later my cleanup code
> > kills the forked child, but extra processes (grandchildren) created by
> > C::E::HTTP::POE get left behind.
> 
> Are you using preforking?  When you kill the parent it should take  
> out all the children, maybe there is a bug.
> 

No, I hadn't set CATALYST_POE_MAX_PROC as I'm happy with forking on-
demand in this app.  However, I just tried it now, and it made no
difference.

Here is the launching code:

($testsite_running) = $self->run_forks(sub { 
$ENV{CATALYST_ENGINE} = "HTTP::POE"; 
$ENV{CATALYST_POE_MAX_PROC} = 4; # Tried with and without
require $testsite; 
$testsite_class->config( ... );
$testsite_class->setup;
$testsite_class->run($port, undef, $self->{testsite_options}); 
});

and run_forks() just does the fork, runs the given sub, and remembers
the child PID for later.

The process tree looks like this:

├─bash(5436)───perl(15424)─┬─perl(15428)─┬─perl(15431)
│  │ └─perl(15432)
│  ├─perl(15433)
│  └─other_server.pl(15435)

where the main code is 15424, which on completion kills children 15428,
15433 and 15435, and 15431, 15432 get left behind.  15428 is the forked
child from the code described above, and 15431 and 15432 are created by
C::E::HTTP::POE.

Regards,

-- 

Jon




___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Lightweight error/messages reporting to templates

2007-05-23 Thread Nathaniel Nuss
On Wed, May 23, 2007 at 07:29:57PM +0100, Paul Makepeace wrote:
> I'm hoping there's a 'best practice' or common pattern for reporting
> errors and messages to templates (not necessarily just forms).

I've opted for defining a function in a Controller base class.




package MyApp::Controller::Base;

sub sysmsg {
my ( $self, $c, $type, $msg ) = @_;
# Push [ $type, $msg ] onto the flash to preserve the message across
# redirect.
push @ {$c->flash->{sysmsg}}, [ $type, $msg ];
}


package MyApp::Controller::Whatever;

use base 'MyApp::Controller::Base';
...
if ( $something_noteworthy ) {
$self->sysmsg( $c, 'err', 'Error. Halt Catch Fire.' );
}
...
1;


msg template [here TT2 and part of a series of WRAPPERs]

[%- IF c.flash.sysmsg.size %]
[%- FOREACH msg IN c.flash.sysmsg %]
[%- IF msg.0.length %]
[% msg.shift %]
[%- END ; #IF %]
[%- END ; #FOREACH %]
[%- END ; #IF %]




I also implemented breadcrumb dropping similarly.

-- 
Nate Nuss

[ The IF wrapper around the  was for an issue I was having (but haven't
yet followed up on) where the same content skeleton exists on the second try
but the content has been consumed (now empty) ]

( [Kind] critique welcomed. )

___
List: Catalyst@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Re: Catalyst Digest, Vol 22, Issue 26

2007-05-23 Thread 张淼

__PACAKGE__->deny_access_unless( "/foo/bar", [qw/admin user/] );

The "user" can't access /foo/bar.
What's the matter with it?
Thanks!


2006/12/8, [EMAIL PROTECTED] <
[EMAIL PROTECTED]>:


Send Catalyst mailing list submissions to
catalyst@lists.rawmode.org

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 
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
>  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: Catalyst@lists.rawmode.org
> Listinfo:
> http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
>
http://www.mail-archive.com/catalyst@lists.rawmode.org/
> 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" 
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.