Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^2: Constructive thoughts on Dancer2 v Mojolicious

by 1nickt (Abbot)
on Jun 04, 2020 at 18:29 UTC ( #11117700=note: print w/replies, xml ) Need Help??


in reply to Re: Constructive thoughts on Dancer2 v Mojolicious
in thread Constructive thoughts on Dancer2 v Mojolicious

For the record Dancer and Dancer2 are completely separate toolkits. Dancer2 is *not* version 2 of Dancer. Dancer has been described by the project leads as "a big collection of abuses of globals." On the other hand, Dancer2 is by far the most Perlish framework I have used.

Mojolicious has also undergone breaking changes, but uses major version numbers, and then deprecates/uses an EOL schedule for earlier versions. So you wind up having to pin a version anyway.

I use Mojo at work and it works. I dislike a lot of things about it, all mostly centered around the personality/culture of its core development group. For example, Mojo 8 includes Mojo::DynamicMethods.pm, which despite its doc breaks our code using can ...

monkey_patch $dyn_pkg, 'can', sub { my ($self, $method, @rest) = @_; # Delegate to our parent's "can" if there is one, without breaking + if not my $can = $self->$caller_can($method, @rest); return undef unless $can; no warnings 'once'; my $h = do { no strict 'refs'; *{"${dyn_pkg}::${method}"}{CODE} }; return $h && $h eq $can ? undef : $can;
Talk about EETOOMUCHMAGIC!

Adopting Mojo is a bit like getting jumped into the mob: there's no exit, and the rules are the rules. I find Dancer2 app development to be much more intuitive, light, and fun.


The way forward always starts with a minimal test.

Replies are listed 'Best First'.
Re^3: Constructive thoughts on Dancer2 v Mojolicious
by Your Mother (Bishop) on Jun 05, 2020 at 07:18 UTC

    I did qualify my take with saying good devs like Dancer!

    Magic is concerning but if the dev team is behind it, I donít mind. That code looks clean and safe to me.

    So you wind up having to pin a version anyway.

    Yeah, some of the speed releases early on in Mojo are what kept me from investigating it for years. Plus I canít use it at work because *SIGH* weíre still on 5.8. That said, professional software should specifically set every version of every package it contains. A good test suite generally makes updates to libraries easy; or at least quickly finds what canít or shouldnít be updated.

    It was basic Dancer2 backend code that kept me from trying it again: badly scoped variables. And again, the reason it took many years to even consider this stuff is Iím pretty thermally energetic feces with Catalyst. :P

Re^3: Constructive thoughts on Dancer2 v Mojolicious
by perlfan (Vicar) on Jun 07, 2020 at 15:51 UTC
    >Adopting Mojo is a bit like getting jumped into the mob: there's no exit, and the rules are the rules.

    Never thought of it quite this way, but now that you mention it I got the same feeling from early Perl frameworks like PHP and Mason, not to mention this sentiment applies to Moose and it's elk.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11117700]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2020-12-04 05:41 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    How often do you use taint mode?





    Results (58 votes). Check out past polls.

    Notices?