perrin at elem
Jan 16, 2007, 5:59 AM
Post #25 of 30
Robert 'phaylon' Sedlacek wrote:
> Perrin Harkins wrote:
>> I think it's a lame benchmark too, but isn't a dispatcher mostly what
>> Catalyst is? DBIx::Class and TT are not Catalyst, as people often
>> mention on the list.
> I wouldn't say so. You can build applications that only use the
> dispatcher of Catalyst, but the model interface, the view (not TT, just
> the view classes), the plugin system, inherited actions, the config
> system, action classes, etc. are pretty well used in most of my apps too.
In the context of benchmarks, those things all seem pretty minimal to
me. The model interface is a razor-thin wrapper over calls to your ORM
of choice. There's not much reason to use it that I can see. Same with
the view: very little difference from calling templating tools directly.
(Somewhat more reason to use it though, since people often mess up the
caching in TT when they write their own calls to it.)
Most plugins don't do anything except pass your config to some module
and put a method in $c for something you could call directly. A few
specific plugins that contain some code do add real value -- session,
auth, pagecache -- and are frequently used, so I would consider them a
core part of Catalyst's functionality. Those would be fair game for a
Inherited actions and action classes are part of the dispatcher in a
broad sense (i.e. part of how URLs get mapped to methods).
The config system does provide convenient centralization but is mostly a
call to YAML or similar and won't contribute to runtime performance.
The biggest other thing that Catalyst itself provides is an abstraction
layer over runtime environments. That's a standard part of all modern
web framework, and shows up in any benchmark naturally.
The point being, saying that benchmarking the mapping of URLs to methods
isn't a good test of Catalyst is like saying that running SQL queries
isn't a good test of DBI. The bulk of the actual Catalyst code (not ORM
or templating) that will run on any request to a Catalyst app is the
dispatcher and the runtime environment abstraction. It's a *terrible*
test of the real-world performance of real web applications, which is
mostly about the database access and templates, but a good test of the
List: Catalyst [at] lists
Searchable archive: http://www.mail-archive.com/catalyst [at] lists/
Dev site: http://dev.catalyst.perl.org/