Into The Blue

Posted on 7th May 2011

I haven't been posting recently about the Perl projects I'm currently working on, so over the next few posts I hope to remedy that.

To begin with, one of the major projects I've been involved with for the past 8 years has been CPAN Testers, although you can find out more of my work there on the CPAN Testers Blog. This year I've been releasing the code that runs some of the websites, specifically those that are based on my other major project, Labyrinth. Spearheading these releases have been the CPAN Testers Wiki and CPAN Testers Blog, with further releases for the Reports, Preferences and Admin sites also planned. The releases have taken time to put together mostly because of the major dependency they all have, which is Labyrinth.

Labyrinth is the website management framework I started writing back in 2002. Since then it has grown and become a stable platform on which to build websites. With both the CPAN Testers Wiki and the CPAN Testers Blog, three key plugins for Labyrinth have also been released which hopefully others can make use of.

The Wiki plugin, was intended to be written for the YAPC::Europe 2006 Wiki, but with pressures of organising the conference and setting up the main conference site (which also used Labyrinth), I didn't get it finished in time. Once a CPAN Testers Wiki was mooted, I began finishing off the plugin and integrating into Labyrinth. The plugin has been very stable for the last few years, and as a consequence was the first non-core plugin to be released. It's a fairly basic Wiki plugin, not too many bells and whistles, although there are a couple of Perlish shortcuts, but for the most part you don't need them. The CPAN Testers Wiki codebase release was also the first complete working site for Labyrinth, which was quite a milestone for me.

Following that success, the next release was for the CPAN Testers Blog. Again the underlying plugin, the Blog Plugin, has been stable for a few years, so was fairly quick to package and release, however the secondary plugin, the Event Plugin, has been evolving for quite some time and took a little more time. As I use both these plugin for several other sites, it was a good opportunity to bring together any minor bug fixes and layout changes. Some of these have seen slight modifications to the core Labyrinth codebase and the core set of plugins. In addition it has prompted me to start working on the documentation. It is still a long way from being complete, but at least the current documentation might provide some guidance to other users.

One of my major goals for Labyrinth was for it to be a 'website in a box'. Essentially this means that I wanted anyone to take a pre-packaged Labyrinth base (similar to the Demo site), drop it on a hosting service and be able to run a simple installation script to instantiate the database and configuration. The installation would then also be able to load requested plugins, and amend the database and configuration files appropriately. I haven't got to that stage yet, but it is still a goal.

With this goal in mind, I have read with interest the recent postings regarding the fact that DotCloud are now able to run Perl apps. This is definitely great news, and is exactly the kind of setup I had wanted to make best use of for the 'website in a box' idea. However, with several other frameworks now racing to have the coolest instance, it isn't something I'm going to concentrate on right now for Labyrinth. Plus there is the fact that Labyrinth isn't a PSGI framework, which others have eagerly added to their favourite framework. Labyrinth came from a very different mindset than other now more well known frameworks, and tries to solve some slightly different problems. With just me currently working on Labyrinth, as opposed to the teams of developers working on other frameworks, Labyrinth is never going to be the first choice for many reasons. I shall watch with interest the successes (and lessons learned from any hiccups) of the other frameworks as it is something I would like to get working with Labyrinth. If anyone who has the time and knows PGSI/Plack well enough, and would like to add those capabilities to Labyrinth, please get in touch.

The next notable plugins I'll be working on are the Survey, Music and Gallery Plugins. The former has its own post coming shortly. The next notable CPAN Testers site released planned is the Reports site. With it being considerably more involved, it might take a little longer to package and document, but it will likely be the most complex site release for Labyrinth, which will give anyone interested in the framework a good idea of how it can be used to drive several sites all at once.

File Under: labyrinth / opensource / perl / web / website
NO COMMENTS


Loose Change

Posted on 1st April 2011

Many years ago I wrote a set of scripts and modules that together formed a way for me to access eBay internationally. I frequently bought records from the UK, US, Germany and Australia, so those were the plugins that I focused on, but the intention was to allow more to interface to other eBay sites. I even did a presentation at YAPC::Europe in 2004, called The Perl Auctioneer, which explained my progress.

As part of the currency calculations and conversion, I used the same site that eBay themselves were using, XE.com. As I became more involved in other projects, and my international eBay buying declined, my efforts to finish and release the Perl Auctioneer waned. However, I was still using the currency conversion module, so released it as a stand-alone package. In time this became Finance::Currency::Convert::XE.

Although I have occasionally updated the module, I no longer use it. However, others still do. XE.com themselves are very protective of their data, understandably, and are very resistent to screen scrapers. Even though their own terms of use allow for personal use, and do not explicitly say screen scrapers are prohibited, they do make accessing the data from the command line very difficult. They have very recently upgraded their website with further measures to prevent automated tools scraping their data.

As I no longer use the module, I feel I have two choices. Pass on the distribution to someone else, who does want to invest time and effort on the module, or to abandon the module and distribution and remove it from CPAN. As the module does not currently work with the latest XE.com site, unless someone does come forward I plan to remove the distribution from CPAN by the end of the month.

If you would like to take over the module, please email me (barbie@cpan.org) and let me know your PAUSE ID. I'll then put the wheels in motion to give you maintainer/author permissions.

File Under: modules / opensource / perl
NO COMMENTS


Addicted to Chaos

Posted on 31st March 2011

Sometime ago, a website I was working on needed the ability to view images on the current page from a thumbnail. Many websites now feature this functionality, but at the time only a few seemed to offer this, and the assumption was that the javascript required was rather complex. As such, I did a search of the viewer libraries available, either as Open Source or for free download, that I could use for a commercial website.

The initial search revealed a rather more limited result than I expected, and seemed to imply that the complexity had put people off from developing such a library. However, in retrospect it seems that a market leader has become so popular, stable and robust, that others have choosen to provide different or limited presentations based on similar designs.

Back last year I began writing a review of some of the viewers, but never got around to finishing it. Having some time recently, I decided to both complete the review and revisit the viewers to see what improvements have been made since I first investigated them.

Before I begin the individual reviews, I should note the requirements I was looking for in a viewer. Firstly, the viewer needed to be self contained, both with files and directory structure, so that the feature could be added or removed with minimal changes to other website files. The viewer needed to be run completely on the client side, no AJAX or slow loading of large images would be acceptable. However, the most significant requirement was that all code needed to work in IE6. Unfortunately this latter requirement was non-negotiable.

I was quite surprised by the results of the solutions I could find around the web, and although there are likely to be others now, the following is a brief review of each of the four immediate solutions I found, and my experiences with them.

Lightbox

Possibly the best know thumbnail viewer library available, and now a clear market leader. The original review was with v2.04, which had been the stable release from 2008. This month (March 2011) has seen a version 2.05 release with added IE9 support. Lightbox is licensed under the Creative Commons Attribution 2.5 License, and is free to use for commercial projects, although a donation would be very much appreciated.

While this viewer works in most browsers, and the features of images sets and loading effects looked great, it proved unworkable in many of the IE6 browsers I tried across multiple platforms. Despite searching in forums and in some howtos, there didn't seem to be an obvious fix to the problem. The viewer would either not load at all, load with a black layer over the whole web page, or begin to load and crash the browser. I know there are many problems and faults with IE6 and the javascript rendering engine, but these were supposedly stable releases.

As Lightbox makes use of the Prototype Framework and Scriptaculous Effects Library, which was already being used within the website the viewer was for, the library initially seemed to be the best fit. Failing IE6 so dramatically and consistently, disappointingly meant it couldn't be pursued further.

Slimbox

Slimbox is a Lightbox clone written for the JQuery Javascript Library. v2.04 is the last stable release, and the release that was originally reviewed. Slimbox is free software released under MIT License.

Slimbox is based on Lightbox 2, but utilises more of the JQuery framework and is thus slightly less bulky. While working well in the browsers I tried, it flickered several times in IE6 when loading the image. Anyone viewing the effect with eplipsy might well have felt ill. Even for someone not affected by eplisey this strobing effect was extremely off putting. I suspect this problem may well be an alternative side-effect to those seen with the original Lightbox, but again forums and howtos didn't provide a suitable fix in order to remedy this problem.

Dynamic Drive Thumbnail Viewer

This is the first thumbnail viewer that Dynamic Drive have available, as the second is an inline viewer rather than an overlay, which is what I was after, and is the version made available on July 7th, 2008. Scripts by Dynamic Drive are made available under their Terms of Use, and are free to use for commercial projects.

This a very basic viewer, relying on basic functionality rather than flashy effects. As such, it is simple in design and presentation. Rather than create a full browser window overlay, as both Lightbox and Slimbox do, the Dynamic Drive viewer simply contains the viewing image within a simple DIV layer tag. There is the possibility to add visual effects, but these can be easily turned off.

This seemed to work in most of the browser tried, except when clicking the image in IE6. The image appeared, but then immediately a javascript error popped up. After quickly reviewing the configuration and turning off the animation, the viewer opened and worked seamlessly across all the browsers tested.

Highslide JS

Highslide JS is a very feature rich library, which provides much more than an image viewer. Highslide JS is licensed under a Creative Commons Attribution-NonCommercial 2.5 License, which means you are free to use the library for non-commercial projects. For commercial projects two payment methods are available, $29 for a single website, and $179 for unlimted use.

The feature set for displaying images includes the style of animation to open images, the positioning of text, and the linking of image sets. In addition, it also provides many features for regular content, which can then be used for tooltip type pop-ups, using embedded HTML, IFrames and AJAX. Another standard feature is the ability to allow the user to move the pop-up around the screen, to wherever might be convienent.

However, there is a downside. While this works well in most browsers, even just loading the Highslide JS website in IE6 throws up several errors. With the library being so feature rich, it is a considerably larger codebase, although removing comments can remove this down to just over 8KB, and I suspect some of the older browsers may not be able to handle some of the complexity. Their compatibility table suggests that it works all the way back to IE 5.5, but in the tests performed for IE6, when the site did open without crashing the browser, the viewer itself felt rather clunky when an image was opened and several of the visibility settings just didn't work. You also frequently get an 'Unterminated string constant' error pop-up, which just feels disconcerting considering they are asking you to pay for commercial usage.

If IE6 wasn't a factor, this may have been a contender, as the cost is very reasonable for a commercial project that would utilise all its features.

Conclusion

These are just the four viewers that were prominent in searches for a "thumbnail viewer". They all seem to have the same, or at least a similar, style of presentation of images, which is likely due to the limited way images can be displayed as an overlay. However, the basic functionality of displaying an image seems to have been overshadowed by how many cool shiny features some can fit into their library, with configuration seeming to be an after thought.

With the ease of configuration to disable the IE6 error, the basic functionality and the freedom to use for commercial projects, the Dynamic Drive solution was utimately chosen for the project I was working on. If IE6 wasn't a consideration, I would have gone with Lightbox, as we already use Prototype and Scriptaculous. With IE6 usage dwindling on the website in question (Jun 2010: 38.8%, down to Mar 2011: 13.2%), it is quite possible that we may upgrade to a more feature and effect rich viewer in the future, and Lightbox does seem to be a prime candidate.

Consider this post a point of reference, rather than a definitie suggestion of what image viewer library to use. There may be other choices that suit your needs better than these, but these four are worth initial consideration at the very least.

Browsers & Operating Systems

For reference these were the browsers I tried, and the respective operating systems. And yes, I did test IE6 on Linux, where it occasionally stood up better than the version on Windows! Though this may be due to the lack of ActiveX support.

  • IE6 (WinXP, Windows7, Linux)
  • IE7 (Windows7)
  • IE8 (Windows7)
  • Firefox 3.6 (WinXP, Windows7, Linux)
  • Opera 9.8 (Linux)
  • Opera 10.52 (Linux)
  • Chrome 5 (Windows7, Darwin)
  • Chromium 6 (Linux)
  • Safari 4 (Darwin, iOS)

File Under: opensource / review / technology / usability / web / website
NO COMMENTS


All Around The World

Posted on 14th March 2011

Paul Weller once sang of "a new direction. We want a reaction. Inflate creation." All three could be attributed to why two major events in the Perl event calendar started in 1999, and now happen all around the world today. The two events, The German Perl Workshop and YAPC::NA, both were a new direction for Perl events and specifically a reaction to more commercial events. They both also brought a new creativity to the Perl community.

In 2011 we now have YAPCs, Workshops and Hackathons happening on a monthly basis somewhere in the world. They are still very much organised by members of the Perl Community, and bring together a diverse group of people to each event. They often inspire some to create Perl events themselves. However, that initial enthusiasm is often quickly followed by panic, when the organisers start to figure out what they need to do to make a great event. Which is where a book might help.

I am planning to publish such a book, entitled 'Perl Jam - How to organise a conference ... and live to tell the tale'. The book is a guide for organisers planning to host a large technical event, with the aim of helping organisers think of everything, and prepare themselves for anything they might not have thought of, or forgotten. Organising a conference, workshop or hackathon can be a daunting prospect, but with the help of this book, it might make the experience much more enjoyable, and may even inspire you to do it all again!

'Perl Jam' is being made available for its first public draft via a GitHub repository. This is the third draft, and my thanks go specifically to Jon 'JJ' Allen and David Golden, for their extensive help and feedback so far. Also thanks to chromatic for allowing me to use the framework and scripts he used for his great book Modern Perl.

I welcome any and all comments and suggestions, so if you've ever organised a large event, please take the time to read the draft and see if there is anything not covered that you would have suggested. For any current organisers, please download and share the book with your team and feel free to send me any additional notes you make as you go along. If you are thinking about organising a technical event in the future, are there any questions you would want to know, that haven't been explained in the book?

Everything is up for discussion, including the cover (which is not the finished version), and I'm very interested to hear from anyone who has suitable photos that can be included in the book, as examples or to emphasise sections.

The draft is released under a Creative Commons Attribution-Noncommercial-No Derivative Works 3.0 License. Please feel free to point people to the git repository, but please do not redistribute with any modifications. Forking with Git is fine, but I request that you send me patches (via perljam@missbarbell.co.uk) or pull requests.

The book also has its own website, Perl Jam, which will be the official source of any releases.

File Under: book / community / conference / opensource / perl / yapc
NO COMMENTS


Ultraviolet (Light My Way)

Posted on 28th February 2011

Last week I gave my first technical talk for several months. Despite being a bit rusty, everyone seemed to find the talk interesting. The talk itself was about code I'd written to test XHTML completeness of web pages and further pattern matching of page content. I've been using and developing the testing code over the last few years, having written the initial basic script, xhtml-valid, back in 2008. Over the last 18 months I have revisited the code and rewritten it into a traditional Perl testing structure. The talk looked at the current state of the code and asked for advice on where to take it next.

The code has developed into two packages, Test::XHTML and Test::XHTML::Valid, and as such the talk naturally fell into two parts, looking at each package in more depth. I had originally planned a demo, but unfortunately my laptop wouldn't talk to the projector, so had to rely on slides alone. This didn't seem to matter too much, as the slides conveyed enough of the API to give a decent flavour of what the packages were about.

The final questions I asked originally centred on where I was thinking of heading with the code base, but I also got asked a few questions regarding the technical aspects. My thanks to Colin Newell and Nick Morrott for giving me some ideas and pointers for further expansion of the code. As for my final questions, it was generally agreed that these should appear on CPAN in some form, and as two separate packages, but unfortunately nobody had a suitable name for either.

I plan to work further on the code, both to package them better and to include the suggestions from Colin and Nick, and then I'll see if anyone has some better suggestions for the names. In the meantime, the slides are now online [1] and the 2008 version 1.00 of the code base is also available [2]. I aim to have the current code base online soon, with a GitHub repo to provide ongoing developments for anyone who might be interested.

[1] http://birmingham.pm.org/talks/barbie/text-xhtml
[2] http://barbie.missbarbell.co.uk/page/code

File Under: opensource / perl / testing
NO COMMENTS


<< Page 4 Page 6 >>

Some Rights Reserved Unless otherwise expressly stated, all original material of whatever nature created by Barbie and included in the Memories Of A Roadie website and any related pages, including the website's archives, is licensed under a Creative Commons by Attribution Non-Commercial License. If you wish to use material for commercial puposes, please contact me for further assistance regarding commercial licensing.