Introduction to Web system development using Perl and Mojolicious

Introduction to Web System Development is Mojolicious Perl web framework.

Perl has a web framework called Mojolicious that makes it easy and flexible to create web applications.

With Mojolicious, you can build a web system that has both development efficiency and performance.

Features of Mojolicious

Features of Mojolicious

Embedded development server

Mojolicious has a development web server that can be booted in a Linux environment. With a development web server, you can run your web application in a local environment, so you can repeat your development work faster and improve your development efficiency.

Prefork + asynchronous I / O production server

Mojolicious has a performance-optimized production web server that can be booted in a Linux environment. Start the production server with prefork + asynchronous I / O.

By pre-forking the child process, we prepare for HTTP requests in advance. Prefolk allows you to wait for requests in parallel.

Each child process is asynchronous I / O and receives an HTTP request. Asynchronous I / O is a scalable implementation that the architecture can withstand over 10,000 simultaneous connections.

Hot deployment

Hot deployment is a technology for restarting a production server without shutting it down completely. The server will be restarted to prevent loss of HTTP requests.

Template

Mojolicious has a template to use for HTML output. It is possible to output dynamically using Perl code in the template.

JSON support

Mojolicious's API supports JSON. It's easy to receive JSON with AJAX and draw JSON.

Functions are limited to the Web layer

Mojolicious is a web framework with limited functionality at the web tier. Accessing the database is not included as a feature of the web framework.

You are free to choose and use the database access module (eg DBIx::Custom).

Asynchronous I / O HTTP client

Mojolicious contains an HTTP client for asynchronous I / O. When throwing an HTTP request to an external service, you can send the HTTP request without blocking.

Small web app

A module included with Mojolicious called Mojolicious::Lite allows you to create a web app in three lines.

use Mojolicious::Lite;
get'/' => sub {shift->render(text =>'Hello')};
app->start;

This is the smallest web application that displays Hello on the screen.

High compatibility and security security

Mojolicious is continuously maintained and will be fixed as soon as a security issue arises. Sometimes it breaks compatibility, but in principle it's backwards compatible and easy to upgrade. Perl itself is also very backwards compatible.

Good compatibility with Perl's GC

Perl has a GC optimized for average response speed called reference counting GC.

This works well with Mojolicious's asynchronous I / O web server.

For asynchronous I / O, low average latency is very important for good performance, but Perl is optimized for average response speed.

Would you like to start web system development with Perl & Mojolicious?

Want to start web system development with Perl & Mojolicious?

The combination of Perl and Mojolicious goes very well with web system development.

High development efficiency with a concise description, high execution performance by prefork + asynchronous I / O.

Please compare it with other methods.

Associated Information