CMOS #1: Jason Crome on Perl Dancer 2
Interview with Jason A. Crome one of the core developers of the Perl Dancer web framework. We talked about how he got involved in the project and how they handled the upgrade process from Dancer 1 to Dancer 2 to avoid breaking any of the plugins.
Hi Jason, how are you?
Last year, I've retired from that, and I've been active off and on in the Perl community for a number of years and when I decided to get back to work last fall, one of the things I've gravitated towards was the Dancer project, something that I've used a little bit in the past.
Eventually they had me join their team, and I've been doing a lot with that. In November I got hired on by All Around the World, a consulting firm out of France. There I am the technical lead on a project called Veure, which is a Massively Multiplayer Online Game (MMORPG) written in Perl.
The one that I've been using kind of died out and I sat in a couple of talks and Sawyer, one of the project leads, he is a very engaging speaker and he had a really good talk about what Dancer was about. It really fit the way that I've worked and I submitted a couple of pull-requests to them that got incorporated. I really didn't get back to it until last fall and a project I was using used Dancer, and as I started to run into issues with docs and a coouple of bugs I've noticed, I've started to send in pull-requests and Sawyer contacted me and said, "You know if you keep doing this, then we are going to have to assimilate you into the core team," and a little bit later that's actually what happened.
But what Dancer is, it is a framework for building web applications. For those of you who are familiar with Perl, Perl has this great saying that "Making Easy Things Easy and Hard Things Possible." That's really a philosophy that the Dancer framework has stuck with. If you want to build a web app and get up and running quickly, then Dancer is a great framework to do it with.
If you've never done web programming, if you've never done Perl programming actually, it's a really nice entry point into the Perl ecosystem. If you are an experienced Perl programmer, you are not going to be disappointed either, because all of the power and flexibility that the Perl ecosystem allows you, you can channel that into your Dancer applications. You can make really large and elaborate web applications pretty easily. The framework takes care of a lot of things most of the web programmers don't want to think about all the time. It does those things really easily. Either through the core of the framework or through the number of plugins that it offers. It just does what you need it to and it kind of stays out of your way, it's great.
The core of the framework is actually pretty minimalistic. It lets you say, if visitors come to my application and they visit this URL, this is what I am going to present them with, or this is the code that will happen. A lot of the additional magic happens in the plugin ecosystem. Dancer knows how to talk to a templating engine, but other then a very simple templating engine that we have out of the box, all the rest of the templating functionality is provided through plugins. I use a templating framework called Template::Toolkit. I've been using it for years and I am very familiar with it and that functionality is provided through a plugin.
I use Redis a lot for caching. We have both a generic Redis plugin that accesses the functionality of Redis, we actually have a session plugin that stores your application state information in Redis, just like it would with any of the other session engines in files or whatever.
There is a lot out there. One of the things that you could do with Dancer 1 that you couldn't do in Dancer 2 was plugins that use functionality provided by other plugins and this was kind of a blocker for some people who wanted to move from Dancer 1 to Dancer 2. Actually the code for plugin 2 was done a long time ago, but one of our project focuses is on stability.
So a couple of our developers, Peter Mottram specifically, took on the lion share of it, syspete as he is known in the Perl community.
He individually tested every plugin in the Dancer ecosystem with the new plugin 2. Figured out what broke and if we had access to those plugins, then we fixed them, and if they were written by somebody else, we actually sent pull-requests to the ones we did not control. So that we knew, out of the gate, that the whole plugin ecosystem would function with our new plugin architecture.
It was kind of funny, there were still a couple of them that we could not patch, so we even spent some time building a compatibility layer, so that the Dancer 1 plugins could still use plugin 2 with no syntactic changes. Stability and not breaking other peoples code, is very important to us.
Okay, so what kind of project do you know that exist, that are using Dancer, that you can point out?
I can think of a lot of companies that are using Dancer in their applications and behind the scenes, but as far as canned software packages like wikis and blogs, I never see a whole lot of those coming out of the Perl community. It always seems like we are focused on getting other jobs done.
We are also on GitHub, if you look on GitHub for Perl Dancer all the plugins and the actual source code of Dancer can be found there. Our issues, our open tickets are managed at GitHub and we have a lot of tickets out there that are marked as beginner friendly or up for grabs. Anybody who wants to contribute to Dancer, write a plugin, send us a documentation patch, look for one of the beginner friendly tickets. It is a very eassy project to get involved in. It is a very easy to follow codebase. It is a very thriving and happy community of people. It is one of the things that drew me to Dancer over so many of the other open source projects, is that we really have a great community.
Published on 2016-08-23