About this site

Posted on 9th November, 2010 | Tagged:

This site is a project in itself (view source)and is not another Wordpress blog. I started it in an Auberge de Jeunesse in Nimes, France, as my previous website was showing its age. I managed a first iteration with the current design in about 5 hours. The motivation was to provide a platform for my CV.

I used another website as the "inspiration" for the design (though I cannot find it now), using it as a reference and learning a few CSS tricks at the same time. It uses a fixed width layout which makes life alot easier.

The site is built using:

  • Symfony 1.4
  • Doctrine
  • sfDoctrineActAsTaggablePlugin
  • DOMDocument (for reading RSS feed)

The Sidebar

The side bar lists "items" because it lists both the blog posts and also entries from my travel website provided by RSS. The aggregator pulls these in and merges them with the latest blog posts. I was going to merge the travel site into this site, but it seemed like unnecessary coupling and I think would haev introduced a conflict in interests, so I decided to syndicate the site.

The sidebar uses Symfony's cache system to cache the generated HTML. The cache is invalidated after 1 hour. This saves the site from subsequent, possibly expensive, external calls to the RSS feed. However, it does not help the user who has to wait for the page when it does call the RSS feed. So a better way to do this would be to use cron to periodically update a database cache of the RSS feeds, but for the purpose of this website I didn't want the added complexity.

Media Management

Incidentally this also presented the problem of media management. The travel website has lots of photos and videos which are to be utilized by this site. For the time being I am just linking them directly from the blog, but it would be nicer, I thought, if both sites pulled the media from a virtual media server, perhaps with a little API for generating thumbnails etc. Something for the future.

Curriculum Vitae

It was hard for me to decide what format to build the CV in. 3 options came immediately to mind:

  • DocBook
  • LaTex
  • RESTructured Text

The reason the above are singled out is because they are all formats that can be transformed into both PDF and HTML formats. The problem though is the implementation of the PHP parser and then the problem of internationalization (I18N).

In the end I took the easy route and wrote the CV as an HTML template in Symfony and used Symfonys built-in I18N library. I can generate pretty good PDF versions using Firefox's print to file functionality.

Blog

The blog is written from scratch, save for the very nice sfDoctrineActAsTaggablePlugin which provided the tag cloud in addition to the core tag functionality.

PHP Markdown Extra is used as the format of the blog posts and it is a vast improvement from the HTML format of my old blog, which constantly caused me headaches when trying to include examples of XML into a blog post.

PHP Markdown and PHP Markdown Extra are, I think, new parsers for the original Markdown PHP parser. The "extra" version extends the original Markdown specification.

In any case they make writing blog posts much more fun :)

Another cool feature provide gratis by Doctrine is the Sluggable behavior, which automatically updates a slug for a given field. A slug is a URL friendly version of a field such as "title". The slugged version of the title "About this site" would be "about-this-site". You can see this slugged title in the URL for this page.

GIT

This is the second (and only ongoing) project for which I have used GIT as the version control system. Previously I have had lots of experience with Subversion but had heard alot about distributed version control so I thought I should give it a try.

GIT is well suited to my needs at the moment as I am not always connected to the internet, and GIT works by each node having the complete and entire git repository, which means that I can commit at any time. I can then push my changes to the git repository on my web server, or even to the git repository on my mobile phone, and if I want to be triple sure, I can push the changes to my MP3 player. Its pretty neat.

Comments

Be the first to leave a comment.

Post new comment


type "i hate spam" in UPPER CASE

Tags

10 Latest Items