[HN Gopher] Mojo.js is a port of Perl's Mojolicious to TypeScript
       ___________________________________________________________________
        
       Mojo.js is a port of Perl's Mojolicious to TypeScript
        
       Author : petesergeant
       Score  : 40 points
       Date   : 2022-11-18 16:13 UTC (6 hours ago)
        
 (HTM) web link (mojojs.org)
 (TXT) w3m dump (mojojs.org)
        
       | metadat wrote:
       | I'd never heard of mojolicious, and now wishing this had existed
       | 20 years ago! It is quite elegant, but looks like the first
       | release was dropped in 2015.
       | 
       | https://metacpan.org/pod/Mojolicious
        
         | sciurus wrote:
         | Mojolicious reached 1.0 in 2010.
         | 
         | https://github.com/mojolicious/mojo/blob/main/Changes#L4345
        
           | metadat wrote:
           | Oh, thanks for the correction. I was looking at the versions
           | listed on the CPAN page.
           | 
           | Now I feel ROMO, though (Regret on Missing Out :)
        
         | ofrzeta wrote:
         | The Mojolicious homepage https://mojolicious.org actually looks
         | almost like the Mojo.js homepage (or the other way round). So
         | much that I first suspected some kind of parody until I
         | realized they were indeed the same people.
        
       | newaccount2021 wrote:
        
       | no_wizard wrote:
       | Interesting pivot! I've never seen a framework for one language
       | pivot into another like this. I like this approach, too often
       | good frameworks just die with the language.
       | 
       | I hope its an opportunity for the Mojolicious team to do things
       | they just couldn't do their Perl framework due to legacy
       | constraints etc and they get to take on fresh new ideas and see
       | them through! I've heard good things on the peripherals for years
       | about Mojolicious
        
       | sarabob wrote:
       | It has been interesting watching this develop, if for no other
       | reason that Express is somewhat stuck after TJ left to make
       | koa[0] and hasn't changed much since 2014. Express 5 has had no
       | commits for 9 months - it's not dead, but it's not exactly
       | thriving either. While there are alternatives to Express, none
       | seem to have huge amounts of traction or do far more than a
       | backend framework (nextjs, sveltekit), so maybe there is room for
       | another framework.
       | 
       | I'll never forget seeing this tweet[1] - what I considered a core
       | pillar of the perl community discovered that after a short period
       | of familiarization, a perl developer of many years could write
       | code that is many times faster just by switching from perl to js.
       | No deep voodoo, no special tricks - just write code in JS and
       | handle 3x as many reqs/s. I'm glad to see that the rest of the
       | mojo ecosystem is coming along - Minion is a really nice, simple
       | job queue that can piggyback on your existing postgres database
       | without depending on redis or anything. Would be awesome to see a
       | dynamodb backend someday. Hmmm.
       | 
       | Unfortunately I'm not sure who the target market is - a
       | typescript web framework selling itself as "Perl-grade" anything
       | is not a good look for 99% of JS/TS devs. Maybe it's positioning
       | itself as the logical migration path for companies moving away
       | from perl?
       | 
       | [0]https://github.com/expressjs/express/issues/2844
       | [1]https://twitter.com/kraih/status/1392405140406210560
        
         | ofrzeta wrote:
         | You seem to have followed the development, but anyway in this
         | blog entry they explain the motivation and the plans for the TS
         | version:
         | 
         | https://mojojs.org/news/mojo.js-1-released
         | 
         | Among other things I find this quite interesting:
         | 
         | "Software supply chain attacks around NPM are a hot topic right
         | now. And it can be quite problematic to audit your whole
         | dependency tree. Thankfully, while the Perl version has no
         | dependencies at all, in JavaScript we only have 23 trusted
         | third party dependencies. And we are prepared to replace every
         | single one of them if necessary, with a port of the battle-
         | tested Perl implementation."
        
           | christophilus wrote:
           | I've been slowly working on a 0 dependency framework in Bun
           | for similar reasons. The size of the average package-
           | lock.json is absurd and nerve wracking.
        
       | arrakeen wrote:
       | i hope this ends up supporting `app.shagadelic();` like the
       | parent framework
        
       | trinovantes wrote:
       | The first thing I consider when looking at Express-alternatives
       | is if the API is fully compatible because almost every other 3rd
       | party library/package (e.g. sentry) expects the Express object.
       | This doesn't look like the case as I have no idea what the mojo
       | context object is.
       | 
       | On a side note, I'm surprised to see frameworks trying to use
       | benchmarks against Express as a key feature. Framework overhead
       | is insignificant when requests delays are mostly due to the
       | database/network.
        
         | christophilus wrote:
         | > Framework overhead is insignificant when requests delays are
         | mostly due to the database/network
         | 
         | It really depends. When every part of your app is concerned
         | with performance, it tends to hum along. When every part of
         | your app tends to think, "the bottleneck is the database, so
         | this doesn't matter", you get modern systems.
        
       ___________________________________________________________________
       (page generated 2022-11-18 23:01 UTC)