Darren Ferguson - Umbraco, Dev, PhoRSS

Tuesday, June 24, 2008

Auto Twitter update package for Umbraco

Filed under: Umbraco - by Darren Ferguson @ 8:18 PM

I have created an Umbraco package that updates your Twitter status when you publish certain types of document. You can download it here. I never thought I’d get into twitter but a number of friends and techies use it to micro blog what they are interested in or indeed what they are blogging.

The package is an Umbraco action handler. After install the configuration can be found in /umbraco/plugins/FergusonMoriyama/AutoTweet/twitter.config and is as follows:

<?xml version="1.0"?>
<config>
	<authentication>
		<username>you@gmail.com</username>
		<password>secret</password>
	</authentication>
	<doctypes>
		<doctype>
			<alias>umbracoBlogPost</alias>
			<titlePropertyAlias>Title</titlePropertyAlias>
			<message>has blogged '{title}'</message>
		</doctype>
	</doctypes>
</config>

I hope this is pretty self explanatory. You can add as many document types as you wish. The message element is the content of the tweet plus the link to the document appended, the token {title} is replaced with the title which is extracted from the document.

Now for the test. When I hit publish on this blog post my twitter status should be updated. Obviously it’ll be quite embarrassing if it doesn’t work.

This is a very beta/hacked together package based on an idea I had this morning. As ever comments, thoughts and suggestions are welcome.

Thursday, June 19, 2008

Broken link check package for Umbraco

Filed under: Umbraco - by Darren Ferguson @ 9:16 AM

I've created a package to check for broken links in Umbraco pages. You can download it here.

While reading through some of the notes on open space sessions conducted as part of codegarden day 2 I saw this requested as a 'most wanted' package. I remembered that I had the code to do this from a couple of years ago, so I cleaned it up a little and decided to release it.

The package is implemented as an Umbraco action handler. When you publish a node, it's content is scanned for broken links. If any are found then a report is emailed to the document publisher. You need to have Umbraco configured so it is able to send email.

The package will handle external links as well as internal absolute and relative links.

As ever, thoughts, suggestions, comments and feature requests are all welcome.

Saturday, June 14, 2008

Feed Cache package for Umbraco

Filed under: Umbraco - by Darren Ferguson @ 7:08 PM

I've created an umbraco package that will cache XML feeds - or any other http URL - to disk on your web server. Click here to download the package

The idea came about as a lot of people are displaying feeds on their web pages - flickr feeds, twitter etc. In Umbraco you can cache marcos that read external URLs, but ultimately when the cache expires one user will have to take the hit of requesting this external URL as part of their page download. If the third party server is down - which twitter frequently is - then this can result in a hefty wait until the request times out.

Instructions for using the package are in the readme prior to installation so be sure to read this before proceeding with the install.

Questions, comments, feature requests etc are all welcome.

Sunday, June 08, 2008

RSS feed aggregation using Yahoo pipes

Filed under: Umbraco, Work - by Darren Ferguson @ 10:25 PM

I’ve been digesting some of the information on day two of codegarden and in particular this post that contains a list of ‘most wanted’ packages.

I’m unsure who requested RSS feed aggregation but before anyone were to dive in and start coding it may be worth having a look at Yahoo pipes.

As yahoo say:

Pipes is a powerful composition tool to aggregate, manipulate, and mashup content from around the web.

I’ve been using pipes for some time to consolidate all of the Umbraco related feeds into a single feed. Here is a shot of the GUI when editing my pipe.

Once you have a pipe created it can be used to syndicate the output in a number of formats.

It should be a relatively simple task to read an cache your pipe RSS output to your Umbraco web server, possibly using some kind of Macro, but I’d recommend using a scheduled task and simply writing the feed to the file system as pipes with multiple feeds may impair your page load time – if for example one of the feed sources is unavailable for any reason.

If anyone would like some help with this package, please let me know.

Thursday, June 05, 2008

Perl for Umbraco

Filed under: Umbraco, Work, Perl - by Darren Ferguson @ 7:11 PM

Disclaimer: I see this as a nice little hack, and something that I’ll use for development and fast prototyping. I’m not recommending it for production use and I know and appreciate that the guys behind Umbraco would probably discourage this in terms of 'best practices'. There is nothing here you couldn't do with C#.

Anyway, having said that, I think Perl is a great and very current technology. I use it day in day out as part of my work with Interwoven TeamSite and it still powers some of the biggest sites on the web including the BBC and parts of Amazon. Web frameworks like Catalyst are excellent and I’m quite prepared to argue my corner with anyone who thinks that Perl is old ‘skool’ and dated.

For those of you who aren’t interested in the technical details here are the links to the samples:

Hello World
Get Login
Format Date
Passing a parameter
Missing script
Dump Request
Script not specified
Current page as JSON
Manipulating text with regular expressions
Replacing words within a string

My favourite sample here is date formatting, Tim recently wrote a post on date formatting using XSLT and I love the simplicity of my sample when it comes to tasks like this.

So, a brief overview of what is going on here.

ActivePerl comes bundled with a product called PerlEx. PerlEx can be configured in IIS as an ISAPI filter which Pre-compiles Perl and significantly reduces the execution time and the overhead of starting a new interpreter with each HTTP request which is what traditionally happened with CGI scripts. The ActivePerl installer takes care of all of this setup for you. Although I’ve said I wouldn’t recommend this for production use, it is very quick. It is quite likely your shared host already has it set up.

I’ve created an HTTP filter using C# that parses Umbraco pages and uses regular expressions to find PERL_MACRO tags – see the examples. The Marco named in the tag is modified to have a .plex extension and a request is made to http://yourhost.com/plex/macro.plex.

Any other Macro params are forwarded as request parameters meaning you can pass values from Umbraco to Perl.

To set up I simply add /plex to my Umbraco reserved paths in web.config and add an HTTP filter.

If you’d like to play with this yourself drop me an email. I'd love your feedback, positive or negative. I'd hoped to show this at codegarden but it wasn't ready.

Thursday, June 05, 2008

Thoughts on codegarden 2008

Filed under: Umbraco, Umbraco Backup - by Darren Ferguson @ 1:50 PM

Well, once again due to circumstances beyond my reasonable control, I didn’t get to make the most of codegarden and headed home a day early – with a rather epic hangover I might add -cheers Kasper :)

But what of day one? Well for me the ‘key’ point of the ‘key’ note presentation was the desire to maintain the friendly and helpful community that Umbraco is renowned for in the face of amazing levels of growth. To me, it was great to meet the core team and see that they are leading by example. To a man they were all extremely friendly, knowledgeable and extremely modest considering some of the major achievements in the development of Umbraco in the past year.

Also in the keynote, I was pleasantly surprised by the emphasis on commercial extensions for Umbraco. This is something that I tried a while back – with some degree of success – and I find it refreshing that the guys behind Umbraco were stood in front of us telling us that it is OK to make some money. The only way I will ever be able to rejoin and contribute to Umbraco as much as I did a couple of years back will be when it starts to help pay my bills.

While socialising with some of the attendees a couple of issues kept on coming up. First of all it seems that some people don’t think that Umbraco pro is sufficient as a support contract. I can sympathise with this, I’d love to bring Umbraco into some of the bigger organisations that I work with but I couldn’t at the moment. They would want a lot more in terms of commitment to support case response times and unfortunately they would like the Umbraco core team to bear some responsibility (probably financial responsibility) in the event of an outage. As an aside, It really didn’t help me when I suggested Umbraco to a client and he found someone with a pro subscription fishing in the forums for help after not having heard from core for a couple of days.

Another recurring theme was the speed of the Umbraco GUI, but as demonstrated in the keynote the number of client/server requests has been dramatically reduced, let’s hope for a 4.0 release candidate very soon.

It was great to talk to Kim who apparently will be joining to core team in some kind of project management capacity. It will be great when he begins to improve communication and present us all with a clearer roadmap for Umbraco.

On a personal note, a few people asked about Umbraco Backup. During codegarden Niels gave me permission to resurrect this under the name of Backup for Umbraco to stay in line with the trademark guidelines. So what next for Backup?

I will make it available again hopefully in the next week or so. I won’t be opening up the source as it is extremely complex in places. I know that I got the pricing model wrong last time, it was a mistake. I’m still working on pricing, but I have decided that there will be a free version for personal sites and non-profit sites and a commercial version. I’ll distribute the commercial versions with long trial license so people can determine if the software is right for them. I am unsure whether I will set a formal price or just request a “donation” in term for a commercial license. As soon as everything is finalised it will be posted here.

Lastly on backup, I spoke to Paul Sterling about the Umbraco store and to give away 30% of the proceeds is a little too high for me. I’ll distribute backup through my site as I already have that facility set up. I’ll also make a donation of 15% of any profit to the Umbraco core team.

So, it was great to meet so many of you. I wish I had had a chance to meet many more of you. Copenhagen was a blast. I’m sunburned and tired now, but full of renewed enthusiasm for the Umbraco project. I hope to see you all again next year wherever in the world - hint: I like Dubai.

Darren Ferguson - Umbraco, Dev, Pho is published with Umbraco 3.0.5