Recommendation for simple Web Frameworks
edencardim at gmail.com
Tue Jan 11 11:58:05 GMT 2011
>>>>> "Simon" == Simon Wistow <simon at thegestalt.org> writes:
Simon> You can see how I'd be confused given that the docs say
Simon> "Catalyst follows the Model-View-Controller (MVC) design pattern,
Simon> allowing you to easily separate concerns, like content, presentation,
Simon> and flow control, into separate modules."
Simon> Now true that doesn't necessarily preclude me from not creating models
Simon> but it does seem to imply that they are somewhat expected.
The documentation is written that way because it's what newcomers expect
from a framework, but it does say "allowing" (not "expecting"). The
implementation doesn't force you to follow the MVC paradigm at all, it's
much like perl in the sense that it has OO support but it doesn't force
you to follow the paradigm. What might be missing is a "how to write
non-mvc applications catalyst" document.
Simon> My experience with most of the major web frameworks across 3
Simon> different languages has indicated that much of their utility is based on
Simon> the automagic they provide. Magic requires a fair bit of
Simon> convention-over-configuration or, at least, expects you to be doing
Simon> things "The Right Way[tm]" and attempts to circumvent tend to lead to
That's the case with most of the major frameworks yes, but not the case
with catalyst, it's more like "heavy configuration, sane defaults", you
don't even need the scaffold structure that the helpers build and you
can even re-wire the entire dispatcher via configuration without ever
touching application code.Again, the scaffolding is there because
newcomers need a sense of structure to follow.
Simon> And I'm fine with that - it's a good thing and for 90% of people it's
Simon> probably the right thing.
Simon> However I didn't want to be in the position where, somewhere down the
Simon> line, I started having to wrap hashes in fake pseudo-Catalyst::Model
Simon> classes in order to get stuff working with some component or plugin
Simon> because the author of that (quite rightly) assumed that no fool would
Simon> ever not be using models. [*]
You don't have to wrap anything in a "pseudo-model-class", you'll notice
that the demo app built by the scaffolder works and it has no
views/models. Your app could be one big subroutine if you wanted to, but
then you wouldn't need catalyst, you'd be better off with a PSGI app.
Simon> I may have the wrong impression but my experience with a large Catalyst
Simon> app (TypePad) and reading the docs lead me to that
You wouldn't be the only one, makes me think there's a mistake in how
the framework is advertised. I've done several large apps in catalyst,
some were good, some were ok, some were bad, "no silver bullet".
Simon> Other reasons for not going with Catalyst which may or may not be FUD:
Simon> * Felt "too heavy". I needed a very simple app and Catalyst seems
Simon> designed for non-simple apps.
This might be FUD, I'm not sure I understand what "too heavy" means, I
guess it means you don't need the robustness and flexibility. If that's
the case, you have a valid point here, there's no reason to use catalyst
Simon> * Bad experience with Catalyst based app start up times during
Simon> development cycles (this is also true for Django and Rails FWIW)
Valid point, it's optimized for runtime in expense of load time. And it
did outperform both django and rails the last time I checked.
Simon> * Too many dependencies
I disagree that this is a disadvantage but that's for another
Simon> * Moose. I just don't like it - but that's just me.
Simon> Don't get me wrong, I think Catalyst is great but it didn't feel quite
Simon> right for this occasion.
Don't get me wrong either, I haven't been vouching for catalyst much
these days either, there certainly are flaws and reasons for not using
it. Personally, I've been going for Web::Simple these days because it
has the best dispatcher I've seen so far. I just felt that the arguments
displayed against catalyst in this discussion were unfair.
Shadowcat Systems Ltd.
More information about the london.pm