Re: [Catalyst] Catalyst for large-scale e-commerce: A good or bad choice?

2011-11-03 Thread Aaron Trevena
On 24 October 2011 10:31, Alec Taylor alec.tayl...@gmail.com wrote:
 Should I take a look at something like Magento? - Or keep to Perl
 stuff like Catalyst?

 (note I am currently a good C++ coder, and can code C and Python)

Look at Mango and Handel, both on cpan (and github iirc) - they are a
good foundation to build on, and could do with somebody picking up the
baton.

Mango is a f/w that extends/buildson/forks Handel, and they're both
Catalyst - they're aren't a drop in and go solution and I'm not even
sure they're finished, but when I was spec'ing out a large e-commerce
project for a freelance client they appeared from my reading through
the author's blogs and the code itself to do the lions share of heavy
lifting.

A.

-- 
Aaron J Trevena, BSc Hons
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Consulting

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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Paul

On Thursday, 03 November, 2011 at 02:31:56 GMT, Santiago Zarate wrote:

If i'm not wrong, being basically a DateTime object you should be able
to do whatever you like with it instead of having to do a search 
replace, consider using DBIx::Class::InflateColumn to have DBIx do the
job for you every time you need to use that specific model...


Indeed. Consider using a formatter: 
https://metacpan.org/module/DateTime#Formatters-And-Stringification

--

.

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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Tomas Doran


On 3 Nov 2011, at 02:05, Adam Jimerson wrote:


but in my Catalyst app the
date looks like this 2011-05-07T13:53:41.  The T instead of the  
space is driving me crazy, I think it is coming from  
DateTime::Format:Pg


As other people have noted, what's happening is that  
DateTime::Format:Pg is parsing the dates you get out of Postgres, and  
handing you a DateTime object back.


You're then printing that with no formatting, as you're basically  
getting an ISO8601 timestamp out.


Have a look at the docs for DateTime and the associated  
DateTime::Format::XX things :)


Cheers
t0m



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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Adam Jimerson
The problem I see with doing it this way: $formatted_date_string =
 $c-model('DB::TableName')-find($row_index)-date_field-mdy('/'); is
that It looks like I would
have to do this every time I grab a date from the database.  That is fine
but there are times in my app where I pull everything from the database to
display like so:

my $things = $c-stash-{mydata_rs}-search(
undef,
{
order_by = { -asc = 'uniq' },
},
);

where each item has a timestamp of when it was created and when it was last
modified, would I have to do another search to get the datetime formatted
or worse pull them one by one building a hash_ref or array?

On Thu, Nov 3, 2011 at 6:04 AM, Tomas Doran bobtf...@bobtfish.net wrote:


 On 3 Nov 2011, at 02:05, Adam Jimerson wrote:

  but in my Catalyst app the
 date looks like this 2011-05-07T13:53:41.  The T instead of the space
 is driving me crazy, I think it is coming from DateTime::Format:Pg


 As other people have noted, what's happening is that DateTime::Format:Pg
 is parsing the dates you get out of Postgres, and handing you a DateTime
 object back.

 You're then printing that with no formatting, as you're basically getting
 an ISO8601 timestamp out.

 Have a look at the docs for DateTime and the associated
 DateTime::Format::XX things :)

 Cheers
 t0m




 __**_
 List: Catalyst@lists.scsys.co.uk
 Listinfo: 
 http://lists.scsys.co.uk/cgi-**bin/mailman/listinfo/catalysthttp://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/**
 catalyst@lists.scsys.co.uk/http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/

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


[Catalyst] Database access benchmarks for use in web-frameworks - How does Perl compare?

2011-11-03 Thread Alec Taylor
Good afternoon,

I'm building a large e-commerce site, and it is very important that
what I write can:
- Handle large server loads
- Deliver pages quickly
- Make transactions quickly

as well as have a small development time (i.e. pre-built modules for
e-commerce are available, and are extendible).

Are there recent accessible statistics available, comparing these
metrics across the most popular web-frameworks? (i.e. Symfony, DJango,
Rails, ASP.NET etc)

Thanks for all information,

Alec Taylor

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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Kieren Diment
On 03/11/2011, at 9:40 PM, Adam Jimerson wrote:

 The problem I see with doing it this way: $formatted_date_string =
 $c-model('DB::TableName')-find($row_index)-date_field-mdy('/'); is
 that It looks like I would
 have to do this every time I grab a date from the database.  That is fine
 but there are times in my app where I pull everything from the database to
 display like so:
 
 my $things = $c-stash-{mydata_rs}-search(
   undef,
   {
   order_by = { -asc = 'uniq' },
   },
 );
 


One option is to define a method in whatever Result class mydata_rs produces:

sub my_date_format {
my $self = shift;
return $self-date_field-mdy('/');
}   


then in your template:

[% WHILE (row = mydata_rs.next); row.my_date_format ; END %]

or you can just call the datetime methods in the template:

[% WHILE (row = mydata_rs.next); row.my_date_field.ymd('/') ; END %]



 where each item has a timestamp of when it was created and when it was last
 modified, would I have to do another search to get the datetime formatted
 or worse pull them one by one building a hash_ref or array?
 
 On Thu, Nov 3, 2011 at 6:04 AM, Tomas Doran bobtf...@bobtfish.net wrote:
 
 
 On 3 Nov 2011, at 02:05, Adam Jimerson wrote:
 
 but in my Catalyst app the
 date looks like this 2011-05-07T13:53:41.  The T instead of the space
 is driving me crazy, I think it is coming from DateTime::Format:Pg
 
 
 As other people have noted, what's happening is that DateTime::Format:Pg
 is parsing the dates you get out of Postgres, and handing you a DateTime
 object back.
 
 You're then printing that with no formatting, as you're basically getting
 an ISO8601 timestamp out.
 
 Have a look at the docs for DateTime and the associated
 DateTime::Format::XX things :)
 
 Cheers
 t0m
 
 
 
 
 __**_
 List: Catalyst@lists.scsys.co.uk
 Listinfo: 
 http://lists.scsys.co.uk/cgi-**bin/mailman/listinfo/catalysthttp://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/**
 catalyst@lists.scsys.co.uk/http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/
 
 ___
 List: Catalyst@lists.scsys.co.uk
 Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/


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


Re: [Catalyst] Database access benchmarks for use in web-frameworks - How does Perl compare?

2011-11-03 Thread Tobias Kremer
Hi Alec,

On Thu, Nov 3, 2011 at 11:42 AM, Alec Taylor alec.tayl...@gmail.com wrote:
 Are there recent accessible statistics available, comparing these
 metrics across the most popular web-frameworks? (i.e. Symfony, DJango,
 Rails, ASP.NET etc)

I don't have any statistics, but I can tell you that Catalyst handles
50 million pageviews a month for us with just two
web-/application-servers and there's still a lot of room (CPU-load
peaks at around 2 on a quad-core). Your bottleneck will almost always
be your database, most certainly not Catalyst. Comparing Catalyst to
other frameworks in a Hello world-style benchmark (as has been done
by some people in the past) really proves absolutely nothing because
your app will probably spend 80% of its time waiting for the database.

Catalyst has a lot of pre-built components/plugins that will help you
with almost every aspect you'll have to deal with:
https://metacpan.org/search?q=catalyst%3A%3Aplugin

If you're looking for complete, ready-to-use applications (like
Magento) I guess you need to start looking in the direction of PHP
because neither Perl nor Python or Ruby offer that much variety there.
But if what you want is a custom solution, I can whole-heartedly
recommend Catalyst and its ecosystem!

HTH,
Toby

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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Adam Jimerson
On Thu, Nov 3, 2011 at 6:55 AM, Kieren Diment dim...@gmail.com wrote:

 On 03/11/2011, at 9:40 PM, Adam Jimerson wrote:

  The problem I see with doing it this way: $formatted_date_string =
  $c-model('DB::TableName')-find($row_index)-date_field-mdy('/'); is
  that It looks like I would
  have to do this every time I grab a date from the database.  That is fine
  but there are times in my app where I pull everything from the database
 to
  display like so:
 
  my $things = $c-stash-{mydata_rs}-search(
undef,
{
order_by = { -asc = 'uniq' },
},
  );
 


 One option is to define a method in whatever Result class mydata_rs
 produces:

 sub my_date_format {
my $self = shift;
return $self-date_field-mdy('/');
 }


 then in your template:

 [% WHILE (row = mydata_rs.next); row.my_date_format ; END %]

 or you can just call the datetime methods in the template:

 [% WHILE (row = mydata_rs.next); row.my_date_field.ymd('/') ; END %]


 So if I go the latter route and call it from the template I won't have to
use a sub like that to do the formatting correct?  Also would it accept a
ymd hms format or do they have to be separate?
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Tomas Doran


On 3 Nov 2011, at 12:21, Adam Jimerson wrote:


 Also would it accept a ymd hms format or do they have to be separate?


Please see the fine documentation for DateTime.

Another option is to add a 'format_date' method to your view, and use  
the expose_methods config setting for View::TT..


In your TT code you'd then say [% WHILE (row = mydata_rs.next);  
format_date(row.my_date_field); END %]


Cheers
t0m




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


Re: [Catalyst] Database access benchmarks for use in web-frameworks - How does Perl compare?

2011-11-03 Thread Aaron Trevena
On 3 November 2011 10:42, Alec Taylor alec.tayl...@gmail.com wrote:
 Good afternoon,

 I'm building a large e-commerce site, and it is very important that
 what I write can:
 - Handle large server loads
 - Deliver pages quickly
 - Make transactions quickly

 as well as have a small development time (i.e. pre-built modules for
 e-commerce are available, and are extendible).

 Are there recent accessible statistics available, comparing these
 metrics across the most popular web-frameworks? (i.e. Symfony, DJango,
 Rails, ASP.NET etc)

No metrics are available as all major MVC frameworks use a fairly
standard combination of Template rendering, ORM data layer, etc and
solve the underlying inherent performance problems of using ORM in
similar ways.

The best example of that is to look at and understand
http://use-the-index-luke.com/sql/join/nested-loops-join-n1-problem -
essentially you need to avoid any framework with a data layer that
doesn't have a solution to this problem, and know how to use it
correctly when you pick one to avoid hitting it accidentally.

There also aren't really any metrics for development time - the
closest thing is the Plat_Forms competition
(http://www.plat-forms.org/ their last report was from 2007 and so is
a bit out of date, particularly about technical features available to
frameworks such as WSDL support), which avoids such metrics as it's
comparing apples and pears - however it is very informative and will
be publishing this years report in 2-3 weeks - if you're doing a
proper evaluation of frameworks this is essential reading about the
state of the art in the widest used general purpose MVC frameworks in
Europe (it doesn't include CMS/Blog platforms that have been extended
to act as application servers like Django or Wordpress). There's also
http://chrislaco.com/blog/mvc-marathon/ which although from 2008 is
still pretty interesting.

Hope that helps,

A.

-- 
Aaron J Trevena, BSc Hons
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Consulting

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


Re: [Catalyst] Catalyst::Plugin::AutoCRUD setup_components

2011-11-03 Thread Jason Galea
On Tue, Nov 1, 2011 at 10:00 PM, Jason Galea li...@eightdegrees.com.auwrote:



 On Tue, Nov 1, 2011 at 9:44 PM, Tomas Doran bobtf...@bobtfish.net wrote:


 On 1 Nov 2011, at 10:48, Jason Galea wrote:

 On Tue, Nov 1, 2011 at 7:38 PM, Tomas Doran bobtf...@bobtfish.net
 wrote:

 On 1 Nov 2011, at 03:24, Jason Galea wrote:

 any suggestions?

 Can you show us the code that doesn't work when it's in your app?

 Hi t0m,

 thanks, I'll try to keep it relevant. If you don't see anything and
 you'e still keen there's more but I think these are the relevant parts..


 Yeah, gotcha.

 I'm not sure offhand why this doesn't work, but I can have a poke into
 how AutoCRUD extends things and see if I can reproduce and/or recommend a
 way for AutoCRUD to do it better..


Hi t0m,

I'll try and do some further testing on this tomorrow but at first glance
it appears I've managed to turn the AutoCRUD plugin into a role which works
with the rest of my app.. (file attached).

cheers,

J


AutoCRUD.pm
Description: Perl program
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread will trillich
On Thu, Nov 3, 2011 at 12:36 PM, Tomas Doran bobtf...@bobtfish.net wrote:

 Another option is to *add a 'format_date' method to your view*, and use
 the *expose_methods *config setting for View::TT..

 In your TT code you'd then say [% WHILE (row = mydata_rs.next);
 format_date(row.my_date_field)**; END %]


/lurkInteresting...

Aha, that's what *
http://search.cpan.org/~mstrout/Catalyst-View-TT-0.37/lib/Catalyst/View/TT.pm#expose_methods
* is talking about. Hadn't noticed that before.

Neat!

-- 
The very nucleus of Character: to do what you know you should do, when you
don't want to do it. Stephen Covey
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Tomas Doran


On 3 Nov 2011, at 15:38, will trillich wrote:

Aha, that's what http://search.cpan.org/~mstrout/Catalyst-View-TT-0.37/lib/Catalyst/View/TT.pm#expose_methods 
 is talking about. Hadn't noticed that before.


Not noticed it before (fair enough), or not clear enough in the  
documentation?


Cheers
t0m



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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Adam Jimerson
On Thu, Nov 3, 2011 at 11:38 AM, will trillich
will.trill...@serensoft.comwrote:

 On Thu, Nov 3, 2011 at 12:36 PM, Tomas Doran bobtf...@bobtfish.netwrote:

 Another option is to *add a 'format_date' method to your view*, and use
 the *expose_methods *config setting for View::TT..

 In your TT code you'd then say [% WHILE (row = mydata_rs.next);
 format_date(row.my_date_field)**; END %]


 /lurkInteresting...

 Aha, that's what *
 http://search.cpan.org/~mstrout/Catalyst-View-TT-0.37/lib/Catalyst/View/TT.pm#expose_methods
 * is talking about. Hadn't noticed that before.

 Neat!


Agreed thanks for pointing that out, I might try that out once I get a
chance to play around with my app again
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread will trillich
Catalyst sure is wide and deep. One can get a reasonably advanced app
running in Catalyst without knowing broad stretches of what goes on, or
*can* go on, under the hood. There's so much possible, and so many handy
methods and plugins that you're gonna A) overlook things on the mad dash to
the goal or B) not understand the value of things until much later (like
abstracting code to a library, it often takes a few iterations before the
utility becomes obvious).

This case was a combination of both.

I often struggle to find the answer to a has someone else solved this
already question, and wind up rolling my own solution... only to run in to
someone else's cleverer, cleaner approaches later (often by accident). In
order to have 'perfect documentation' it must meet two criteria: A) explain
the utility and usage (benefits and how-to) *in a way that I can grok* and
B) show up on my radar *in my searches*. Both of these depend a helluva lot
on my own activity and context, making compliance impossible. :)

Sometimes scar tissue is the only (best?) way to really learn.



On Thu, Nov 3, 2011 at 3:46 PM, Tomas Doran bobtf...@bobtfish.net wrote:


 On 3 Nov 2011, at 15:38, will trillich wrote:

  Aha, that's what http://search.cpan.org/~**mstrout/Catalyst-View-TT-0.37/
 **lib/Catalyst/View/TT.pm#**expose_methodshttp://search.cpan.org/~mstrout/Catalyst-View-TT-0.37/lib/Catalyst/View/TT.pm#expose_methodsis
  talking about. Hadn't noticed that before.


 Not noticed it before (fair enough), or not clear enough in the
 documentation?


 Cheers
 t0m



 __**_
 List: Catalyst@lists.scsys.co.uk
 Listinfo: 
 http://lists.scsys.co.uk/cgi-**bin/mailman/listinfo/catalysthttp://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/**
 catalyst@lists.scsys.co.uk/http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/




-- 
The very nucleus of Character: to do what you know you should do, when you
don't want to do it. Stephen Covey
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Tomas Doran


On 3 Nov 2011, at 19:03, will trillich wrote:

In order to have 'perfect documentation' it must meet two criteria:  
A) explain the utility and usage (benefits and how-to) in a way that  
I can grok and B) show up on my radar in my searches. Both of these  
depend a helluva lot on my own activity and context, making  
compliance impossible. :)


Sometimes scar tissue is the only (best?) way to really learn.


Sure, I totally agree.

I'm also entirely certain that the documentation as it stands fails at  
meeting (or at least is way before the standard it could be) in your  
criteria for (A), and therefore will fail to meet a good many other  
people's version of the same criteria.


As someone who has 'just got it', you are absolutely the best placed  
person to modify the documentation to add to the benefits (and maybe  
provide an example) as to make it more clear to people, so that the  
documentation _will_ fulfill that criteria for a broader range of  
people who happen to read it in future.


Cheers
t0m





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


Re: [Catalyst] Database access benchmarks for use in web-frameworks - How does Perl compare?

2011-11-03 Thread Kieren Diment

On 03/11/2011, at 10:00 PM, Tobias Kremer wrote:

 Hi Alec,
 
 On Thu, Nov 3, 2011 at 11:42 AM, Alec Taylor alec.tayl...@gmail.com wrote:
 Are there recent accessible statistics available, comparing these
 metrics across the most popular web-frameworks? (i.e. Symfony, DJango,
 Rails, ASP.NET etc)
 

There's one catalyst site in the adult industry sector which has an alexia rank 
of 81.  To the best of my knowledge they don't have to use excessive hardware, 
or use baroque framework customisations to serve pages effectively.  The BBC 
iplayer is another very high traffic site that achieves similar scale (it might 
even have more traffic than the adult site).

On the other end, I have a single user data analysis app that is quite fast and 
responsive, even though its data model does some potentially inefficient stuff 
with the file system, but this hasn't been an issue for me to date.  You'll 
note there again that it's the model that's the bottleneck not the framework.

And in terms of development process, right now my team are having to do some 
fairly heavy repurposing parts of an existing app without breaking backwards 
compatibility with other bits, under fairly tight deadlines.  While this type 
of work is never going to be especially easy (in terms of accumulating cruft 
and introducing architectural complexity), a tool like catalyst really helps 
achieve the deliverables and keep the customer happy.

 I don't have any statistics, but I can tell you that Catalyst handles
 50 million pageviews a month for us with just two
 web-/application-servers and there's still a lot of room (CPU-load
 peaks at around 2 on a quad-core). Your bottleneck will almost always
 be your database, most certainly not Catalyst. Comparing Catalyst to
 other frameworks in a Hello world-style benchmark (as has been done
 by some people in the past) really proves absolutely nothing because
 your app will probably spend 80% of its time waiting for the database.
 
 Catalyst has a lot of pre-built components/plugins that will help you
 with almost every aspect you'll have to deal with:
 https://metacpan.org/search?q=catalyst%3A%3Aplugin
 



These days you should be looking in the Catalyst::Controller, and 
Catalyst::TraitFor namespaces for extensions, except for the few that really 
need to mess with the request cycle.  Which are still plugins.There's also a 
whole bunch of Catalyst::Models on CPAN too, as well as the 
Catalyst::Model::Adaptor family of modules for gluing other arbitrary things 
into catalyst.

 If you're looking for complete, ready-to-use applications (like
 Magento) I guess you need to start looking in the direction of PHP
 because neither Perl nor Python or Ruby offer that much variety there.
 But if what you want is a custom solution, I can whole-heartedly
 recommend Catalyst and its ecosystem!
 

Yes, PHP owns the ready to roll 
one-size-fits-all-for-one-click-deployment-on-shared-hosting space.  I don't 
see that changing any time soon.



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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread will trillich
Pushy, pushy. :) I'll see what I can come up with.


On Thu, Nov 3, 2011 at 2:29 PM, Tomas Doran bobtf...@bobtfish.net wrote:


 On 3 Nov 2011, at 19:03, will trillich wrote:

  In order to have 'perfect documentation' it must meet two criteria: A)
 explain the utility and usage (benefits and how-to) in a way that I can
 grok and B) show up on my radar in my searches. Both of these depend a
 helluva lot on my own activity and context, making compliance impossible. :)

 Sometimes scar tissue is the only (best?) way to really learn.


 Sure, I totally agree.

 I'm also entirely certain that the documentation as it stands fails at
 meeting (or at least is way before the standard it could be) in your
 criteria for (A), and therefore will fail to meet a good many other
 people's version of the same criteria.

 As someone who has 'just got it', you are absolutely the best placed
 person to modify the documentation to add to the benefits (and maybe
 provide an example) as to make it more clear to people, so that the
 documentation _will_ fulfill that criteria for a broader range of people
 who happen to read it in future.


 Cheers
 t0m





 __**_
 List: Catalyst@lists.scsys.co.uk
 Listinfo: 
 http://lists.scsys.co.uk/cgi-**bin/mailman/listinfo/catalysthttp://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
 Searchable archive: http://www.mail-archive.com/**
 catalyst@lists.scsys.co.uk/http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
 Dev site: http://dev.catalyst.perl.org/




-- 
The very nucleus of Character: to do what you know you should do, when you
don't want to do it. Stephen Covey
___
List: Catalyst@lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/


[Catalyst] Annoyance with Static::Simple and Log4Perl on Catalyst 5.9

2011-11-03 Thread Kieren Diment
I came across this bug after a recent upgrade to Catalyst 5.9.  Static content 
served by Static::Simple is logged in apps which use Log4Perl for logging.

There was a suggestion that using $c-log-_flush would prevent this (which 
leaves the question of how to detect a development environment to automate this 
in development).

To confirm this I wrote a minimal test case, but I'm not sure where to take it 
from here.  Any ideas?

The minimal test case is below:


package StaticTest::Controller::Root;
use Moose;
use namespace::autoclean;
BEGIN { extends 'Catalyst::Controller' }
__PACKAGE__-config(namespace = '');
sub default :Path {
my ( $self, $c ) = @_;
$c-response-body( $c-welcome_message );
}
sub end : ActionClass('RenderView') {
my ($self, $c) = @_;
$c-log-_flush; # doesn't suppress static logging
}
__PACKAGE__-meta-make_immutable;
1;


package StaticTest;
use Moose;
use namespace::autoclean;
use Log::Log4perl::Catalyst;
use Catalyst::Runtime 5.80;
use Catalyst qw/
-Debug
ConfigLoader
Static::Simple
/;
extends 'Catalyst';
our $VERSION = '0.01';
# doesn't suppress logging of static content
after 'finalize' = sub {
my ($self) = @_;
$self-log-_flush;
};
__PACKAGE__-log(Log::Log4perl::Catalyst-new());
__PACKAGE__-config(
name = 'StaticTest',
disable_component_resolution_regex_fallback = 1,
);
__PACKAGE__-setup();
1;



Kieren Diment
PhD Candidate
Health Informatics Research Lab,
Faculty of Informatics,
University of Wollongong
Tel:  +61 4221 3952





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


Re: [Catalyst] Dealing with timestamps from Postgres

2011-11-03 Thread Denny
On Thu, 2011-11-03 at 15:20 -0500, will trillich wrote:
 The very nucleus of Character: to do what you know you should do,
 when you don't want to do it. Stephen Covey

Good .sig quote for a thread about documentation  :)




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