Tag MVC

MojaMoja

Yet another Perl MVC micro-framework with a name that will be confused with my wiki software. From the Author’s description:

(PoC)yet another sinatra-ish framework built on CPAN module.

Rather than ‘shaggadelic’ or ‘dance’, this one starts the app with ‘zigorou’. I can’t see it catching on.

Slides from my Mojolicious presentation

I recently held a introduction to the Mojolicious web framework for Oslo.pm. Here are the slides:

Introducing … Me

Hey there, the internet is a turbulent place, and since I’ve moved around quite
a few times, I think I forgot to introduce myself the last time I made the
move. I am Marcus Ramberg, the writer of this blog, and director of
Nordaaker, a small British/Norwegian company currently run out of Oslo,
Norway. In addition to being my personal blog, at the time being this blog
acts as Nordaaker’s dynamic english presence. As the other director of
Nordaaker, Arne Fismen runs our norwegian presence.

In one form or another, I’ve been writing on the internet since around
2002, when I set up my first own domain, thefeed.no.
Back then I was running my own Movabletype installation.
Thanks to the glorious Internet Archive you can see my
first blog the way it looked about a year after it’s launch. It is
very strange for me to go back and read the thoughts I had so many years
ago.

I was also hosting other blogs on my movabletype installation, including
slemmen, who wrote about sysadmin stuff and some college friends like
marlboro and gry.

On the front page we had a perl script that aggregated all the blogs,
a simple planet if you will.

Back then, I wrote a lot less about tech than I do now. Looking at the
categories, we see that the three biggest ones are Travel[44], Geek[36]
and Opinion[26]. Still, even then I was journaling things from the
Perl Community. However, checking back around 2005, a few years
later, Geek[108] was dominant, With Opinion[49] and Mac[34] as the next
ones. Perl is trailing 4. with 27 posts. I also wrote 18 book reviews

About that time I gave my first talk about a MVC framework.I was
already active in the community, contributing a Mason view to Maypole,
my third CPAN module. I had been using Mason at work for a couple of years
by then. It was not until I started working for ABC Startsiden that I started
using Template Toolkit.

About then, disaster struck. My server HDD died, losing a lot of images
from our image galleries. After that, I lost a lot of the motivation for
running thefeed, given the risks. Losing people’s personal data isn’t fun.
At least I am glad that the blogs are preserved in the internet archive.

It took a while for me to start writing again after that, but in the period 2006-2009
I decided to use hosted solutions, keeping both a vox blog and a
livejournal, before finally moving to this blog installation.
I’m self-hosted again, and the software might vary, but I hope the addresses
will last for a long time :)

Model adaptors for Catalyst.

In a recent post Dave Rolsky points out some of his own best practices for Catalyst. While I’ve come around to agree with his first point, that Catalyst should generate a reusable config class for the user, I’m not so sure with regards to his model viewpoints.

For me, the strength of Catalyst’s Model layer has always been the immense glue layer that allows me to configure any model in a predictable way. Much like DBI gives me a unified way to talk to databases, the Catalyst model-layer gives us a unified way of configuring models. In addition, we are able to provide helpers to create these models from the command line, reducing the work needed to set up a new model.

I will grant Dave that the API for the model adapters could be better. It is my hope that we will accomplish as Catalyst takes advantage of more of the new stack that Moose provides. In particular I am excited about the work Devin Austin is doing for GSOC on improving the -Devel package. This is an area where we can significally improve without too much worry about backwards compability. For instance, the KiokuDB model already uses moose accessors for config.

Dave’s example only limits itself to talking to a SQL store via DBIx::Class. However, real world applications typically have several models. In some of my apps I talk to S3, or Queue servers, or LDAP stores for user management. This shows the true power of the Catalyst model layer.

I also hope that we can provide a different way to tie models to controllers. This should be part of the moosify branch of Catalyst-Runtime. I disagree that $schema->resultset(‘Person’) is a significant improvement on $c->model(‘DBIC::Person’). Controller code is not meant to run without a context anyways.

I hope that by looking at Moose Extensions, we will be able to find a more suitable API for this functionality. Of course, we have a lot of work ahead of us, but I am really starting to like what Catalyst has turned into.

Bootylicious – Single file Mojo based blog

As you might know, Sebastian recently added single-file support to his Mojolicious framework. Viacheslav Tikhanovskii has taken this functionality and run with it, producing bootylicious – a ~280 SLOC web log system. It sorts a directory of POD formatted blog posts, and even supports RSS. I think these single file apps is an excellent way to demonstrate your framework. I actually remember this as being a selling point for Maypole back in the days :)

Copyright © marcus ramberg
nordaaker

Built on Notes Blog Core
Powered by WordPress