A TEXT POST

Mojolicious 5.0 released: Perl real-time web framework

image

I’m excited to announce the release of Mojolicious 5.0 (Tiger Face).

It is named after the location of our very first Mojoconf, which has been a huge success and ended just a few days ago. The Oslo Perl Mongers have really done an amazing job putting it all together, and we would love to see this turn into a yearly event, so if you’d like to host the next Mojoconf in 2015, please get in touch!

The community keeps growing fast, and just a few months ago we’ve actually been the very first Perl project on GitHub to be starred more than 1000 times. On IRC we now see about 170 regulars and the mailing-list has grown to over 800 subscribers, thanks everyone!

There are many new features this year, for a quick overview you can take a look at the slides from my Mojoconf talk. Here’s a list of the highlights:

  • Redesigned: All new exception and not_found pages. (usage example)
  • Form validation: Simple and extensible. (example)
  • CSRF protection: You can’t have form validation without it. (example)
  • Template variants: When responsive web design is not enough. (example)
  • All new Mojo::DOM: With support for many different node types and new ways to manipulate HTML. (example)
  • New hooks: The framework got a lot more extensible with hooks like around_action and before_render.
  • SO_REUSEPORT: A new way to do zero downtime restarts and high performance web servers. (example)
  • Rotating secrets: More security without having to invalidate existing sessions. (example)
  • Non-blocking bridges: A new way to reuse non-blocking code. (example)
  • Cheap helpers: You can now have as many as you like.
  • Optional placeholders everywhere: Even at the beginning of your route pattern.
  • RFC 7159: Support for the new JSON spec.
  • permessage-deflate: WebSocket compression.
  • Minion: A new spin-off project, because every full-stack framework needs a job queue. (example)

And as usual there is a lot more to discover, see Changes on GitHub for the full list of improvements.

Have fun!

A TEXT POST

Mojoconf 2014

image

I’m very happy to announce that this year Mojolicious will be getting its very own conference, from the 23rd to 25th of May 2014 the Oslo Perl Mongers will be hosting the very first Mojoconf. And the whole core team will be there to talk about Perl and the Web!

A TEXT POST

Convos: Chatting in the cloud with Mojolicious

image

If you like IRC and Perl, we’ve got a real treat for you! Our friends at Nordaaker have just open sourced Convos.

Convos is the simplest way to use IRC. It is always online, and accessible to your web browser, both on desktop and mobile. Run it on your home server, or cloud service easily.

image

Have fun!

A TEXT POST

Mojolicious 4.0 released: Perl real-time web framework

image

It fills me with great joy to announce our classiest release yet, Mojolicious 4.0 (Top Hat).

This is the first major release for the newest member of our core team, please welcome Dr. Joel Berger, he was responsible for many of the new features. It has only been 11 months since our 3.0 release and the new development process is working out very well for us so far. The community keeps growing fast, we’ve now been starred almost 900 times on GitHub and the IRC channel regularly reaches more than 150 visitors, thanks everyone!

While the main focus of this release has been on the removal of legacy APIs, there are also quite a few new features, here are the highlights:

  • Content generators: “json” and “form” generators are built right in. (example)
  • JSON WebSocket messages: Native serialization and deserialization support. (example)
  • JSON WebSocket tests: Just as easy to use as their HTTP equivalents. (example)
  • Event synchronization: Avoid callback spaghetti with delays. (example)
  • Scalability: The event loop got a lot better at managing more than 10k concurrent connections. (example)
  • Smooth restarting: The Morbo development web server does not have any noticeable downtime while restarting anymore.
  • Hooks: The framework got more extensible with new hooks. (example)
  • GZip: Compression is now transparently supported by the user agent.
  • HTML5 forms: Tag helpers have been added for many of the new form elements. (example)
  • Session expiration: Can now be controlled with a relative value that persists within the session. (example)
  • GET/POST parameters: Retrieve multiple values at once with the much more secure multi name form. (example)
  • JSON Pointers: Now fully RFC 6901 compliant. (example)
  • Monotonic clock support: All built-in web servers are now very resilient to time jumps.

And as usual there is a lot more to discover, see Changes on GitHub for the full list of improvements.

Have fun!

A TEXT POST

Mangolicious

image

I’m very happy to announce the first alpha release of Mango, a new pure-Perl non-blocking I/O MongoDB driver, and the latest Mojolicious spin-off project.

If you’ve ever worked with the official MongoDB driver for Perl, you’re probably well aware of its many shortcomings, so i’m not gonna ramble on about it… it’s basically the only driver i could find that still defaults to unsafe writes.

While MongoDB itself can be a bit quirky as well, it is also a hell of a lot of fun to work with, especially for rapid prototyping HTML5 web applications. Now that real-time web technologies such as WebSockets are becoming more and more popular, there is a growing demand for versatile non-blocking datastores that work well with event loops. So Mango has been designed from the ground up with the same hybrid architecture as the popular Mojo::UserAgent, and both share the same general characteristics.

Some of the most important features are:

  • Clean blocking and non-blocking hybrid API.
  • All operations are safe by default, you have to work to lose data.
  • Fast and simple installation, no C compiler needed.
  • Optimized for use with Mojolicious.

And of course here’s the obligatory example application. ;)

So, what are you waiting for? Get yourself a free account over at MongoHQ or MongoLab and start writing awesome web applications.

Have fun!

A TEXT POST

Mojolicious 3.0 released: Perl real-time web framework

image

It fills me with great joy to announce the release of Mojolicious 3.0 (Rainbow).

This marks the first major release for our newly formed core team, consisting of Glen Hinkle, Marcus Ramberg, Abhijit Menon-Sen and yours truly. A lot has happened during the last 8 months since our 2.0 release, most design decisions are now made by majority vote. The core feature set is not changing much anymore, and we are in the process of refocusing our efforts on making Mojolicious more approachable for beginners and easier to extend. The community is still growing fast, and we’ve just passed 666 watchers on GitHub, thanks everyone! :)

There are many new features, here are the highlights:

  • TLS and IPv6: Support for both has been greatly improved.
  • Commands: The command system has been completely revamped. (example)
  • Plugins: Generator and CPAN upload commands make extending Mojolicious easier than ever. (example)
  • Event loops: Mojolicious no longer needs to control the event loop. (example)
  • Content negotiation: Write more RESTful web services. (example)
  • JSON Pointers: Many features dealing with JSON got a lot smarter. (example)
  • Flexible router: Routes can now be rearranged. (example)
  • Flexible renderer: Serve templates and static files from as many DATA sections and paths as you like. (example)
  • Asset plugins: Easily bundle assets such templates and static files with plugins. (example)
  • Not found page: Is now actually a development tool.
  • Hypnotoad: Doesn’t require a separate configuration file anymore. (example)
  • WebSockets: Fully RFC 6455 compliant. (example)
  • Relaxed placeholders: Now look like “/#foo” instead of “/(.foo)”. (example)
  • I18N plugin: Maintained as a separate distribution from now on.

And as usual there is a lot more to discover, see Changes on GitHub for the full list of improvements.

Have fun!

A TEXT POST

A new look for Mojolicious

You may remember last year when we introduced all-new not found and server error pages for Mojolicious. Well, it’s that time of the year again, and we’ve recently been modernizing some of them. While both raptor pages still pass with flying colors, the more artsy development mode not found page only got mixed reviews. So it has been redesigned from scratch, and turned into more of a development tool, listing all the routes of your application.

image

The server error page only needed a few small refinements for both to have a similar look and feel, hope you like it.

image

Have fun!

A TEXT POST

Mojolicious in the cloud: Hello Heroku!

A lot has changed in the world of cloud hosting since the last time i took a closer look at one of the providers. Almost all of them support Perl these days, directly or indirectly. One of the most prominent ones is Heroku, and today we are going to use their official tools and a custom buildpack to deploy a Mojolicious::Lite application into the cloud.

First of all you need to sign up for a free account and install the Heroku Toolbelt, the heroku command line client will be available afterwards and take care of the rest.

Only three files are required to make an application deployable to Heroku, the application script itself, a “Makefile.PL” containing a list of CPAN dependencies, and an executable “Perloku” script telling Heroku how to start the Mojolicious web server.

For our little experiment we will only be using a very minimalistic application.

And the only dependency is Mojolicious, but any CPAN module you specify can be installed automatically.

My favorite Heroku feature is that we are allowed to run our own web server, which enables many of those nifty real-time web features to just work. The port to be used for listening will simply be passed along via environment variable.

And those were all the preparations required, now we can just deploy our application withgit.

I’ve also heard rumors that Glen “tempire” Hinkle might be working on new Mojolicious commands to make the whole process even easier, but you’ll have to visit (or watch the live stream of) his talk at YAPC::NA 2012 to learn more about that. ;)

image

Have fun!

A TEXT POST

Mojolicious hack of the day: Mojolyst

Today i’ve got a real hack for you. We are going to hijack the Mojolicious router and turn it into a more Catalyst-ish decentralized one, just by using a plugin. Controllers are discovered on application startup and their routes composed automatically, even templates in the DATA sections of each controller are supported. :)

Have fun!