Mojolicious + Bootstrap = Awesome

I have some news coming soon about Alien::Base but to avoid burnout, I’ve spent some time in the last few days playing with some things that are new to me. I enjoy doing this any time I’ve spent too much time on one project.

While I have spent some time using Mojolicious it has always been to hack together a quick UI for some code, rather than pulling out Tk. I never have really taken the time for pretty-fication, nor for any kind of interface logic.

I have a friend who thinks highly of my programming abilities and has recommended me to another of his friends to put together a website for a startup company. While I could put together a Joomla or Drupal site in no time, I thought I would investigate a Perl solution. I know that there are a few Perl CMSes out there (WebGUI 8 sounds interesting), but I wondered if I could hack something together myself.

Here’s the problem, I know Perl, thats about it. I don’t know much JavaScript, CSS or even HTML for that matter. Forget about DOM, and I’m no graphic designer.

However, surprisingly, Mojolicious, along with Twitter’s Bootstrap for building page elements, has made this really easy. I don’t know if I can sell it to a client yet. But maybe by the next client, or the one after that, I can offer a website as a Perl/Mojolicious/Bootstrap/PSGI app!

I love open source!


So, you’ll be demonstrating this at a Perl mongers meeting? :)

How are you building less files? Do you rely on the client side less.js or is CSS::LESSp able to compile it?

Great minds think alike. I already created a boilerplate for Mojolicious with Bootstrap 2.0:

Using this you get configurable menus based on user-type, in conf/config.yaml and also a system of sending notice/error/success messages straight into UI, as simple as

from controller

push @{ $self->session->{notice_messages} }, 'You look too good to be true';

Hope this helps

Also, at our first Cluj.PM meeting in 2nd of March, I held a presentation about Mojolicious with Bootstrap (my first public technical presentation). The slides are available here:

or here

I hope those will help you starting a great sales pitch.

And indeed - both Mojolicious and Bootstrap are awesome.

I completely agree, but don’t forget to check out — they may have already done a fair amount of what you want.

Here’s a snippet to a helper that will render Bootstrap style (flash) notices:

Leave a comment

About Joel Berger

user-pic As I delve into the deeper Perl magic I like to share what I can.