Pages: << 1 ... 4 5 6 7 8 9 10 11 12 13 14 15 >>
02/04/07
WebDD07 in review
I went to WebDD Conference 07 at the Microsoft Campus in Reading today. This post records my overall impressions, and is also my first attempt at an hReview, which is something I've been meaning to try out for a while. I'm going to do a review of each talk I went to in separate posts (or, I should say, I plan to...).
It was something of a shock to the system when my alarm went off at 7am on a Saturday morning, but I did drag myself out of bed and down to Paddington only a little after I'd hoped to get there. I arrived at Thames Valley Park in plenty of time and was surprised to find breakfast waiting in the form of rolls with either bacon or sausage - usually at Microsoft when I've been it's been coffee and biscuits in the morning, maybe this is a Saturday perk?
There was a choice of three talks in each slot, and five slots through the day, here's the list of talks I attended:
- Microformats HTML to API (Glen Jones)
- Doing it in style: creating beautiful sites, the web standards way (Patrick Lauke)
- Quick and dirty Usability tests - one week, no budget, and no usability facility (Zhivko Dimitrov)
- Ruby On Rails for .NET Developers (Dave Verwer)
- Unobtrusive Javascript with Rails (Dave Verwer)
I'll save the details of the talks for later posts, but enough to say they were of a consistently high quality and were more than enough reason, by themselves, to drag me out of bed on a Saturday morning ![]()
There were plenty of other highlights - the food continued with pastries and Innocent smoothies at mid-morning, passable packed lunches and warm cookies in the afternoon. There was a guy from Computer Manuals selling books all morning, not the full range but at good discount. Microsoft were pimping their Expression range of web design tools, which included giving each attendee a free copy of Expression Web, and there were samples and free stuff available from most of the other sponsors.
The only disappointing thing was that it all ground to a halt shortly after 4pm, I'd originally planned for it finishing at 5pm and I think I would have preferred the spare hour in bed in the morning rather than at Reading Station in the afternoon. Overall though, an excellent event, out of 5, I would recommend it to anyone with an interest in web design or development.
01/08/07
Categories: Web Develop, Server Side Web Development
Adding discoverable RSS feeds to phpBBPlus
Last week I added RSS feeds to a forum I help manage. It wasn't too difficult, or even that original, but I thought I'd document it here in case I have to do it again ![]()
First step is to get an RSS feed set up. I used the naklon.info mod - it's self contained but integrates well, enforcing HTTP authentication for accessing private forums. The key thing about this mod is it allows you to generate forum specific and topic specific feeds by adding the f=x and topic=x parameters to the URL.
OK, so to make your RSS feeds discoverable you need to add a link element in the <head> element of the page. Here's the one from this blog, which you can see by viewing the source code:
<link rel="alternate" type="text/xml" title="RSS 2.0" href="http://www.boogdesign.com/b2evo/index.php?tempskin=_rss2" />
PhpBBPlus already has a mechanism for adding link elements - it's to add buttons to the 'Mozilla navigation bar' - so I'm just going to subvert that mechanism. First up, the file which actually builds the links is includes/page_header.php - the standard link template doesn't include the type attribute we need. Rather than risking breaking the existing template, I just added a new one. After:
$nav_link_proto = '<link rel="%s" href="%s" title="%s" />' . "\n";
I added:
$rss_link_proto = '<link rel="%s" type="application/rss+xml" href="http://www.lanarchy.co.uk/%s" title="%s" />' . "\n";
Then further down I modified the code to check the link type:
if ($nav_item == 'alternate') {
$nav_links_html .= sprintf($rss_link_proto, $nav_item, append_sid($nav_array['url']), $nav_array['title']);
} else {
$nav_links_html .= sprintf($nav_link_proto, $nav_item, append_sid($nav_array['url']), $nav_array['title']);
}
Next I modified the viewforum.php and viewtopic.php files to add in the links. In viewforum.php, I found the 'Mozilla navigation bar' section and appended the following:
$view_forum_rss = append_sid("rss.$phpEx?" . POST_FORUM_URL . "=$forum_id");
$nav_links['alternate'] = array(
'url' => $view_forum_rss,
'title' => 'RSS 2.0'
);
Then in viewtopic.php, again in the 'Mozilla navigation bar' section (it's marked by a comment), I added the same bit of code. Note that this means both the forums and the topics will present a feed for the forum. I preferred it this way as some of the topics aren't going to have that many updates and I figured the forum feed would be more generally useful, but it would be semantically more correct to change the viewtopic.php URL to use the topic parameter.
01/03/07
Categories: Web Develop, Server Side Web Development
Fixing blo.gs ping in b2evo
I noticed that the b2evolution ping feature has been failing for blo.gs for some time, looks like some other folk have encountered the same problem. I looked up the blo.gs ping documentation and discovered they've recently unified the ping service with the one at Yahoo! (who bought them out a while back), which means the RPC address has changed.
It seems easy enough to fix, open up the file inc/_misc/_ping.funcs.php and look for this line:
$client = new xmlrpc_client('/', 'ping.blo.gs', 80);
Change it to:
$client = new xmlrpc_client("/RPC2", "ping.feeds.yahoo.com", 80);
And it should start working again. (At least I hope so, I'm just about to try it...)
Categories: Web Develop, Server Side Web Development
More little buttons of sharing
In an earlier post, I described how I added 'share on reddit' and 'share on delicious' buttons to my b2evo skin. Today I spent some time cleaning up and adding new buttons for Digg and Ma.gnolia.
I noticed on Arto Bendiken's blog his 'sharing buttons' also added a title after you click on them. It didn't seem like it would be too difficult to extend my previous code, and it wasn't
Here's what I've finished up with in _main.php:
<h3 class="bTitle">
<?php $Item->title(); ?>
<a href="http://reddit.com/submit?url=<?php echo $Item->get_permanent_url(); ?>&title=<?php echo $Item->title; ?>"><img src="/images/reddit.png" alt="Share on reddit" class="middle" /></a>
<a href="http://digg.com/submit?phase=2&url=<?php echo $Item->get_permanent_url(); ?>&title=<?php echo $Item->title; ?>"><img src="/images/digg.png" alt="Share on digg" class="middle" /></a>
<a href="http://del.icio.us/post?url=<?php echo $Item->get_permanent_url(); ?>&title=<?php echo $Item->title; ?>"><img src="/images/delicious.png" alt="Share on del.icio.us" class="middle" /></a>
<a href="http://ma.gnolia.com/bookmarklet/add?url=<?php echo $Item->get_permanent_url(); ?>&title=<?php echo $Item->title; ?>"><img src="/images/magnolia.png" alt="Share on ma.gnolia.com" class="middle" /></a>
</h3>
12/29/06
Scrobbling with Audacious on Fedora Core 5
I've gotten quite into last.fm in recent weeks. It's a very well put together site, and can provide excellent background music once it's built up some opinion of your tastes.
I'd mostly been using it from my laptop and in my bedroom, both places where I currently have SuSE installed and run KDE, so I use Amarok which has a built in config screen for last.fm and will automatically notify last.fm every time you listen to a song (a process known as 'scrobbling').
Last week I booted up my 'main' PC which currently has FC5 running Gnome and on which I tend to use Audacious. I checked the config screens and discovered that it too had a place for putting in my last.fm details. Unfortunately, on the version which ships with FC5 (1.1) the last.fm plugin doesn't work, none of the tracks I listened to appeared on my last.fm profile
A little googling indicated this was a known issue with the 1.1 version of Audacious, though it is fixed in version 1.2. Couldn't find any Audacious 1.2 RPMs for FC5, but I did find that FC6 ships with version 1.2. So I downloaded the SRPMs and, after some fannying around installing a raft of '-dev' libraries with Yum, I was able to successfully rpmbuild --rebuild audacious-1.2.2-1.fc6.src.rpm and then (after installing the RPMs output from that) rpmbuild --rebuild audacious-plugins-1.2.5-2.fc6.src.rpm (the plugins require the audacious dev package to already be installed before they'll build - I just installed the first lot with a --nodeps in the command). Now I can scrobble from Audacious in FC5 too ![]()
12/04/06
MySQL 4: Specified key was too long; max key length is 1000 bytes
I've been upgrading the intranet server at work today, previously it was running Red Hat 9.0 which even the Fedora Legacy Project will be dropping support for at the end of the year. So on Friday I installed Centos 4.4 on a nice new hard drive and I spent today copying across all the files from the old drive.
Mostly everything went without issues, but one of the things we have running on our intranet server is a WackoWiki for developer documentation. I'd done a backup of the pre-upgrade database with phpMyAdmin, which had been running on MySQL 3.23.
In my previous MySQL upgrade experiences I'd encountered some issues with character encoding - basically that the old database didn't have any, and newer versions of MySQL do. Up until now I've always just updated the relevant table definitions by hand, adding in unicode to the SQL and not really thought much about the wider implications. I was delighted to discover that phpMyAdmin 2.9.1.1 has an option on the import page for 'SQL compatibility mode', from which you can select 'MYSQL323', with the result that your old export files will now import without modification. Unfortunately, that's where I ran across the problem in the post title:
Specified key was too long; max key length is 1000 bytes
Some of the indexes in the WackoWiki database schema use a combination of three 250 character varchar columns. Because a unicode character can be up to three bytes long, MySQL tries to reserve the maximum space that could be required for the index - 3 x 250 x 3 bytes - which exceed the maximum allowed. There is an open defect about the issue on the MySQL website, with many comments from various disgruntled users.
I considered changing the keys so they'd fit, but it looked like a dangerous thing to do as far as the operation of WackoWiki was concerned, and I was worried I'd end up knee deep in PHP trying to fix all the problems. One of the comments on the bug report did guide me to the solution - Scott Lane posted that he set the index columns' collation to be latin1 so that it would work as it did on MySQL 3.23. Since the Wiki had been operating quite happily for more than three years on a database with no unicode support I figured I probably didn't have anything to lose by setting the whole database to use latin1_general_ci collation. I recreated the database and tried the import again and everything imported without errors ![]()
Which brings me to a D'Oh! moment. After some fannying around because the privileges got a bit mixed up with me dropping and recreating databases, I finally got to view our Wiki home page, and it looked very odd. None of the links were links - they all looked something like '??MyPages ==??'. I (correctly) surmised that I'd messed up somewhere with character encoding. At least it didn't take me too long to figure out my own stupid mistake: On the import page in phpMyAdmin, just below the file selection field, there's a 'Character set of the file:' select box which I'd been ignoring. By default this is set to UTF8, except, of course, the SQL file I'd exported from my non-unicode aware MySQL 3.23 database wasn't UTF8. This doesn't matter much for the common characters, because UTF8 and ASCII are compatible for the first 127 character points, but apparently it does matter very much for some of the characters used in WackoWiki markup. I re-imported with my import character set as latin1 and everything worked fine.
12/02/06
DevelopMentor Connected Systems Roadshow - Day Two
So, on to day two of the Connected Systems Roadshow, when I did the 'Building Next-Generation Secure & Robust ASP.Net Applications'. This was mostly presented by Dominick Baier, with a section on WWF by Mike Taulty.
Dominick was a very knowledgeable speaker, his talk was based on his book, Developing More-Secure ASP.NET 2.0 Applications, but rather than simply repeat material out of his book he focussed on how the architecture of the upcoming version 7.0 release of IIS could make a lot of security techniques easier to implement. Whereas IIS 6.0 is a monolithic architecture with some pre-defined hooks where you can hook in your custom application code, IIS 7.0 is built from individual components and you're free to turn these components on and off as you desire, add extra ones, or even replace them with your own. This means you can add your code anywhere in the page execution pipeline, rather than as just ISAPI applications. This has a number of advantages for the security minded ASP.Net developer,the main one is that the security measures you build into your application can now apply to files other than your .aspx pages (such as static pages, images and so on). Far more of the server and application configuration is now available in the web.config (basically all of it, I think) and, as an ancillary benefit, the entire web server configuration is now in a text file which you can edit by hand.
There was also a lot of more general application security advice, all of which does appear to be in Dominick's book, and a load of example code. Unlike yesterday most of the examples worked without hitches and there were no projector issues to break the rhythm. Dominick's part of the day finished up with a demonstration of CardSpace, Microsoft's solution to the web identity problem. It is an interesting looking technology, but I don't think it's quite there yet - I'm not sure it'll really reduce the number of passwords you have to remember, as you still have to enter a password to get a managed card, I'm also waiting for the first virus which replaces the entire CardSpace application and steals all your cards.
The final part of the day was a presentation by Microsoft's Mike Taulty on WWF. This is the first time I've actually seen it in any detail, previously I've been happy with general overviews and hand waving. Of all the stuff I've seen across the two days this is probably the thing I'm most likely to be using in the next six months. Mike was an excellent speaker, I don't know if they have any special training for this sort of thing at Microsoft, but there was a conspicuous absence of 'erms' and 'errs' and empty pauses which usually mark developers giving presentations.
To top it all off nicely for me, I won a copy of Dominick's book in the prize draw at the end
Overall then, an excellent two days. If this is indicative of the general quality of DevelopMentor's training courses then they're worth investigating, certainly if this 'roadshow' appears anywhere near you then I recommend checking it out.
11/30/06
DevelopMentor Connected Systems Roadshow
I've spent the last two days at the Microsoft Campus, in Thames Valley Park, Reading, at the DevelopMentor Connected Systems Roadshow. There were two tracks - 'Connected Systems' and 'Building Next-Generation Secure & Robust ASP.Net Applications', both a day each so you could do one and then the other across the two days, which is what I did.
The 'Connected Systems' track was introduced by David Gristwood of Microsoft who gave us some background information on Microsoft's offerings in the area before handing over to Richard Blewett and Niels Berglund who covered the 'technical part' which lasted the rest of the day.
I was mainly interested in this track to learn about BizTalk, which I really had very little clue about how it worked but had always planned to learn at some point. The £30000 price tag may keep me from getting to do much real world work on it, mind you - so the final session of the day from Richard was probably all I'll ever need to know on that subject. I'd never even heard of SQL Service Broker, which Niels covered in the middle session of the day, it looks like it could actually be a very useful tool - a lot of things which I've previously done with DTS, or would have relied on outside tools for, could be done better and more reliably using the Service Broker.
Probably the most interesting part of track one was before lunch, when Richard presented WCF. In theory this stuff could be extremely useful - it allows you to abstract out of your service all the communication 'plumbing', so then if you want to switch your application from using SOAP Web Services to .Net Remoting or even MSMQ then it is a simple matter of changing a configuration setting and everything 'just works'. Unfortunately it's not quite that simple, because the different channels have different characteristics the abstractions are somewhat leaky, meaning your classes need to have different annotations to be compatible. I imagine, if you truly needed an application which could be switched between different protocols in production, rather than be easy to redevelop quickly, I imagine you could cobble something together with some sort of factory set up.
Overall the presenters were very enthusiastic, all the source code was presented in a nice, big font which made it easy to read from a distance (a problem when I attended Dave Crane's presentation the other week. The momentum was spoiled somewhat by a number of technical issues with the projector (mind you, it was neat to see Niels' Mac laptop doing it's OpenGL window transitions between his desktop and his Windows VM), and the 'on the fly' development of the example, while engaging, also led to a few empty pauses for debugging. Very worthwhile though, I'm glad I went.
So that was day one, join me tomorrow for a summary of day two - ASP.Net security with Dominick Baier.
11/22/06
In-the-Brain of Dave Crane: Design Patterns for AJAX!
Tonight I've been to a free talk at Skillsmatter by Dave Crane, all round Javascript guru and co-author of my favorite Ajax books: Ajax in Action.
I missed the start of it, thanks to the usual high standard of service on the underground, but I was there for most of it. The talk was an extension of some the topics covered in his book, I made some notes, which probably don't reflect the full value of the talk, just what I got out of it:
1. Don't fight the browser: Work with the DOM, work with the layout engine, work with the browser. The DOM (and HTML) are structured hierarchically and recursive, matching your code and processing to this model generally leads to more efficient code. In simple cases, the DOM can be the data structure. Also, the browser has a very complex engine designed for laying out content, let it do the work, don't try and position all your elements in code.
2. Models which work on the server can also work on the client: MVC is a common pattern in traditional web development, but that pattern can also be applied to Ajax applications. Replicating some of your server side model in the browser (in a simplified fashion) can lead to a simpler and more efficient application, especially when a single item of data is reflected in multiple visual components.
2.a Repetition leads to simplification: As an extension of the above, Dave discussed the method of invoking Ajax requests on the server. Often requests will be made using GET or POST, passing variables in simple fashion and data will be sent back in XML or JSON. The disadvantage here is that the server has to know about de-constructing HTTP request variables into objects, and then constructing XML or JSON out of the objects, and vice versa on the client. Why not use a simple library on each side which translates client-side business objects in the browser to JSON and sends them to the server which translates the JSON into server-side business objects. Sending data back uses the same library on the server side to translate objects back into JSON, and then the browser uses its library to convert the JSON into objects. The whole symmetry of it appealed to me
You can pass the JSON around in an HTTP header - X-JSON. Prototype has built in support for this, and it is therefore leveraged by other libraries - here's some discussion of it in Scriptaculous and symfony.
3.Don't estimate, measure: There's a lot of discussion around the internet about the relative merits of 'Ajaxifying' your web application in terms of performance and server load. Dave pointed out that most of this talk tends to be unsubstantiated, and the best way to figure out the performance implications for your application is to build some prototypes and measure their performance. He then showed us some graphs he'd made by analysing the network traffic for three versions of a particular web app - 'standard' HTML pages, Ajax sending HTML to the browser and Ajax with XML data transfer. His measurement tools were liveHTTPHeaders and a custom rolled Python script, and a proxy server setup for IE which I didn't catch the name of.
In the questions there was some discussion of javascript frameworks, Dave said he'd heard 'good things' from 'some people' about jQuery and mootools. You heard it here first ![]()
11/18/06
Little buttons of sharing
I've long been jealous of all the little buttons everyone else seems to have on their blogs (have a look at the section 'like this article, share it' on mike-o-matic), to let their readers add the posts to digg or reddit or whatever other social link sharing network they might be a fan of. They didn't look that difficult to achieve, so I figured it was really just a case of sitting down and sorting it out. Just get it done. Anytime would be good really.
Well, a few months later, I surprised myself by actually doing it!
I started off by trying to add one of the reddit buttons. I didn't really like the look of it, though - it takes up a fixed amount of space whether the article's on reddit or not, and it embeds an iframe which spoiled my cunning semi-transparent background effect, as well as making the whole page scroll even more slowly in Firefox (in general, it seems, fixed positioning and iframes don't mix well - rendering the blog home page maxes out both cores on my PC, someday soon I'll get around to another re-design...). So I fell back on bog standard images inside links - it's not like I'm really expecting to have any need to track the high scores of each of my blog posts anyway.
There was only one tricky bit, working out how to generate the URL from b2evo. I could have just read the documentation, but that wouldn't have been any fun, so instead I dug around in the source code until I found the get_permanent_url method of the Item class. The final code I added for my two buttons was:
<a href="http://reddit.com/submit?url=<?php echo $Item->get_permanent_url(); ?>"><img src="/images/reddit.png" alt="Share on reddit"/></a>
<a href="http://del.icio.us/post?url=<?php echo $Item->get_permanent_url(); ?>"><img src="/images/delicious.png" alt="Share on del.icio.us"/></a>
Of course, then I thought "I'll just check and see if the page still validates as XHTML Strict" and discovered a whole host of issues which have been stopping the page validating for a good while.
Mostly with the Clustrmap, but also a strange issue b2evo seems to have with sticking <br>s in the middle of lists. The fix seems to be to take all the newlines out from between the <li> tags - that may take me some time...
11/17/06
Startups suffer funding slump
I got my copy of Computing today (one day late) and the main story on the cover was Startups suffer funding slump by James Brown:
According to figures from the British Venture Capital Association, investment in early-stage technology companies fell from £86m in 2004 to £84m last year.
I was thinking - no big deal, a 3% variation could be due to all kinds of unrelated stuff. Then I hit upon the following paragraph:
Innovation experts say startup firms need stronger business skills to encourage investors to regard them as less high-risk, and prevent funding for new technology firms shrinking further.
First of all - what are 'innovation experts'? I suspect they're not actually experts in producing innovation, they at least sound more like experts in business. The article goes on to discuss how early stage investment is vital for the whole UK economy, and the general tone of berating innovators for not having business skills, indirectly implying they will therefore be the downfall of the entire UK economy, continues to the end. Sorry, but this is just a crazy line of reasoning - it is naive to expect that our greatest innovators are also going to be excellent businessmen, in my experience the exact opposite is the case. But apparently venture capitalists, who presumably have a huge pile of cash because of their excellent business skills, are expecting the innovators to do all the work. Surely it's obvious that the way to build a culture of thriving innovators is not to punish them for lacking skills which are actually irrelevant to innovation itself?
There is a link at the end to another article, an interview with real, live VCs, who do seem to have their heads screwed on a bit better than Mr Brown:
European VCs are now putting in a lot more effort and have built up a greater pool of resources to help create businesses. We’re not just taking carefully placed bets in early stage businesses and watching which way they go, we’re actually helping them. I think that’s a very important part of the VC’s value-add.

Hello! HTML5 and CSS3 available now
Early access to HTML5 in Action available now

