Categories
Media Technology

Playing the game

Recovered from the Wayback Machine.

A while back I listed in a post 50 television programs the Boston Globe considered to be the top sci-fi shows on TV. In comments, we discussed shows we felt were missing, but none of us picked up that Max Headroom was missing from the list. Now that I look back on the discussion, I am surprised by its absence. Though Max Headroom was a short-lived series, I considered it to be both innovative and entertaining.

If you haven’t seen Max Headroom, the show centers around a television crew where the main character, a television journalist, has his personality copied into a digital construct named Max Headroom. In this future time, political entities no longer exist, and society is ruled by corporate rules and regulations, especially several competing broadcast companies, which, among other things, don’t allow televisions to be turned off. People are subjected, day in and day out, to broadcasting, including a continuous barrage of ads.

I was reminded of Max Headroom when I read about Microsoft Live last week, and again when I read Ray Ozzie’s supposedly leaked memo today. I don’t think any of us really doubts that the Microsoft memos were leaked deliberately and with careful thought and planning. Both memos, Gates and Ozzie’s, read as if they’ve been copy-edited, and every phrase meticulously constructed for maximum conjecture and obfuscation–perfect for a new takeover campaign.

Much of the writing is the usual hype–the sense of being on the verge of ’something new’–the ‘aha’ about technologies that are ubiquitous. But what surprised me about Ozzie’s memo and the Live discussion was the strong reference to advertising. Ozzie wrote:

Most challenging and promising to our business, though, is that a new business model has emerged in the form of advertising-supported services and software. This model has the potential to fundamentally impact how we and other developers build, deliver, and monetize innovations. No one yet knows what kind of software and in which markets this model will be embraced, and there is tremendous revenue potential in those where it ultimately is.

Julie Lerman also noticed this from the Microsoft Live announcement: advertising is now being seen as a technological innovation:

Now there is windows live and office live – but somehow the repetetive them(e) that kept jumping out at me when reading the press release was “advertising”.

Opera had ads around it’s browser before going all free; Google makes its money through adsense, and I’ve seen an increasing number of tools that you can use for free…as long as you allow certain bits of software to sit on your machine, counting your key strokes, reading you words, and feeding you focused ads. I do foresee a time when we’ll download Microsoft tools and products–all complete with bar frame and flitty, flighty ads. Not only that, but the technology will be added into .NET that enables those who build tools to do the same–and this enabling will then make it all okay.

At a time when television, radio, and music are becoming subscriber-based and on-demand downloadable for small fees, normally ad-free spaces–such as our desktops, browsers, and every day tools–will pick up the vacuum left by the broadcasters. You will have a choice: pay for the software, or allow ads. It is an inevitable next step in software product releases. With this approach, the software pays and pays no matter how long it takes people to upgrade. More importantly from Micrsoft’s point of view, the companies no longer need worry about pirated copies of any of the software because everyone can get it for free.

In our rush and our new enthusiasm–!?–for this new breed of ads, I can only hope that we remember, as Max Headroom surely could remind us: nothing is really free.

Categories
Technology Web

Accessing the Newsgator API within PHP

One of the programming jobs I’ve had recently was to provide PHP functions to access the Newsgator SOAP API; hiding as much of the SOAP bits as possible. I used the nuSOAP PHP library as the basis for my work. Though SOAP functionality is built into PHP 5, my client, like most people, are still using PHP 4, and nuSOAP has a very clean implementation.

For those who might want to give the API a shot, I’ll walk through some sample code that should be easily modified as interested. I had hoped to write a more complete application, but have ran out of time.

The Newsgator API requires an account in order to test the code, but you can sign up for one at no charge. When you get an account, you’re given an online Newsgator Location in which to add subscriptions. You’re also given the ability to create new locations, as well as folders, and to subscribe to and read, syndication feeds. The API itself is split into five main categories for the five SOAP endpoints: Locations, Folders, Subscriptions, Feeds, and Posts.

Each SOAP engpoint page lists the web service methods for the specific item, including a description of the parameters and values returned. An important element when looking at the page is to find a link to the endpoint at the bottom. Clicking on it opens a window asking for the account username and password. Once you enter these, the endpoint page opens, containing links for each of the methods.

Clicking on a method link opens up another page, usually containing a form, and an example SOAP request and response. These latter are essential in order to determine the values used with nuSOAP. You can also test the web service by typing values into the form and invoking the method. If, that is, the parameters are simple values rather than programmatic structures, such as arrays.

Once you’ve looked through the API methods to see what parameters are needed, and explored the actual SOAP request and response, it’s just a matter of plugging in values within the nuSOAP functions. To demonstrate, I’m going to walk through a program that creates a SOAP client, queries the service for all subscriptions for a given location, and then accesses and prints out links to the individual items for the subscriptions.

In the program, I first create a SOAP client using the appropriate endpoint, checking for any error afterwards. (Complete source code is provided later, so no worries about any gaps in the code):

// create SOAP client
$client = new soapclient(”http://services.newsgator.com/ngws/svc/Subscription.asmx”);
$err = $client->getError();
if ($err) {
err($client,$err);
die();
}

I’m not using a proxy or WSDL, so no other parameters other than the endpoint are set.

Next, I define the method’s parameters, in this case a location string and a synchronization token. This latter value is used to synchronize the data between method calls, and in the results you’ll see this returned as part of the response. Using this provided synch value in the next method call ensures that the data, such as the count of unread items for each subscription, is fresh.

// set parameters
$params = array(
‘location’ => $location,
’syncToken’ => $synctoken
);

During the initial web service request, the synch token is blank.

Once the method parameters are set, I added code to authenticate the user:

// authenticate against the service
$client->setCredentials($user, $pass,’basic’);

Note that this uses example uses BASIC authentication; Newsgator also supports DIGEST authentication.

The Newsgator API token is passed in a SOAP header, which I build manually next. Note that the token must be authenticated with the service, so you’ll need to specify the appropriate service namespace:

// create SOAP header for Newsgator API
$hdr = “<ng:NGAPIToken xmlns:ng=’http://services.newsgator.com/svc/Subscription.asmx’>
<ng:Token>$token</ng:Token></ng:NGAPIToken>”;

Finally, we can now invoke the service:

// invoke SOAP service
$result = $client->call(’GetSubscriptionList’, $params,’http://services.newsgator.com/svc/Subscription.asmx’,
‘http://services.newsgator.com/svc/Subscription.asmx/GetSubscriptionList’,
$hdr,false, ‘rpc’,’literal’);

// check for error
if ($client->fault) {
echo ‘<h2>Fault</h2><pre>’; print_r($result); echo ‘</pre>’;
} else {
$err = $client->getError();
if ($err) {
echo ‘<h2>Error</h2><pre>’ . $err . ‘</pre>’;
}
}

In this function call, the SOAP method is the first parameter, followed by the parameters, the SOAP endpoint (namespace), the SOAP action, the manually created header, the serialization style (’rpc’), and the serialization for the parameters (’literal).

The nuSOAP function processes any XML returned as multi-dimensioned arrays. With this service call, the subscriptions are returned as OPML, values of which you can access by walking through the array:

// decipher the array, based on OPML
$opml = $result[”opml”];
$body = $opml[”body”];
$outline = $body[”outline”];
$syntoken = $opml[”!ng:token”];
foreach ($outline as $key => $sub) {
$feed = $sub[”!ng:id”];
$title = $sub[”!title”];
$url = $sub[”!htmlUrl”];
echo “<a href=’$url’>$title</a><br />”;
}

After each subscription is accessed, the feed identifier ($feed) is then used to invoke another service to get the news for the feed. The complete application demonstrates this.

Categories
RDF Technology

The Wordform/WordPress metaform

Time to start releasing some code.

The Metaform RDF extension and plugins are finally really for beta use.

The Metaform Extension creates a new page in your WordPress weblog that provides a home for all metadata extensions. You’ll also need to add a few lines to your wp-configure.php file and a couple of your templates. The install.txt file has installation instructions.

Included in the installation is a stripped down version of RAP: RDF API for PHP. This should work in PHP 4.3 and up, and will require no other external libraries.

The first plugin is the Links Plugin, which will parse out hypertext links in a post and store them as RDF data. This then can be used to add a link list to your syndication feed or your post, or however else you want to use the data. Again, follow the instructures in install.txt to use it.

I plan to finish packaging a few others for release tonight. My hope is, though, that the Metaform infrastructure will encourage a whole host of RDF-based plugins; using those I’ve created as templates and expanding in ways I haven’t imagined. Regardless, the extension and the plugins do demonstrate that RDF isn’t just for large, esoteric applications requiring a host of PhDs to create.

A few weeks ago the discussion about RDF focused on how complex it is, how hard it is to use; how difficult it is to use in hacking, or for creating simple applications. What Metaform demonstrates is that RDF can be hackable, simple, and immediately useful. It may not be as sexy as Web 2.0, but it is real.

The SeeAlso Plugin allows you to add one or more external references to a post, and have a list of these printed out in the page and/or syndicated feed. Follow the install.txt for how to install.

The Photo plugin accesses the Flickr API to gather metadata about a Flickr embedded photo in the post. The data is then output via a link, added by plugin.

A future version will have access to Google maps, and processing of XMP data.

Categories
Web

Please…do evil

Recovered from the Wayback Machine.

Google Blogoscoped Terms of Service:

By submitting, posting or displaying Content on or through Google services which are intended to be available to the general public, you grant Google a worldwide, non-exclusive, royalty-free license to reproduce, modify, adapt, publish and otherwise use, with or without attribution such Content on Google services solely for the purpose of displaying, distributing and promoting Google services.

Book review of Tom Sawyer by Sandi W. Age 9:

When Tom met Huck Finn and became friends, it reminded me of when I met my friend Seu Mei. We became best friends for a few years. Between those few years, we met more friends. My favorite part in the book was when Tome tricked his friend. His friend had to paint the fence white and Tom got to rest. I read another book by the same author. It is called Huckleberry Finn. I enjoy reading these books because I like to solve the mysteries.

The main point of view of Google Base is that this is going after eBay and Craigslist, and online classifieds. I would say the target is Wikipedia, too. Is this a dangerous move? Depends. Ask yourself the question: at what point can you afford to lose Google and still do business?

Categories
Connecting Technology Weblogging

Neighborly news

Recovered from the Wayback Machine.

If you haven’t had a chance to check out Jerry’s electric car weblog, give it a glance. In the weblog, Jerry is chronicling the process of converting a gas burning Ford Probe into a sleek, clean, electric car.

Jeneane was on the radio today talking about blogging. Nifty Jeneane. Now, we gotta get you off of Blogspot.

Sheila Lennon writes about Sinead O’Connor’s new reggae focused album. I really like reggae, and I appreciate O’Connor’s conversion to the Rastafarian belief, but what she sings is not reggae. It may be the words, it may be the notes, but it isn’t reggae.

Sheila also mentions that Carly Simon–the lady in the gauzy, see-through hippy dress who sang the weblogging anthem decades before weblogging itself was invented–has turned 60 and released a new album. It is also a disappointing bust. I like the type of music, but she doesn’t have the voice to do it justice.

Carly Simon. Brings back memories. Decades ago she was an earth child/sex kitten with a sultry, folksy voice–not an easy combo of image and tone. I remember once buying a see-through dark green patterned gauzy peasant blouse to wear, trying to capture a little of that Simon persona. Every boy I knew back in the early 70’s was in love with Carly Simon. Yup, many a boy fantasized over one or the other of her album covers.

Why, one such boy might have been Dave Rogers, who just returned from a class reunion. Dave points out a the new anti-tech column at Wired. In it, the author, Tony Long, writes:

Anything that diminishes the value of a single human being poses a threat to a rational, humane society. When technology can cure a disease or help you with your homework or bring a little joy to a shut-in, that’s great. But when it costs you your job, or trashes the environment, or takes you out of the real world in favor of a virtual one, or drives your blood pressure through the roof, it’s a monster.

I can agree with the author, but I’d have to add a caveat that it isn’t the technology or even the technologists who are the monster. Follow the promises scattered like so many broken bits of white plastic until you bump up against those with a gleam of silver and gold in their eyes if you want to see the many headed hydra of tech. Still, this promises to be a very interesting column–if only it had a syndication feed, so that I could read it on my computer while I’m at the coffee shop talking on my cell, all the while eying the freaky poet chick and thinking I should get a picture of her for my blog.

Speaking of local hangouts, Karl has written a thoughtful piece about his hangout at PhillyFuture and what he’d like to see in the future for the publication, but he can’t do it alone. Community sites need community.

Well, you do unless you have an aggregator. Oh, and comments. Trackbacks, too. Wait a sec–don’t forget the wiki. And you’re not hip if you don’t do OPML. By the way, is that iPod of yours really six months old? And it still works?