Chris Casciano's Place Name Here

Blog

Articles for Tag: 2

2

2

Queen Mary 2

Queen Mary 2

comment at flickr

Web2.0 Sucked The Blogging Out Of Me

Molly recently lamented that twitter has sucked the blogging out of her. I’ve been feeling the same way for some time, though I was never as prolific a writer has she is. Though for me I think it was Web 2.0 that has sucked the blogging out of me, and unfortunately the slow down isn’t all that recent.

Bookmarks hidden in one service, interesting news stories in another, photos and other content in yet another. I tried to remedy that with the creation of a tumblelog-like Place Name Where but I never did get it integrated into this site beyond tag searches and so it never felt like part of any discussion that might take place here.

So where to next? The basic tumblelog format doesn’t appeal to me, nor does simply putting a bunch of widgets on page or daily “this is what I bookmarked today” posts along side of any blog content. That kind of leaves most existing solutions behind. I’m not quite sure what form this site will end up in when I’m done or what purpose it will serve. But I do want to start playing again and posting more doodles or pieces of what I’m playing with for others to see.

In the mean time I also have a backlog of posts I’ve been meaning to write or finish writing, some even describing subtle features of the current design [open the site in a browser, not a feed reader and resize the width!]. I may revisit those ideas as a way to get some activity here again and get myself back into the habit of posting on web dev stuff.

Twitter Needs: Stalking

Twitter is all the rage these days, and unlike most services I toy with I found myself sticking to this one, using it often enough to develop a sense for the landscape and fitting in in my own way. Coupled with Twitterrific I find its a comfortable mixture of always on yet unobtrusive so its not a chore to use like some other communities [or other outlets, say, blogging perhaps! hah]

And for the most part I think its a perfect and simple service. I don’t really think Twitter or Twitterrific need to get tricked out with added features or bells and whistles, and I typically find myself thinking I would be less inclined to use a service it changed to accommodate some of the things I’ve seen proposed.

But let me shove that sentiment aside to add my own feature request to the mix. As twittered:

placenamehere thinking that twitter needs a new privacy setting so you can watch bots/corporate feeds without granting them the right to watch you

I figured I’d break out of the 140 character limit, as well as my privacy settings, to expand on that desire some. My twits are currently set so that only those I’ve added or accepted as friends can see them if for little reason then I don’t think what I post is generally meaningful to the world at large — hell, its probably rarely meaningful to my ‘friends’ for that matter.

Anywho, regardless of why I’ve chosen the setting I have, the setting is available, and the system does a pretty good job of supporting the notion that some people like a more controlled posting environment then others. Though twitter is set up with a simple notion of either being a friend or not, there are plenty of levels of granularity of friends and family and coworkers that could be implemented, but this isn’t a request to depart from the simple [that isn’t my intent at least]. At the core I’m happy with the singular flag to represent relationships, but as twitter has grown a new character type has appeared inside the space — the announcement service or corporate account.

One can now watch users like Twitterrific, Magnolia and WHATWG for updates on their services, or keep an eye on ‘celebrities’ like John Edwards. While probably not the original intent of the system, it seems to be more common every day, and I’ve found that with trivial information its a better forum then the alternatives such as an unread item in my RSS feed reader.

You see where I’m going with this by now, I’m sure. My desire to watch these very public and often shared accounts directly clashes with my desire to keep my own twitters private. If these accounts were individuals what I’m looking to do might be considered stalking. And even though I’m fairly liberal about who I consider my ‘friend’ [my list is filled with folks who are separated by a degree or two and sometimes three] opening that door and letting corporations in crosses a new threshold that I’ve been quite hesitant to cross.

How this new feature might be implemented I don’t have a strong feeling about. About anything that accomplishes the task would be ok with me. Two ideas off the top of my head would be a new account type for those registering not as individuals but as a service or product with its own set of privacy features, or a new ability to ‘stalk’ any public user without being their friend [I can so now just by refreshing the web page]. Not sure what the best, least disruptive implementation would be, just wanted to articulate the issue that I think needs to be solved.

Feeling Social

Broke down and responded to my umpteenth invite for Twitter. You can find me at http://twitter.com/placenamehere

Also trying out one of many MySpace clones called Virb which offers the ability to customize CSS and some HTML markup inside the profile pages and is generally much nicer then other offerings. Its still in beta though and I’m out of invites, but if you happen to hang out there already you can catch me at, you guessed it, http://www.virb.com/placenamehere.

The Web's Greatest Advent Calendar Is Back

Interrupting the dearth of posts to bring you this important announcement… 24 Ways is back this year with a round of daily web development related articles. So far we’ve got a few great pieces, with a mix of immediately useful information and some things to look forward to.

And don’t overlook the comments, which can be as interesting as the pieces themselves.

Multimedia Sharing Site Treemo Launches

Does the world need another Web2.0 Community Video Sharing Massive Group Social Networking site? Treemo thinks so, and I might agree.

Treemo, It's Growing

Rating: ****
http://www.treemo.com/

Joining the likes of Flickr and YouTube and a fairly busy marketplace is the recently launched Treemo. Though its a busy space, Treemo /is/ trying to change the status quo in two noticeable ways.

The first is that they’re paying strong attention to the mobile device market on both the contribution and the consumption side. MobileCrunch covers this a bit more.

The other twist is that the company seems to be very interested in growing a socially conscious community and have set up affiliations with a number of different organizations in an effort to keep its users involved in some things besides just sharing video clips from last night’s adventure at the bar.

The site is still a bit rough around the edges (I’d love to see a more detailed progress bar while I’m uploading 12MB videos from my F30, and a few other changes) but from what I’ve seen looked solid. Ultimately like any other community oriented site, the real test will be whether it gains enough momentum to become a viable destination.

[Also of note, Camino contributor Samuel Sidler is on the staff]

Feeds For All With hAtom -- Part 2: The Code

Recently I introduced the idea of adding an Atom feed to any document you want by using hAtom along with a local ‘proxy’ script to generate feeds to pages on your site that otherwise wouldn’t have them. The post seemed well received, but it didn’t feel complete to me without some code to allow people to quickly try it for themselves. So here’s the inevitable followup with an example PHP5 script to show how you can make the hAtom to Atom conversion transparent to a site visitor and add feeds to static pages or pages that otherwise don’t have a more typical Atom feed.

This certainly isn’t a robust script—it doesn’t account for the use of Tidy to manage non-valid or non-XHTML documents, multiple domains or different request methods. It works for my purposes and I left it at that. But the core idea is simple enough that it shouldn’t take long to re-write it for your needs or in your language of choice if they’re different then mine.

The PHP Proxy Script


<?php
ini_set('display_errors', '0');
header('Content-type: application/atom+xml');
//
// configuration
$h2axsl = '/home/user/app/hAtom2Atom.xsl'; // path to hatom2atom.xsl
$domain = 'example.com'; // domain with the hatom content
$permalink_stub = 'hatom2atom.php';// public path to this file
//
// parse request
$requested = $_SERVER['REQUEST_URI'];
$requested = substr_replace($requested,'',0,strlen($permalink_stub)+2);
$requested = urldecode($requested); // deal with encoded #
$docurl = 'http://'.$domain.'/'.$requested;
//
// grab file contents
if (function_exists('curl_init')){
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, $docurl);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 5);
$file_contents = curl_exec($ch);
curl_close($ch);
} else {
$file_contents= file_get_contents($docurl);
}
//
// pass the file through the transform and send it out
$xsl = new DomDocument();
$xsl->load($h2axsl);
$inputdom = new DomDocument();
if ($inputdom->loadXML($file_contents)) {
$proc = new XsltProcessor();
$proc->importStylesheet($xsl);
$proc->setParameter('', 'source-uri', $docurl);
$newdom = $proc->transformToDoc($inputdom);
print $newdom->saveXML();
}
?>

The script can be broken down into the following parts:

  1. Configuration of paths for support files and requests.
  2. Extracting the location of the desired XHTML document that contains the hAtom content. This script is written so that requests made to hatom2atom.php/some/page would output the Atom feed for the document at http://example.com/some/page.
  3. Grabbing the contents of that XHTML document. In my case I’m making an http request to make sure the file is properly built/parsed, though if your files are static without includes you may want to use local file access methods instead.
  4. Performing the XSL transform and outputting the results.

You can copy and paste the above script, or download it as a .zip.

The XSL Transform

All the magic really happens via XSL and the trusty hatom2atom transform. So download both hAtom2Atom.xsl and uri.xsl and put them into the same directory somewhere on your server. When you do update the following line in the configuration portion of the script to the actual location of hAtom2Atom.xsl:

$h2axsl = '/home/user/app/hAtom2Atom.xsl'; // path to hatom2atom.xsl

Usage & The hAtom Document

Now that the proxy script is in place you should expose the feed to your visitors by including it in the head of the document or as links in the content. For example, if you have some hAtom content in http://example.com/page_with_hatom.html you can add the following link element in the head of that document:

<link rel="alternate" href="/hatom2atom.php/page_with_hatom.html" type="application/atom+xml" title="This Page's Atom feed" />

And any visitor with a browser that picks up on the link element would then identify the page as having a feed. If you want to be more specific about the location of the feed on the page, or you’re dealing with a document with multiple hAtom feeds and you want to specify the fragment ID for the root of the feed you’d do like so:

<link rel="alternate" href="/hatom2atom.php/page_with_hatom.html%23some_fragment" type="application/atom+xml" title="This Page's Atom feed" />

Notice I url encoded the # (as %23) when using a fragment id, this was because many user agents do not send the fragment ID as part of the request so I encoded it to make sure that the information was there for the proxy to manage and then had the script manage things from there.

Prettying up the Request

There are lots of ways to manage requests on your server – from MVC like dispatchers to mod_rewrite to nothing at all, in the case of this script I’ve just used the following rewrite rule that I added to the list of a number of rules I already had allowing me to pretty the url up a bit – and make it a bit more universal or future proof.

RewriteRule ^hatom2atom/(.*)$ hatom2atom.php/$1 [L]

But remember, if you do change the location of the proxy script to change the configuration line or url extraction methods in the script appropriately.

The Results

With the script installed and the feed linked up for users to find you now have Atom feeds for your readers to subscribe to that are generated from hAtom markup in a way that’s totally transparent to them. You can see this method in action in pages like:

Feeds For All With hAtom

I previously had tackled the issue of subscribing to documents with embedded hAtom content by writing a script for NetNewsWire that used its ability to run special script subscriptions on the “client” side.

While the script works great, and I’ve got a number of feeds I watch from other sites this way as a publisher I still longed for a more “feed”-like and more universal, and less technical solution.

This afternoon I got one big leap closer to a solution I’m happy with.

Detected feed as seen in Camino

Instead of offloading the work of parsing the html document containing the hAtom content to a client side application, or relying on a 3rd party proxy that I have no control over and may not be expecting a ton of regular traffic I’ve set up a script on my own server to act as a proxy and turn any found hAtom content at the specified address into more useful atom content1. Through the magic of the link element I can pass the new feed url off as you would with any other atom feed and the whole process is seamless to the user.

This even works for adding feeds to hand edited pages [yes, people still do that!] or pages that otherwise don’t have a database to draw on and build multiple feeds from. You can see it in action now for the version history hAtom feeds here and here and I’ll soon be implementing it on all the non-blog pages on ChunkySoup.net.

For the curious, the screen shot is of the feed detection code soon to be added to Camino.

EDIT: I’ve just uploaded the changes to all of the individual pages on ChunkySoup.net. Look for the feed titled ‘This Page’s Atom Feed’ on pages like this to watch them for changes.

1 using the usual suspect: hAtom2Atom.xsl

Introducing: Place Name Where?

A week or two ago I posted some comments about working with CakePHP for an upcoming project. Well, I’m happy to announce that that project—Place Name Where?—is up.

Place Name Where? is a personal information aggregator that tries to reverse the trend of decentralized content contributions that seems to be one of the core features of “Web 2.0” sites.

Web 2.0 is great, but at a certain point one can feel too distributed. You’ve got news stories here, pictures of your pet dust bunnies over there, and in the cellar you keep your favorite wines. Each service is kind enough to provide ways to include the content you added to their site back into your own site, but typically this is limited to a presentation that doesn’t go further then “hey, look at the last 10 things I did on this other site”.

The site works by regularly grabbing several feeds associated with my accounts on the selected services and then permanently storing a copy of the data on my end. Once I’m free of the restrictions of RSS feeds, APIs or JavaScript embedding techniques I can build much more elaborate views on the data like displaying recent activity across all services or looking up all things tagged with nhl regardless of the type of thing it is. I dubbed it a “Web of Web Things” after the discussions of similar tagging and aggregation of real world Web, or Internet of Things (call them spimes, blogjects, or whatever you’d like) by Bruce Sterling, Adam Greenfield, and others.

This aggregator isn’t intended to be a stand alone site forever—though it does work fairly well as such. I need to find some time to spend working on design and integration issues, but I hope it won’t be too long until the ideas behind Place Name Where? are integrated into this site and appear both in place of the current “link” lists as well as integrated into tag lookups and maybe search results.

Related Tags

Place Name Where?

A sampling of some recent photos, bookmarks and news stories I've flagged elsewhere with this tag.