The Mojolicious Blog.

A semi-official blog dedicated to the Mojolicious web framework

Day 9: Add a theme system to your Mojolicious app

Four lines of paint drawn on a roller, in green, red, orange and blue

You wrote an awesome Mojolicious app, and people use it. Marvellous! But users may want to modify the theme of your app: change the logo, use another CSS framework, such sort of things.

Modifying the theme of a Mojolicious app is quite easy: add, modify or delete things in public and templates. But all those direct modifications may not survive on update of the app: they will simply be erased by the files of the new version.

Let's see how we can provide a way to have a theme system in a Mojolicious application, that allows users to have a custom theme without pain and without risk of losing it on updates.

Continue reading Day 9: Add a theme system to your Mojolicious app...

Day 8: Authenticating with LDAP

Who goes there?

There are still quite a few people using LDAP in production, but for those who are new to it, LDAP is a directory with a tree-structure that's optimised for very fast lookups. It used to be very common as a centralised authentication system and if you're using Active Directory, you're using LDAP (mostly). I wander through the wilderness of authentication, ending with my solution on how to add LDAP authentication to your App.

Continue reading Day 8: Authenticating with LDAP...

Day 7: MetaCPAN, Mojolicious and OpenAPI

Contract signing

During this years meta::hack 3, I was extremely fortunate to work with Joel Berger on integrating/documenting OpenAPI with the MetaCPAN API via Mojolicious.

What is it?

OpenAPI is a specification for designing, documenting, validating and driving your RESTful API. It can be used to provide documentation to an existing API, or when creating a new one.

The OpenAPI Specification originated as the Swagger specification and was renamed to separate the API description format (OpenAPI) from the open source tooling (Swagger). The specification moved into a new GitHub repository, but did not change.

In the case of the MetaCPAN API, we set out to provide documentation to the existing API, but quickly moved into supporting validation to API calls as well.

Continue reading Day 7: MetaCPAN, Mojolicious and OpenAPI...