Kontent Day 1: Stubbed

brentdax on 2005-07-03T16:17:57

(This was written yesterday, but I wasn't able to post it until today.)

I've decided to use this old blog as a log of my activities on Kontent, my Summer of Code project. The goal of the project is to build a dynamic, versioning, highly-customizable CMS in Perl 6.

My family had a vacation planned for the Fourth of July--we're visiting family in Michigan. However, I'm not letting that stop me from working on my project, so I brought a laptop loaded with Ubuntu, Eclipse, Apache, MySQL and Pugs so I can work.

I got in about four hours of work today. (A lot of my time was lost fiddling with Linux's suspend-to-disk behavior; my laptop has a slightly exotic wide screen that requires special treatment whenever the system boots.) In that time, I managed to stub out the basics of Kontent. My "test.p6" looks like this:

#!/usr/bin/pugs

module WWW::Kontent;

use WWW::Kontent::Foundation; use WWW::Kontent::Store::Dummy; use WWW::Kontent::Renderer::Raw;

my $request=WWW::Kontent::Request.new; my $page=WWW::Kontent::Store::Dummy::Page.new; my $skel=WWW::Kontent::Renderer::Raw.new;

$page.driver($request); $page.adapter($skel, $request);

warn $skel.perl;

my $output=$skel.render($request);

say "Content-Type: $request.type()"; say; say $output;


If you're familiar with Kontent's five-part design, you may be asking, "where's the class?" Well, the two calls for it are there (driver and adapter). In the final version, the so-called "class" will actually be a role composed into the Page object, but Pugs doesn't support roles yet, so that isn't really possible.

At this point, everything is stubbed well enough that this produces a hello world. Huzzah.


Where to go for more details?

davebaker on 2005-07-03T21:34:58

Re "Kontent's five-part design" -- can you point me to more information? Thanks, and good luck with the project!