Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??
I haven't used catalyst other than following a tutorial or two but I have used Dancer and can provide some impressions of that.

First, it's route definition code is really nice. It's really really easy to define routes and it's really easy to run a local development server and start making progress right away. It doesn't provide the same level of functionality as catalyst (it's much smaller and has less plugins). For me that's a good thing.

There are some things about it I don't like. First of all, the way it provides all functionality through "keywords" like "template" (and plugins do the same thing, DBIC is "schema"). In all their documentation they have these keywords that look like barewords (no sigil) but are treated as objects, references, etc. What they really are is functions that have prototypes (so you don't need to use parentheses) that return references (to objects, hashes, etc.). I've been programming perl for a really long time and it's difficult to get used to that style. In fact I generally pull them out as vars at the beginning of my functions so I can use them in a more regular way. Like my $schema = schema(); Here's a more specific example, here's how you access request parameters:

return "Hello " . params->{name};

I would much prefer a $params object where I can say $params->name() or a $params hashref where I can say $params->{name}. So I end up saying my $params = params(); and getting said hashref so I don't have to look at unhighlighted "barewords" everywhere.

The setup in Dancer is tied to YAML which I'm not a fan of but I don't have to touch it often so it doesn't bother me too much.

The logging interface is pretty limited. There are plugins that you can use to get different logging but it's still a pain. The problem is that application-level stuff goes to one log (say development.log) but messages about syntax errors and other crashes goes to the logging mechanism of whatever thing you're running the server as (plack, apache, etc.). This means I have to tail more than one log during development to see what is going on.

The mailing list is generally helpful although every dozen or so questions that go through seem to go unanswered.

The development process there is cumbersome and it's difficult to get even simple changes approved (and merged in). They are using github in this complicated way where they develop against "devel" branch but then when they are on the verge of release everyone has to stop using "devel" and use something else for some period of time. It would make more sense to just branch devel into a release branch so development can continue on "devel."

There is no way to set session timeouts dynamically (you have one setting in the conf file and that's it). Makes it difficult to have a "remember me" checkbox on login pages.

I think were it up to me I'd take the route handling stuff alone and plug in my own modules (and by "my own" I mean picking the ones I like from CPAN) for logging, development server, templates, sessions, db, etc.

It is actually now possible to only import some "keywords" (those prototyped functions that return references) and not others. This has made it easier to use some of the Dancer-provided functions in other modules. This wasn't possible when I started my project so I had already worked around that by using my own logging modules and whatnot.

In reply to Re: Catalyst or Dancer? by saberworks
in thread Catalyst or Dancer? by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others goofing around in the Monastery: (3)
As of 2024-04-26 02:34 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found