Planet XSLTransformations

August 28, 2008

Danny Ayerslinks for 2008-08-27

August 27, 2008

Norm WalshNetwork security and reliability

Getting a reliable internet connection can lead to some odd discoveries.

Henry Storymy blog is worth $49,114.98

According to Dan Carlson's program my blog is worth 49thousand dollars. That's nothing next to Tim Bray's who's coming up for 700thousand dollars. Of course Dan Carlson is a big winner in all this, because everybody is linking to his site, so his just keeps growing. He is now at 2 million by his own estimate which has something to do with with some AOL deal a few years ago.


My blog is worth $49,114.98.
How much is your blog worth?

Now would I sell my blog for a new car?

As with a new car you'd have to be a bit careful how you sell your site. Tim Brays http://tbray.org/ongoing is worth $693,819.66 . But http://tbray.org/ongoing/ [notice the trailing slash] is worth $375,983.64 . So is Tim's site worth the sum of both, 1 million?

Henry StoryMy Mail.app is unstable

Mail.app is getting to be a real pain to work with. This is the 4th time in 2 months that I have to spend over 4 hours debugging it. As of writing this I can longer send or receive mail!
It used to just crash, which was useful because I could use dtrace to find all the files it had opened and just remove the directories in Library/Mail where it had last looked at. I could then re-import those folders later.
Since the 10.5.3 update it no longer crashes. A week ago it just either spent a huge amount of time thinking, using up over 100% of the cpu (there are two cores so it can use up to %200), and then finally recovered, but I had time to study a few chapters of "Semantic Web for the Working Ontologist before that happened. Today it just consumed so much cpu that all other applications became irresponsive. I reniced Mail with

$ sudo renice -20 -p 16410  #where 16410 was the process id of Mail.app at the time
which made it possible to use my shell at least. Then it crashed.

I am clearly not the only one with this problem. Searching the web I found that

Mail.app is really a key application of OSX. If Apple can't get this right, or don't have enough resources to dedicate to this, would it perhaps help to Open Source Mail.app? At least some of us could hunt down the problem and give them a fix. Currently I am not sure what they are doing about this. I will try once more to fix it, but I am really really close to switching to something else...

2 hours later - Solved: I had a mail folder for an internal Sun apple mailing list. I had suspected that there was a problem here as it would crash when I opened that folder. So I went to /Users/hjs/Library/Mail/IMAP-hsXXXXX@mail.sun.net and moved the apple.imapbox to a temporary folder. I then started Mail and it fetched all the threads from the server again. Having the mail on a remote server helps a lot. For one it should make moving to another client a lot easier...

Could it be that I have too many e-mails? The following seems to suggest that I have 273 thousand.

hjs@bblfish:0$ cd Library/Mail
hjs@bblfish:0$ find . -name "*.emlx" | wc
 273761  322242 17719867
I have one gmail account, my personal imap server and sun work imap server if that helps...

Updates

It is 27 August now, and I have not had any serious crashes anymore. It could be that the last time I really cleaned up those broken folders. It could be luck...

Jonathan BruceHeterogeneous Data Access in .NET – Approach #1: Coding Directly to ADO.NET

Guest blogging once again for Jonathan, this is Mike Frost with part 1 of my series on Heterogeneous Data Access in .NET - Coding Directly to ADO.NET

Before I begin though, I should make a comment about the reason for this series. After many conversations with .NET developers and with development organizations using .NET, we have heard a lot of confusion over the different approaches to accessing multiple databases in .NET. In some cases, what we have heard misinformation, in some cases it was a lack of information. In most cases, though, people just had different sets of needs and experiences and those differences often dictated a different set of requirements for everyone we spoke with. So what I'm offering isn't intended to be the "final" answer on this matter - merely a set of advice and guidelines based on our experience with this subject and with others who have wished to learn more about if for themselves.

With that said, the most obvious place to start when discussing how to develop an application that requires access to multiple relational data stores is to talk about ADO.NET. Historically (and even today given the many announcements concerning the ADO.NET Entity Framework), building code that accesses the ADO.NET interfaces directly is easily the most prevalent approach in use today in .NET applications. If you’ve ever built an ASP.NET application that connected to Oracle and used Visual Studio tooling to do it, then the database access code that was generated used ADO.NET under the covers.

The Pros – Coding directly to ADO.NET is perhaps the best option for those experienced developers that have a strong background in ADO.NET, want to maintain fully control of their data and require the power of the database to be at the immediate disposal. Coupled with this, writing to ADO.NET allows for very granular control of database access code which can be leveraged to ensure the most efficient database access for a particular application. Put simply, if you know what you’re doing with ADO.NET, you can probably do a very good job coding your application with this approach.

The Cons – All of that granular control means that a significant amount of application development time will likely be required. In addition, the developer will need to know which ADO.NET providers will be used ahead of time. Finally, unless the developer is a thorough planner and careful coder, he or she can fall into the trap of using provider-specific code. Unfortunately many developers are unaware of these factors during the initial development phase. As a result, it isn’t until after a significant investment of time and effort has been made that the impact of these factors becomes apparent.

The use of Visual Studio tooling during development isn’t inherently bad, nor are most developers coding without some foresight into what they are doing. Unfortunately, there is a natural tendency to take the path of least resistance. This tendency, combined with a certain level of code abstraction that Visual Studio tooling can create, often leads to applications that are mired down in huge masses of provider-specific code.

While this result might be acceptable for single data source data access (e.g. SQL Server only), it does lock the application to the provider it was originally written to work with. Consequently, adding support for additional database providers ultimately becomes a huge headache as application code and SQL statements must all be rewritten to account for differences in provider code, semantics, and SQL statement formatting. Ask anyone who has been faced with this situation and they will tell you that it’s a nightmare to deal with!

It is worth noting that that the use of connection factories (link) can reduce the amount of provider-specific code with this approach. While this does not account for and eliminate all provider-specific coding in this approach, it can help mitigate some of the hassle of trying to support multiple providers and data sources.

So, to summarize:

Coding Directly to ADO.NET

Pros:

  • Available today
  • Allows granular control of database access code
  • Best option for developers with a strong background in coding to ADO.NET spec
Cons:
  • Requires careful coding on the part of the developer to avoid provider-specific code where possible
  • Requires more development time as compared with other approaches
  • Requires prior knowledge of what providers will be used or recoding to add support for additional providers
  • Applications tend to get locked to a specific provider

My next post will cover an approach specifically designed to help architect .NET applications requiring heterogeneous data access – programming with the Microsoft Data Access Application Block.

Micah Dubinko1st annual Muse Cup

A new mead-only competition in Colorado. Submissions for this year’s competition accepted Sep 8 through 18. -m

Chris SellsWhere did my old Word command go in new Word?

I've been using Word for a long time and my fingers knew where the commands were that I used even though my brain didn't. Most of the those commands I've mapped to the new Ribbon-enabled Word without a problem, but sometimes I still search. For those times, the Office guys have put up a cool tool that shows me where the new version of each command is located in the new Word. Enjoy.

Elliotte Rusty HaroldOlivier Thereaux has added experimental support for HTML 5 to the W3C markup validator.

Olivier Thereaux has added experimental support for HTML 5 to the W3C markup validator. as part of an effort to promote the current work on HTML to web developers, I've been "The result of that work is in CVS, and testable on the dev instance of the validator: http://qa-dev.w3.org/wmvs/HEAD/".

Danny AyersQOTD: cute rodents

It turns out that when you build a better mousetrap, better mice evolve.

- mauvedeity

Micah DubinkoGeek Thoughts: magenta

The color magenta has no wavelength. It exists only in your mind.

More collected Geek Thoughts at http://dubinko.info/blog/tags/geekthoughts/.

Dave KellogPut Your Money Where Your Metadata Is

Just a quick post to highlight a -- dare I say "catchy" -- webinar that we're running with Folio magazine and Really Strategies on September 10, 2009 at 2:00 PM EDT.

Speakers include:
To register, go here.

August 26, 2008

Henry StorySun Intranet Foaf Experiment

image of Address Book displaying internal sun foaf

Building a foaf server from an ldap directory is pretty easy. Rinaldo Di Giorgio put a prototype server together for Sun in less than a week. As a result everyone in Sun now has a experimental temporary foaf id, that we can use to try out some things.

So what can one do with foaf that one could not so easily do with ldap? Well the semantic web is all about linking and meshing information. So one really simple thing to do is to link an external foaf file with the internal one. I did this by adding an owl:sameAs statement to my public foaf file that links my public and my sun id. (It would be better to link the internal foaf file to the external one, but that would have required a bit more work internally). As a result by dragging and dropping my foaf iconfoaf file onto today's release of the AddressBook someone who is inside the Sun firewall, can follow both my internal and my external connections. Someone outside the firewall will not be able to follow the internal link.

By extending the internal foaf server a little more one could easily give people inside of Sun a place to link to their external business connection, wherever they might be in the world. To allow other companies to do this too it would of course help if everyone in Sun had a minimally public foaf ID, which would return only minimal information, or whatever the employee was comfortable revealing about themselves. This would allow Sun to present a yet more human face to the world.

Well that's just a thought, and this is just an experiment. Hopefully it will make the semantic web more real for us here, and allow people's to dream up some great way of bringing all the open source world together, ever closer.

PS. For people inside of Sun it may be easier to just drag my foaf iconinternal foaf file directly on the the AddressBook (started via jnlp). Otherwise to get the internal foaf file to download you need to click the "fetch" button next to the "same As" combo box when viewing my info. Then you need to switch to "Last Imported" and back to allow "Bernard Traversat" to appear in the second column. He appears as someone I foaf:know after the merger of the internal and the external foaf. I know this is clumsy, and I'll try thinking up a way to make this more user friendly very soon. You are welcome to participate on the Address Book Project.

Jeni Tennison95% capacity

The other day I finally got around to watching the first episode of Britain From Above. The episode talked about the various networks that keep Britain working: water, sewage, electricity, gas, road, shipping, trains, telecommunications and so on.

One segment was about the railway system during the rush hour (might only be viewable by those in the UK). The description runs:

Transport expert Jon Shaw reveals that every morning as millions of people start their long commute to work they are using a system which is so overloaded it is on the brink of disaster.

Apparently the railway system (around London, at least) operates at 95% capacity during the rush hour, which means that if one small thing goes wrong, the system collapses.

Sounds like my life! Working and looking after the children, and keeping up with blogs and mailing lists puts me at 95%. Then I try to push it that little bit more: some extra preparation for a training course; a short article for a magazine; a technical review on a book. And then something unexpected happens: a child gets chicken pox, or starts vomiting, or my tooth needs a root canal, and I collapse.

Over the weekend, for the first time in 15 years, I had a proper full-on migraine that wiped me out for seven hours and lingered for another 24. (I get the visual disturbances, and sometimes even problems reading, a couple of times a year, but usually manage to avoid the actual headache.) It’s my body’s way of telling me to stop and slow down for a while.

But I still have that reviewing to do, and the children are just about to wake up from their nap, and the RESTful JSON discussion is pretty interesting, and supper needs preparing, and I really have to try Norm’s XProc implementation, and weed the vegetables, and write another XRX post for xml.com as well as about this behaviour-driven development framework I’ve been developing for XSLT, and sew in the labels on my eldest’s school uniform…

Sigh. I’m not doing too well at lowering the load. Perhaps I should work at increasing the capacity.

Elliotte Rusty HaroldOpera Software has released version 9.5.2 of their namesake free-beer web browser for Windows, Mac, and and Linux.

Opera Software has released version 9.5.2 of their namesake free-beer web browser for Windows, Mac, and and Linux. It's not immediately obvious what's new in 9.5.2. Presumably bugs have been fixed.

August 25, 2008

Dave KellogForrester Trends Report for CIOs

I found this new Forrester report by analyst Bobby Cameron entitled The Emerging Technology Trends that CIOs Should Care About via this post on the ReadWriteWeb.

The six trends are:
  • Technology populism
  • The information workplace
  • Dynamic business applications
  • Digital business architecture
  • IT ecosytems
  • Enterprise master data management
While several are relevant to Mark Logic, I think the most relevant is information workplace. Here's what the ReadWriteWeb had to say about it:
The information workplace is a term describing a next-gen platform that consists of numerous parts such as unified communications, portals, enterprise content management apps, office productivity apps, collaborative technologies, business intelligence, data warehousing, and more. However, the information workplace isn't about each of these technologies individually, but how they all seamlessly come together as a whole. Today's information workplace is role-based, individualized, and thanks to the Web 2.0 invasion, it's also often "social" and "quick," as Web 2.0 tools tend to be.
We think we're a great platform underlie these sorts of applications. Keep an eye on our integration with Office 2007, Adobe, and Microsoft SharePoint going forward.

Dave KellogMarkLogic Named Trend-Setting Product by KMWorld

MarkLogic has been named a trend-setting product for 2008 by KMWorld. Says Hugh McKellar, editor in chief, of KMWorld:
This year's KMWorld list of Trend-Setting Products has been compiled through briefings with vendors themselves, along with conversations with analysts, users and system integrators about products that represent the best research and development of solutions for nearly every organization and industry.

Our mission in choosing this year's products has been deceptively simple: select those that deliver robust customer value.
We're honored to have been named to the list.

Dave KellogAndy Feit Connects at Search Engine Strategies

Mark Logic's marketing chief, Andy Feit, took the stage this week at the Search Engine Strategies conference in San Jose. A self-described "information retrieval guy from way back," Andy participated on a panel on enterprise search with Bill French from MyST, Avi Rappoport from SearchTools.com, and Rebecca Thompson from Vivisimo.

Stephen Arnold, of the Beyond Search blog, covered the session in a post entitled Search Points of View: One Home Run, Three Singles. Hint: Andy wasn't a single.

Excerpt:
For me, the bulk of the information in this summary was of interest because it makes clear the difficulty of discussing search, content processing, and text analytics without a clear definition and scope to bound the remarks. My thought is, “Give MarkLogic more time on the next panel.”
The session itself is blogged about on the official conference site here. While Andy's presentation was only ten minutes (followed by group discussion), here are the slides he used as a brief introduction to the panel.

Andy Feit at SES
View SlideShare presentation or Upload your own. (tags: xml search)

Henry StoryThe interpretation of fairy tails

Over the holidays I accidentally picked up a book by Marie-Louise von Franz, "The interpretation of fairy tails", and could not put it down until I reached the last page. I then ordered five other book of hers. If you have ever found fairy tails interesting but puzzling, you don't know how much you have missed. Seen from Marie-Louise's perspective, one of the closest students of Carl Gustav Jung, each of these are nuggets of deep knowledge of the human soul. Here is my translation of the first paragraph of my French translation of "The feminine in Fairy tails":

At the origin, and until approximately the XVIIth century, fairy tails were not so much meant for children as for the adult population. This situation was kept alive in the rural areas where until a relatively recently, story tellers would animate traditional vigils. Progressively though the development of the rational current and its refusal of the irrational, led these tails to be seen as just absurd old woman's stories, just good enough to amuse the children.

My guess is that a lot of this still holds true today, though a lot of her thoughts must have been integrated in one way or another by now. Once one starts learning to read fairy tails like this - though I keep being surprised at how deep her reading goes, and it will not be an easy task to get even close to it - one can start seeing how this can be applied to other arts such as film. I recently saw Jim Jarmush's "Dead Man" which is full of such interesting symbolism for example.

Micah DubinkoMilorad Cavic is a cool guy

He won an olympic silver medal in the much-publicized race where the gold winner came in 0.01 second faster. And he blogs. He writes:

On winning a SILVER medal: I am completely happy, and still in complete disbelief that I was able to achieve this feat! I’m not joking… It’s a tough loss, but I’m on cloud nine. I congratulated Phelps and his coach Bob Bowman. I’m just glad the race was fun to watch for everyone. It was a pleasure for me, really.

What a fantastic attitude. I wish I had my head on that straight soemtimes. Milorad, if you are ever in the South Bay, I will buy you a beer, or a 1000-calorie energy drink, or whatever. -m

Danny AyersTalis+1

Leigh is now a colleague. How cool is that.

August 24, 2008

Dare Obasanjo Best Practices for Web Sites Seeking to Prevent Service Degradation due to 3rd Party Widgets

I've been reading about the Ning vs. WidgetLaboratory drama on TechCrunch. The meat of the conflict seems to be that widgets from WidgetLaboratory were so degrading the user experience of Ning that they had to be cut off. The relevant excerpts from the most recent TechCrunch story on the war of words are below

For those of you not closely following the drama between social network platform Ning and a popular widget provider called WidgetLaboratory, you can read the background here . On Friday Ning unceremoniously shut down their access to Ning, making all those widgets vanish.
...
In an email to WL on August 2 (more than three weeks ago), CEO Gina Bianchini wrote “Our only goal is to have you build your products in such a way that doesn’t slow down the networks running your products or takedown the Ning Platform with what you’re doing. Both of those would result in us needing to shutdown WidgetLaboratory products and that’s has never been our first choice of options. Hopefully, you know this after 8 months of working with us.”

Ignoring the he said, she said nature of the communication between both companies, there is a legitimate concern that 3rd party widgets included on the pages of a Web site can degrade the performance to the extent that the site becomes unusably slow. In fact, TechCrunch has had similar problems with 3rd party widgets as Mike Arrington has mentioned on his personal blog which led to him excluding the widgets from his site.

Typically, widgets are embedded in a site by including references to Javascript hosted on a 3rd party site in the page's HTML. This means rendering the page is dependent on how quickly the script files can be downloaded from the 3rd party site AND how long it takes for the script to execute especially since it may also fetch data from one or more servers as well. Thus a slow server or a badly written script can make every page that embeds the widget unbearably slow to render. Given that the ability to embed widgets is a key feature of social networking sites, it is important for such sites to figure out how to isolate their user experience from badly written widgets or widgets hosted on slow Web servers.

Below are some best practices that have emerged on how social networking sites can immunize themselves from the kinds of problems Ning has had with WidgetLaboratory

  1. Host the Scripts Yourself: If you have a popular site, it is quite likely that you have more resources to handle lots of page views than the typical widget developer. Thus it makes sense to take away the dependency on externally hosted scripts by hosting the widgets yourself. Microsoft encourages developers to submit their gadgets to Windows Live Gallery if they want to build gadgets for my.live.com or Windows Live Spaces. For it's AJAX homepage service, Google does not require developers to submit gadgets to them for hosting but instead caches gadget data for hours at a time which means they are effectively hosting the gadgets themselves for the majority of the accesses by their users.

  2. Keep External Dependencies off of Pages that Need to Render Quickly: In many cases, it isn't feasible to host all of the data and content related to widgets that are being shown on your site. In that case, you should ensure that the key scenarios on your Web site are insulated from the problems caused by slow or broken 3rd party widgets. For example, on Facebook viewing someone's profile is a key part of the user experience that is important to make sure happens as quickly and as smoothly as possible. For this reason, Facebook caches all 3rd party content that shows up on a user's profile and requires applications to call Profile.SetFBML to add content to the profile instead of providing a way to directly embed widgets on a user's profile.

  3. Make It Clear Who Is to Blame if Things go Awry: One of the issues raised by Ning in their conflict with WidgetLaboratory is that user pages wouldn't render correctly or would show degraded performance due to WidgetLaboratory's widgets but Ning would get the support calls. This kind of user confusion is avoided if the user experience makes it clear when the failure of a page to render correctly is the fault of the external widget and when it is part of the hosting site. For example, Facebook Canvas Pages for applications make it clear that the user is using a 3rd party application and not part of the core Facebook experience. I've seen lots of user complain about the slowness of Scrabulous and Scrabble but never seen anyone who thought that Facebook was to blame and not the application developers.

Following some of these practices would have saved Ning and its users some of their current grief.

Now Playing: Ice Cube - Get Money, Spend Money, No Money

Norm WalshAnnouncing xproc-dev@lists.w3.org

You're invited to join the xproc-dev mailing list, a public discussion forum for implementors and users of XProc: An XML Pipeline Language.

Norm WalshCalabash: an XProc implementation

This is the permanent status page for Calabash. Calabash is an implementation of XProc: An XML Pipeline Processor, a specification being developed by the W3C to address questions about the XML processing model. The third alpha version is now available.

Micah DubinkoTrying to read _Playing for Keeps_ on an iPhone

Mur Lafferty’s new superhero novel is making the rounds. She’s encouraging everyone to buy a printed copy on August 25 (buy it here) to make a nice impression in the bestseller lists. I’m a sucker for these kinds of promotions. The full text also recently appeared on the Escape Pod feed, under a Creative Commons license. It’s a whopping 35 megabytes, including illustrated comic book covers…a nice touch.

It would be really nice to have this with me to read during spare moments without the bulk of the printed book. Hmm.

My question is: how I can read it on an iPhone? Ebook support isn’t that great so far, especially for the PDF format. I know about the data:url trick, but it doesn’t work with 35 megs. Has anyone successfully set up an iPhone to read this book? What software and/or conversions did you use? Comment below. -m

Colin Paul Adams (XSLT)Late Large Red Damselfly

Nine species this afternoon in Hurst Grange Park - an excellent result for late August.

The afternoon started with two or three Migrant Hawkers feeding in the cycle track - the previous two summers seeing hawkers here was a regular occurrence. Today is the first time this summer, which just shows how bad it has been.

read more

Dare Obasanjo I Want a Windows App Store

Last week my blog was offline for a day or so because I was the victim of a flood of SQL injection attacks that are still hitting my Web site at the rate of multiple requests a second. I eventually managed to counter the attacks by installing URLScan 3.0 and configuring it to reject HTTP requests that resemble SQL injection attacks. I found out about URLScan in two ways; from a blog post Phil Haack wrote about Dealing with Denial of Service Attacks where it seems he's been caught up in the same wave of attacks that brought down my blog and via an IM from Scott Hanselman who saw my tweet on Twitter about being hacked and pointed me to his blog post on the topic entitled Hacked! And I didn't like it - URLScan is Step Zero.

This reminded me that I similarly found another useful utility, WinDirStat, via a blog post as well. In fact when i think about it, a lot of the software I end up trying out is found via direct or indirect recommendations from people I know. Typically through blog posts, tweets or some other communication via a social networking or social media service. This phenomenon can be clearly observed in closed application ecosystems like the Facebook platform, where statistics have shown that the majority of users install new applications after viewing them on the profiles of their friends.

One of the things I find most interesting about the Facebook platform and now the Apple App Store is that they are revolutionizing how we think about software distribution. Today, finding interesting new desktop/server/Web apps either happens serendipitously via word of mouth or [rarely] is the result of advertising or PR. However finding interesting new applications if you are a user of Facebook or the Apple iPhone isn't a matter of serendipity. There are well understood ways of finding interesting applications that harnesses social and network effects from user ratings to simply finding out what applications your friends are using.

As a user, I sometimes wish I had an equivalent experience as a user of desktop applications and their extensions. I've often thought it would be cool to be able to browse the software likes and dislikes of people such as Omar Shahine, Scott Hanselman and Mike Torres to see what their favorite Windows utilities and mobile applications were. As a developer of a feed reader, although it is plain to see that Windows has a lot of reach since practically everyone runs it sometimes I'm envious of the built in viral distribution features that come with the Facebook platform or the unified software distribution experience that is the iPhone App Store. Sure beats hosting your app on SourceForge and hoping that your users are blogging about the app to spread it via word of mouth or paying for prominence on sites like Download.com.

A lot of the pieces are already there. Microsoft has a Windows Marketplace but for the life of me I'd have never found out about it if I didn't work at Microsoft and someone I know switched teams to start working there. There are also services provided by 3rd parties like Download.com, the Firefox Add-Ons page and Tucows. It would be interesting to see what could be stitched together if you throw in a social graph via something like Facebook Connect, an always-on well integrated desktop experience similar to the Apple App Store and one of the aforementioned sites. I suspect the results would be quite beneficial to app developers and users of Windows applications.

What do you think?

Now Playing: Metallica - The Day That Never Comes

Dare Obasanjo RESTful JSON: Bringing REST and RPC Closer Together

My recent post, Explaining REST To Damien Katz, led to some insightful comments from Dave Winer and Tim Bray about what proponents of building RESTful Web services can learn from remote procedure call (RPC) technologies like SOAP and XML-RPC. 

In his post, Dare left something out (and it's important) Dave Winer wrote

Really ought to include it in your thinking, Dare and everyone else. You're missing out on something that works really well. You should at least learn the lessons and add to REST what it needs to catch up with XML-RPC. Seriously.

What's missing in REST, btw, is a standard method of serializing structs, lists and scalar types. The languages we use have a lot more in common than you might think. We're all writing code, again and again, every time we support a new interface that could be written once and then baked into the kernels of our languages, and then our operating systems. Apple actually did this with Mac OS, XML-RPC support is baked in. So did Python. So if you think it's just me saying this, you should take another look.

Dave has a valid point, a lot of the time communication between distributed systems is simply passing around serialized objects and/or collections of objects. In such cases, having a lightweight standard representation for serialized objects which is supported on multiple platforms would be beneficial. Where Dave goes astray is in his assertion that no such technology exists for developers building RESTful Web services. Actually one does, and it is widely deployed on the Web today. JavaScript Object Notation (JSON) which is described in RFC 4627 is a widely deployed and well-defined media type (application/json) for representing serialized structs, lists and scalar values on the Web. 

There are libraries for processing JSON on practically every popular platform from "corporate" platforms like Java and the .NET Framework to Web scripting languages like Python and Ruby. In addition, JSON is attractive because it is natively available in modern Web browsers that support JavaScript which means you can use it to build services that can be consumed by Web browsers, other Web services or desktop applications with a single end point.

Tim Bray cautioned REST proponents against blindly rejecting the features typically associated with RPC systems and SOAP/WS-* in his post REST Questions where he wrote

Has REST Been Fortunate in its Enemies? · I have been among the most vocal of those sneering at WS-*, and I’m comfortable with what I’ve said. But that doesn’t prove that the core WS-* ideas are wrong. Here are some of the handicaps WS-* struggled under:

  • Lousy foundational technologies (XSD and WSDL).

  • A Microsoft/IBM-driven process that was cripplingly product-linked and political.

  • Designers undereducated in the realities of the Web as it is.

  • Unnecessary detours into Architecture Astronautics.

As a result, we should be really careful about drawing lessons from the failure of WS-*. Specifically:

  • Just because the XSD type system is malformed, you can’t conclude that the notion of schema-driven mapping between program data types and representation payloads is harmful.

  • Just because WSDL is a crock, you can’t conclude that exposing a machine-readable contract for a service is a necessarily bad idea.

  • Just because UDDI never took off, you can’t conclude that service registries are dumb.

  • Just because SOAP has a damaging MustUnderstand facility and grew a lot of ancillary specification hair, you can’t conclude that some sort of re-usable payload wrapper is necessarily a dead-end path.

  • Just because the WS-* security specifications are overengineered and based on a shaky canonicalization spec, you can’t conclude that message-level security and signing aren’t sometimes real important.

And so on. I personally tend to think that schema-driven mapping is hopeless, contracts are interesting, registries are a fantasy, and payload wrappers are very promising. But I don’t think that the history of WS-* is a very good argument for any of those positions.

In a lot of situations where applications consume XML, the first thing the application does is convert the XML into an object graph representative of the business logic of the application. The SOAP/WS-* way of doing this was to define an XSD schema for the XML payload and then use some object<->XML mapping layer to convert the XML to objects. The problem with this approach was that there is a fundamental impedance mismatch between XSD types and OO types which led to horrible interoperability problems since no two platforms could agree on how to map the various esoteric type system features of XSD into the structs, lists and scalar types that are the building block of all OO type systems. However these problems go away if you use a data format that was explicitly designed for describing serialized data objects like JSON.

Providing a machine readable description of a service's end points is useful, especially on the Web where multiple services may expose the same interface. For example, when you visit my weblog at http://www.25hoursaday.com/weblog/ using Firefox 2 or higher and Internet Explorer 7 or higher the browser immediately lights up with a feed icon which allows you to subscribe to my Atom feed from your Web browser. This happens because I've provided a machine readable description of my feed end points on my blog. The Atom Publishing Protocol, which is one of the most well-designed RESTful protocols out there, has a notion of service documents which enable client applications to discover the capabilities and locations of the various end points of the service.

If you put together the notion of service documents with using JSON as the payload format for a service endpoint, you're close to getting the touted programmer friendliness of RPC technologies like XML-RPC & SOAP/WSDL while still building a RESTful service which works with the Web instead of against it.

The only problem is how to deal with statically typed languages like C# and Java. These languages need the types of the objects that application will consume from a Web service defined up front. So if we could just figure out how to come up with service documents for JSON services that included the notion of a class definition, we could pretty much have our cake and eat it to with regards to getting the ease of use of an RPC system while building a RESTful service.

If this sounds interesting to you, then you should go over and read Joe Gregorio's original post on RESTful JSON and then join the restful-json mailing list. Joe's proposal is on the right path although I think he is letting his background as an editor of the Atom Publishing Protocol specification skew his thinking with regards to what developers would find most useful from a Json Publishing Protocol (JsonPub).

Now Playing: G-Unit - Beg For Mercy

Colin Paul Adams (XSLT)Trying out a new lens

Today we went to Leighton Moss, with my new (shoulder-breaking, left-wrist-straining) 300mm f/2.8 telephoto lens.

read more