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? :)
I might be able to do that (I would be happy to, I’m not sure I’m qualified yet). Also my “Baby XS” talk has been accepted for YAPC::NA so I might want to test that one too. http://act.yapcna.org/2012/talk/78
How are you building less files? Do you rely on the client side less.js or is CSS::LESSp able to compile it?
That site’s download link will compile the
less
for you. In fact, if you go to the “Customize” tab, you can specify the values of the common parameters (colors, etc) and it will build you a compiled zipball with those preferences.Great minds think alike. I already created a boilerplate for Mojolicious with Bootstrap 2.0: https://github.com/tudorconstantin/Mojolicious-Boilerplate
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 controllerpush @{ $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: http://www.slideshare.net/tudorconstantin/mojolicious-11749040
or here
https://docs.google.com/presentation/d/1tXt46cV2YsFWJ64QVwuzw2XdagHZVF_RfGEk5z1xOfA/edit?pli=1#slide=id.p6
I hope those will help you starting a great sales pitch.
And indeed - both Mojolicious and Bootstrap are awesome.
Wow Tudor, that’s really cool! I like the message handling too. I will definitely give this stuff a good read sometime soon!
I completely agree, but don’t forget to check out http://memowe.github.com/contenticious/first_steps.html — 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:
https://gist.github.com/2298052