Perl for the Web: Mojolicious 8.0 Released
Written by Nikos Vaggalis   
Monday, 24 September 2018

Far gone are the days when you wrote Perl for the web in just CGI. Dancer, Catalyst and Mojolicious are the modern ways of going about it, with Mojo's version 8.0, code-named "Supervillain", being released just last week.

Each framework has its own distinct advantages, with Dancer being considered the most lightweight and with the lowest entry barrier; and Catalyst being considered the most heavyweight and with a steep learning curve. Mojo floats somewhere in the middle, its own strongest point being its claim to be a "Real time Web framework" due to its Websockets and non-blocking/async capabilities provided out of the box. With that said, let's discover what Mojo's newest version has to offer.

The most outstanding feature, given that Mojo is based on an Event loop à la NodeJS, is the introduction of the "Mojo::Promise" module, a Perl implementation of Promises that simplifies and enhances the asynchronous operations callback mechanisms in place. Also there is a major change in the Core's process model in that worker processes are now able to host any number of subprocesses in order to speed up the execution of slow prolonged operations.

Another module, Mojo::File, is an attempt to unify the diverse APIs of operating with files, offered by an enormous and variable amount of Perl modules, under a single API.

Also:

  • There's now the option of using Unix domain instead of TCP/IP sockets.

  • Role::Tiny for easily extending Mojo classes

  • Placeholder types where you can group root requests by description of functionality

  • Attaching ID's to requests
  • The Mojo::Pg module that facilitates more compact Postgres async database queries
  • And in yet another Postgres-related feature, is the use of SQL::Abstract::Pg in order to write common SQL queries in a generic way so you don't have to repeat the same boilerplate queries over and over again

For a detailed look on the new version's full feature list, have a read or watch the respective presentation at the recent Mojoconf by Sebastian Riedel himself.
mojosq

And, as at I-programmer we take a keen interest in any developments on the Perl Web framework front, make sure to check out the related resources at the end of this post.

 

More Information

Mojolicious 8.0 released: Perl real-time web framework

Related Articles

Mojolicious In Conversation With Sebastian Riedel 

Single Page Application with Perl Dancer - Book review

Geekuni's Dancer Web Development Course

nginx A Practical Guide to High Performance

All About Dancer - In Conversation With Sawyer X

Data Entry with Xataface

Insider's Guide to Udacity Android Developer Nanodegree Part 7 - Full Stack Android

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Random Gifts For Programmers
24/11/2024

Not really random. Not even pseudo random, more stuff that caught my attention and that I, for one, would like to be given. And, yes, if I'm not given them, I'd probably buy some for myself.



Highlights Of The Europe 2024 PostgreSQL Conference
22/11/2024

This year's premium conference for PostgreSQL took place in Athens, Greece between October 22-25. The nice Athenian weather and cultural aspect aside, the conference was a big hit too.


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

 

Last Updated ( Monday, 24 September 2018 )