Friday, December 11, 2015

Dada Mail v9 Released

The latest major release of Dada Mail has been released. Version Nine! 

Dada Mail is an email mailing list manager, written in Perl. Usually in my posts, I go over all the cool things I was able to get accomplished, because of some neat Perl module or technique.

The last major release focuses on redesigning the backend of Dada Mail, and adding support to run it under PSGI/Plack, while also maintaining the ability to run it under CGI. For that, I moved over to CGI::Application.

This release focuses almost explicitly on the front end design and layout -  and for that, I utilized the Zurb Foundation Framework.


I couldn't have imagined how much work moving to Foundation would have taken, when I started. Sling a few <div>'s here and there - right?

Well, wrong - and it wasn't Foundation's fault. Although there is a learning curve to working with their flavor of HTML markup, and a slightly tougher grade to learn their SCSS workflow (and setting up the environment is a little... obtuse) - the real culprit is that the Dada Mail project really pretty large.

Dada Mail has over 300 separate template files that make up all its views, and the project itself was started in 1999.  Let's say you need to make a complicated layout of form fields and such. What do you use?

Well, in 1999 you use tables. And if it ain't broke, why fix it? So tables it was for a lot of the forms that the UI used for all those preference screens. That's fine and good, until you want your app to work well on a mobile phone's browser. Now, everything is legitimately broken, because a lot of the design has fixed widths and isn't very responsive.

To fix a lot of the UI problems meant replacing the table-based layout with Foundation's Grid System.  A lot of my forms had secondary and even tertiary form elements, that needed to be shown underneith other form elements, so that the user knows they're somehow related. After a bit if wrangling, Foundation made this realistic to do.

Here's an example of a somewhat complicated part of form for changing the template of your mailing lists message,




It's pretty phenomenal that this can now be done, with a having to revert to using a table-based layout. The diff file for this release was over 100,000 lines long, which goes to show you just how much HTML I've been working with for the last few months. I have long since separated the HTML out of Dada Mail, so almost nothing had to be modified in the Perl side of things at all, to get things runnin'. For templates, I've been using HTML::Template (and friends) since forever, and probably will keep on chugging - with the most obvious successor being Template-Toolkit, if the need ever arises. I'm not sure if that makes sense for me now, but we'll see what the future holds.