Darren Ferguson - Umbraco, Dev, PhoRSS

Wednesday, July 30, 2008

Translate your website to Chinese

Filed under: Misc - by Darren Ferguson @ 7:40 PM

Exciting times at Ferguson Moriyama! In the week that China overtook the US to have the world’s largest online population we are now able to offer professional translation from English to Mandarin (or vice versa).

Obviously with our existing technical knowledge we can offer solid consultancy on the best way to go about performing translation using your existing infrastructure.

We’ll also be looking at localising the Umbraco UI for Mandarin.

Saturday, July 26, 2008

Backup for Umbraco is dead

Filed under: Umbraco, Umbraco Backup - by Darren Ferguson @ 2:11 PM

Backup for Umbraco is dead. I’m “officially” retiring it as a project despite the fact that it has pretty much been inactive for a couple of years. I’m just posting this as I toyed with reviving it after codegarden and I had a couple of enquiries.

With the event of Umbraco 4 and particularly the new data layer it becomes much more complicated to write a solution that will back up a complete installation. Also, to be completely realistic there wasn’t really the demand for the product to sustain development anyway. Courier and Concierge are also under development and there is some likely overlap in functionality, I don’t see the point in competing with the core team (I had the chance to be part of the courier dev team a while back – I should have stuck with it!).

I thought about releasing the Backup for Umbraco source into the wild but to be honest, it was never well commented and documented and it would be an unenviable task for anyone else to get to grips with it.

So to conclude, Backup for Umbraco was an interesting project which I learned a few lessons from. Firstly, I was wildly optimistic with the price I tried to charge. Second, Umbraco wasn’t ready for commercial packages at the time I tested the water (IMHO). Third, software has to be really really good in order for you to charge for it. Customers will settle for imperfections in freeware, but not when there is cold hard cash involved.

I may be back on the commercial package “scene” one day if I come up with the right idea. I’m watching the Umbraco store with anticipation to see who releases the first killer Umbraco app.

If anyone has any wonderful ideas about the Umbraco package that they would happily pay for, leave me a comment. We’ll go 50/50 ;)

Friday, July 11, 2008

Recent packages added to Codeplex

Filed under: Umbraco - by Darren Ferguson @ 11:02 AM

I've added three of my recent Umbraco packages to the Umbraco extensions project on Codeplex.

The packages are:

All of my packages are located in a FergusonMoriyama sub-folder from the root of the project.

Feel free to add any enhancements, and check them back in.

There is no real documentation, but the packages are reasonably simple and should be quite easy to understand.

Feel free to get in touch should you have any questions.

Monday, July 07, 2008

Unobtrusive AJAX blog comments for Umbraco

Filed under: Umbraco - by Darren Ferguson @ 12:44 PM

Recently I've been building a lot of sites that make use of AJAX using extJS and jQuery, but hadn't really worked with any AJAX in .net.

As an experimental project I decide to build unobtrusive AJAX blog comments for this blog - which are now live.

My goals were:

  • Include a spam filtering service - defensio
  • Unobtrusive - work without JavaScript enabled
  • Identical UI with/without JavaScript

I achieved about 90% of what I wanted.

In the end, the comments utilise an asp.net UpdatePanel. I looked at Page Methods and Umbraco base but in the end went with the UpdatePanel in order to use the standard asp.net validation controls and a ValidationSummary. In my mind the main disadvantage of UpdatePanel - aka partial page loads - is the amount of data exchanged between server and client, but in the end I figured that I probably don't have that many readers who are going to be put off by a 40k round trip.

The whole process was a lot more painful than anticipated. The ValidationSummary control forces a page to scroll to the top when it appears. Lots of blog searching was required to find a hack to get around that. There were several similar irritating issues.

I use jQuery to add the comment to the page on successful submission as the comment list is rendered using an Umbraco XSLT Macro.

There are a couple of glitches that I couldn't get around. Firstly when JavaScript is disabled a submit of the comments form leaves you at the top of the page, I couldn't find any way to anchor a postback to the comments form. Second, my Umbraco macro to display the comments seems to get run before the new comment is created in Umbraco so you have to refresh to view your new comment - again only when JavaScript is disabled.

I'd like to add some effects so that the comments and validation messages appear with some kind of fade effect but it does get tricky to try and override MS default behaviour.

The code is at best hacked right now. If you'd like a copy, drop me a mail. I'll look at making it nicer and 'packaging' it should the interest arise.

Finally I just need to give a few credits. Per for building the .net API for defensio, Warren for some CSS I stole from his blog :) and anyone else who participated in this thread.

Oh, and Peter D got this finished before me. His implementation is here, but I still think it is worth posting this as our approaches vary somewhat.

Thursday, July 03, 2008

Keeping up with the Umbraco community

Filed under: Umbraco - by Darren Ferguson @ 2:44 PM

Keeping up with the Umbraco community can be quite exhausting.

I maintain an Umbrao pipe at http://pipes.yahoo.com/darren/umbraco

From this URL you can get an RSS, JSON or a number of other formats.

I'd like the pipe to to be as complete as possible. If you run an Umbraco related blog and you aren't listed in the pipe sources on the left of the screen please let me know so I can add your site (by commenting on this post).

This is potentially a very useful resource and can save several hours of browsing from site to site. It also beats having tens of feeds in your reader as posts on the pipe average 3-4 per day.

I'd also encourage any Umbraco blog owners to provide a comments RSS if possible. I often participate in comment discussions and have to revisit the site to check for updates. It'd be great to have them all in my reader. I looked at cocomment to address this, but in my opinion it is over complex and doesn't seem to work very well.

The XSLT I use to produce my comments RSS is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet
 version="1.0"
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
 xmlns:msxml="urn:schemas-microsoft-com:xslt"
 xmlns:umbraco.library="urn:umbraco.library"
 xmlns:dc="http://purl.org/dc/elements/1.1/"
 xmlns:content="http://purl.org/rss/1.0/modules/content/"
 exclude-result-prefixes="msxml umbraco.library">


    <xsl:output method="xml" omit-xml-declaration="yes"/>

    <xsl:param name="currentPage"/>

    <xsl:variable name="howMany">
        20
    </xsl:variable>
    <xsl:variable name="posts" select="$currentPage/descendant-or-self::node [@nodeTypeAlias='umbracoBlogComment']"/>
    <xsl:variable name="total" select="count($posts)"/>
    <xsl:variable name="pubDate">
        <xsl:for-each select="$currentPage/descendant::node [@nodeTypeAlias='umbracoBlogComment']">
            <xsl:sort select="@createDate" data-type="text" order="descending"/>
            <xsl:if test="position() = 1">
                <xsl:value-of select="@createDate"/>
            </xsl:if>
        </xsl:for-each>
    </xsl:variable>

    <xsl:template match="/">
        <rss version="2.0">
            <channel>
                <title>
                    Darren Ferguson - Blog comments
                </title>
                <link>
                    http://www.darren-ferguson.com/?altTemplate=CommentRSS
                </link>
                <pubDate>
                    <xsl:value-of select="$pubDate"/>
                </pubDate>
                <generator>
                    umbraco 3.0.5
                </generator>
                <language>
                    en
                </language>

                <xsl:apply-templates select="$currentPage/descendant-or-self::node [@nodeTypeAlias='umbracoBlogComment']">
                    <xsl:sort select="@createDate" order="descending"/>
                </xsl:apply-templates>
            </channel>
        </rss>


    </xsl:template>

    <xsl:template match="node">

        <xsl:if test="position() <= $howMany">
            <item>
                <title>
                    <xsl:value-of select="@nodeName"/>
                </title>
                <link>
                    http://www.darren-ferguson.com/<xsl:value-of select="@id"/>.aspx
                </link>
                <pubDate>
                    <xsl:value-of select="@createDate"/>
                </pubDate>
                <dc:creator>
                    <xsl:value-of select="./data [@alias='name']"/>
                </dc:creator>
                <guid>
                    http://www.darren-ferguson.com/<xsl:value-of select="@id"/>.aspx
                </guid>
                <content:encoded>
                    <xsl:value-of select="concat('<![CDATA[ ', ./data [@alias='comment'],']]>')" disable-output-escaping="yes"/>
                </content:encoded>
            </item>
        </xsl:if>
    </xsl:template>

</xsl:stylesheet>

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