<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<?xml-stylesheet href="http://duncan-cragg.org/css/atom.css" type="text/css" ?>
<!-- Copyright (c) 2006 Duncan Cragg -->

<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-gb">
    <id>http://duncan-cragg.org/blog/</id>
    <title>What Not How - Posts tagged 'semanticweb'</title>
    <subtitle>Duncan Cragg on Declarative Architectures</subtitle>
    <author><name>Duncan Cragg</name></author>
    <logo>/favicon.gif</logo>
    <icon>/favicon.ico</icon>
    <rights>All content including photos and images by Duncan Cragg. Copyright (c) Duncan Cragg, your rights preserved: see /CXL.html</rights>
    <generator uri="http://www.djangoproject.com">A Django Production.</generator>
    <link rel="alternate" type="text/html" href="http://duncan-cragg.org/blog/" title="What Not How" />
    <link rel="self" type="application/atom+xml" href="http://duncan-cragg.org/blog/atom/semanticweb/" />

    <updated>2009-08-13T11:43:00Z</updated>


    <entry>
        <id>http://duncan-cragg.org/blog/post/web-objects-ask-they-never-tell-rest-dialogues/</id>
        <title>Web Objects Ask, They Never Tell | The REST Dialogues</title>
        <published>2009-08-13T11:43:00Z</published>
        
        <updated>2009-08-13T11:43:00Z</updated>
        
        <link rel="alternate" type="text/html" href="http://duncan-cragg.org/blog/post/web-objects-ask-they-never-tell-rest-dialogues/" title="Web Objects Ask, They Never Tell | The REST Dialogues" />
        
        <category term="semanticweb" />
        
        <category term="architecture" />
        
        <category term="declarative" />
        
        <category term="publishsubscribe" />
        
        <category term="p2p" />
        
        <category term="app" />
        
        <category term="microformats" />
        
        <category term="dialogue" />
        
        <category term="event-driven" />
        
        <category term="rest" />
        
        <category term="scalability" />
        
        <category term="rest-observer" />
        
        <summary type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">

<p>

In an exclusive nine-part dialogue with <i>an imaginary eBay
Architect</i>, we present an accessible discussion of the 
REST vs. SOA issue.
</p><p>
Although eBay have what they call a &#39;REST&#39; interface, it is, in
fact, a 
<a href="http://duncan-cragg.org/blog/post/strest-service-trampled-rest-will-break-web-20/">STREST</a>
interface, and only works for a few of the many function calls
that they make available via SOAP.
</p><p>
In this <a href="http://duncan-cragg.org/blog/post/getting-data-rest-dialogues/">dialogue series</a>,
I argue the case for eBay to adopt a truly REST approach to
their integration API. 
</p><p>
<b>Part 9: Web Objects Ask, They Never Tell</b>
 &#160; ...
</p>

            </div>
        </summary>
        <content type="xhtml" xml:space="preserve">
            <div xmlns="http://www.w3.org/1999/xhtml">

<p>
</p><div class="summary"><p>
In an exclusive nine-part dialogue with <i>an imaginary eBay
Architect</i>, we present an accessible discussion of the 
REST vs. SOA issue.
</p><p>
Although eBay have what they call a &#39;REST&#39; interface, it is, in
fact, a 
<a href="http://duncan-cragg.org/blog/post/strest-service-trampled-rest-will-break-web-20/">STREST</a>
interface, and only works for a few of the many function calls
that they make available via SOAP.
</p><p>
In this <a href="http://duncan-cragg.org/blog/post/getting-data-rest-dialogues/">dialogue series</a>,
I argue the case for eBay to adopt a truly REST approach to
their integration API. 
</p><p>
<b>Part 9: Web Objects Ask, They Never Tell</b>
</p></div><p>
</p><p>
<b>eBay Architect:</b> You&#39;ve pushed a lot of responsibility up to the business logic and
away from the distribution technologies - away from the HTTP level.
</p><p>
As I understand it, you only want to use HTTP to implement a distributed Observer
Pattern, where clients can become servers?
</p><p>
<b>Duncan Cragg:</b> Indeed. REST can be symmetric when used in integration outside of the
Web. Further, these server-clients can have resources that do their <i>own</i> GET-ing,
with POST <i>callbacks</i>, in order to Observe other resources. I&#39;ve given many examples
of this style.
</p><p>
<b>eA:</b> So how do you program such a distributed system at the business logic level?
</p><p>
<b>DC:</b> Well you need to be able to easily express that the state of a resource depends
on the latest state - the intentions and declarations - of other resources it is Observing.
</p><p>
My vision is that you would express this business logic in a simple, powerful and
expressive declarative language.
</p><p>
<b>eA:</b> Hmmm.. Just try getting all declarative on someone who just wants his share prices
on time!  No-one in business understands such abstract concepts.
</p><p>
<b>DC:</b> Oh no? The favourite programming tool of business is the spreadsheet! 
</p><p>
And HTML is a form of declarative programming: imagine if you had to 
<a href="http://duncan-cragg.org/blog/post/right-way-to-do-ajax-is-declaratively/#comment-507">build your DOM</a>
from the top using Javascript! Or if you had to set all your styles in Javascript
instead of using declarative CSS!
</p><p>
<b>eA:</b> Well I&#39;ve seen some pretty ghastly examples of <i>those</i> two crafts! 
</p><p>
And many failed attempts to allow non-programmers or business analysts to program
directly.
</p><p>
<b>DC:</b> True, but that doesn&#39;t change the fact that most non-programmers can only 
think declaratively - they know What they want, but they haven&#39;t got much of a clue How
to get it.
</p><p>
Business people talk business rules and business data.
</p><p>
<b>eA:</b> We just can&#39;t program with them!
</p><p>
<b>DC:</b> Well, perhaps we just haven&#39;t found the best discipline of pragmatic formalisms
and methodology that will allow those rules to easily become programs.
</p><p>
It&#39;s a 
<a href="http://duncan-cragg.org/blog/post/right-way-to-do-ajax-is-declaratively/">well-supported claim</a>,
though, that declarative programming is simpler, clearer and more productive than imperative.
</p><p>
<b>eA:</b> OK - so how would you actually define these business rules?
</p><p>
<b>DC:</b> You could use a rules engine, or a DSL engine, or even XSLT - if that works for
you. There are 
<a href="http://en.wikipedia.org/wiki/XML_transformation_language">many ways to transform XML</a>.
</p><p>
<b>eA:</b> How would <i>you</i> do it?
</p><p>
<b>DC:</b> I would like to have an XML rewriting and templating system: &quot;if this XPath
or XML template matches Observed XML resource A, this one matches resource B and this
one matches myself, rewrite this and that bit of myself with these bits from A and B&quot;.
</p><p>&#160;</p><p>
<b>Web Objects Ask, They Never Tell</b>
</p><p>
<b>eA:</b> So you want to go around re-creating huge XML documents all the time?
</p><p>
<b>DC:</b> Who said anything about huge? This is another Web thing that doesn&#39;t necessarily
apply to us in REST integration: we don&#39;t need the equivalent of the giant, monolithic
HTML page. We can work in much smaller chunks.
</p><p>
I&#39;d even just call them &#39;objects&#39; rather than resources. Or &#39;Web objects&#39;, if you like. 
</p><p>
They could be little 
<a href="http://duncan-cragg.org/blog/post/content-types-and-uris-rest-dialogues/">XHTML carriers of Microformats</a>.
</p><p>
<b>eA:</b> I thought we&#39;d given up on distributing fine-grained objects back in the 
CORBA days?
</p><p>
<b>DC:</b> Ah, but this isn&#39;t trying to transparently distribute zillions of method 
calls in an RPC model. 
</p><p>
This is about optimising state transfer. Only send what you need, cache where you can,
push when something changes. Separate your data by rate of change, timeliness, cacheability.
</p><p>
<b>eA:</b> So these Web objects don&#39;t have any methods?  Because that would be RPC when
distributed?
</p><p>
<b>DC:</b> Exactly. In REST integration, the Web objects Ask, they never Tell! These Web
objects are reactive: Asking for public state, not Telling each other what to do.
</p><p>
<b>eA:</b> You mean the opposite of
<a href="http://www.pragprog.com/articles/tell-dont-ask">Tell Don&#39;t Ask</a>?
</p><p>
<b>DC:</b> Yes. As an object, you don&#39;t Tell another object How to do something, you Ask for
What you want by either simply Observing its public state or by it Observing yours, then
letting it decide How to evolve by itself. You then watch it and react or interact.
</p><p>
It&#39;s the &quot;imperative to declarative inversion&quot;: everything is turned upside-down or
inside-out when you distribute things this way!
</p><p>
<b>eA:</b> Oh yes, your &quot;inevitable inversion&quot; thing.
</p><p>
<b>DC:</b> Another indication of this inversion from the imperative object-oriented world
to the declarative ROA world is how the derided &#39;train wrecks&#39; of object-orientation now
become the essential XPaths of the object Web. 
</p><p>
You could say we have no methods, only &#39;getters&#39;, and XPath &#39;train wrecks&#39; are encouraged!
</p><p>
<b>eA:</b> Doesn&#39;t sound too safe to me - it breaks encapsulation, doesn&#39;t it?
</p><p>
<b>DC:</b> Well, it&#39;s actually safe to dig around, since the data is held in shape by a
stable, open, public schema.  You&#39;re expected to go traversing the tree.
</p><p>
And you get excellent encapsulation since Web objects are total masters of their own
destiny: they privately control the evolution of that public state. 
</p><p>
You very much retain the value of &#39;What not How&#39;; in fact, in a much better-defined way
since it&#39;s fundamentally baked in to the programming model.
</p><p>&#160;</p><p>
<b>Hyperdata as the Engine of Object State</b>
</p><p>
<b>eA:</b> But when you write &#39;train wrecks&#39; you often end up jumping from object to
object. How do your object Web XPaths do that, assuming they want to?
</p><p>
<b>DC:</b> <a href="http://en.wikipedia.org/wiki/Hyperdata">Hyperdata</a> of course! Links to links
around the Web. Objects can have their opaque UUIDs or GUID object handles encoded into
their URIs. Then objects can be wired up with XHTML links.
</p><p>
<b>eA:</b> So now your XPath transparently jumps these links?!
</p><p>
<b>DC:</b> Actually, yes! That would then allow us to dynamically break up data into more
manageable chunks without breaking the XPaths that traverse it.  
</p><p>
Also, with this approach, you still get to drill down to data like in transparent URI
paths, but you now use XPaths that are properly a part of the content layer, jumping
transparently <i>over</i> those opaque inter-object URIs.
</p><p>
<b>eA:</b> Would you use these &#39;jumping XPaths&#39; in the rewrite rules you said you wanted?
</p><p>
<b>DC:</b> Of course. Either linear XPaths, or XPath-like XML tree templates on the
left-hand side of a rewrite rule. 
</p><p>
You&#39;d start a template match on yourself, then continue on to match other objects by
jumping over links, then on and on from object to object.
</p><p>
<b>eA:</b> So I suppose any such jump to another object means you then need to start
Observing it, right?
</p><p>
<b>DC:</b> Exactly. And if hyperlinks are the only way you can find other objects to
Observe, it brings us to the following:
</p><p>
<i>Your object&#39;s next public state depends only on its current public state and the states
of those objects that are visible to it through hyperlinks.</i>
</p><p>
<b>eA:</b> Sounds a bit like the &quot;Hypertext As The Engine Of Application State&quot; constraint
of REST.
</p><p>
<b>DC:</b> Exactly! Except now that we&#39;re doing REST symmetrically - now that clients can
be servers, too - client Application State can have its own URIs!
</p><p>
<b>eA:</b> So you could re-phrase this as the even more intimidating: &quot;Hyper<i>data</i> As The
Engine Of Application <i>Resource</i> State&quot;!
</p><p>
<b>DC:</b> Well - how about just &quot;Hyperdata As The Engine Of Object State&quot;?!
</p><p>
<b>eA:</b> So do I have to wait for this link-jumping XML rewrite engine of yours to
express my business logic, in order to get &quot;Hyperdata As The Engine Of Object State&quot;?
</p><p>
<b>DC:</b> No, of course not! Use a nice, dynamic, XML-talking language, like Scala, and
follow the same principle, perhaps using a DSL.
</p><p>
<b>eA:</b> Can&#39;t you have objects that <i>aren&#39;t</i> entirely dependent on others? Like those
that represent external state?
</p><p>
<b>DC:</b> Of course. That&#39;s normal Web stuff. It&#39;s probably best to keep these &#39;pure&#39;: to
have either fully-interdependent objects driven by Hyperdata, or fully externally-driven
ones.
</p><p>&#160;</p><p>
<b>Class, Extension, Instance and Behaviour</b>
</p><p>
<b>eA:</b> Right, so we&#39;ve got these little Web-mapped XHTML Microformat objects all linked
up and watching each other in an Observer Pattern. This object&#39;s state depends on that
linked object&#39;s state according to rewrite rules or a DSL.
</p><p>
So taking this mapping to objects one last step, I presume object &#39;class&#39; maps onto an XML
schema, XHTML Microformat specification or other content type?
</p><p>
<b>DC:</b> Yes. A public grammar in some form. Domain or business classes only, of course,
not low-level classes.
</p><p>
<b>eA:</b> So, does each standard Web object class or type have a standard set of rules
guiding its evolution or behaviour?
</p><p>
<b>DC:</b> Yes. If you see something and recognise its type, you can attempt to interact
with it according to its public specification, and it should, but needn&#39;t, react.
</p><p>
The public specification can define the expected behaviour in the RFC language of MUST
and SHOULD, like AtomPub. Or it can define it in rewrite rules!
</p><p>
<b>eA:</b> So then, how do I add my own business rules to a content type or &#39;class&#39;, if its
behaviour is standardised and meant to be stable and predictable?
</p><p>
<b>DC:</b> There are two ways you can make use of a generic standard, and both are forms of
layering or abstraction: 
</p><p>
You can &#39;mash up&#39; standard component instances with declarative configuration - just
using them as they are for your domain.
</p><p>
Alternatively, you can extend or subclass their standard structures and behaviour to
become themselves more domain-specific.  For example, rules can be overridden or their
right-hand sides merged.
</p><p>
Again, think of how AtomPub can be <i>used</i> in any domain that looks like time-ordered lists
of content; and how you can <i>extend</i> AtomPub without breaking unextended clients or servers.
</p><p>&#160;</p><p>
<b>The REST Observer Pattern</b>
</p><p>
<b>eA:</b> I think you need a memorable name for your symmetric-REST, &quot;Hyperdata As The
Engine Of Object State&quot; architectural style!
</p><p>
<b>DC:</b> How about the &quot;REST Observer Pattern&quot;?
</p><p>
<b>eA:</b> But a Pattern has to be a retro-fit to existing behaviour, and &quot;REST Observer&quot;
is quite new.
</p><p>
<b>DC:</b> I mean REST .. [<i>DC does double bunnie ears</i>] &quot;Observer Pattern&quot;!
</p><p>
<b>eA:</b> Have you got any worked examples of the REST Observer Pattern?
</p><p>
<b>DC:</b> Will have soon...
</p><p>
<i>(c) 2006-2009 Duncan Cragg</i>
</p><p>&#160;</p><p>
Coming soon: Worked examples of the REST Observer Pattern.
</p><p>
<i>Note that the opinions of our imaginary eBay Architect don&#39;t
necessarily represent or reflect in any way the official
opinions of eBay or the opinions of anyone at eBay.</i>
</p><p>
<i>Indeed, I can&#39;t guarantee that the opinions of our real blogger
necessarily represent or reflect in any way the official
opinions of Roy Fielding...</i>

</p>

            </div>
        </content>
    </entry>
    
    <entry>
        <id>http://duncan-cragg.org/blog/post/microformats-challenge-web-feeds-and-web-apis/</id>
        <title>Microformats Challenge Web Feeds and Web APIs!</title>
        <published>2006-06-07T19:10:00Z</published>
        
        <updated>2006-06-07T19:10:00Z</updated>
        
        <link rel="alternate" type="text/html" href="http://duncan-cragg.org/blog/post/microformats-challenge-web-feeds-and-web-apis/" title="Microformats Challenge Web Feeds and Web APIs!" />
        
        <category term="semanticweb" />
        
        <category term="xtech" />
        
        <category term="declarative" />
        
        <category term="web2.0" />
        
        <category term="publishsubscribe" />
        
        <category term="app" />
        
        <category term="microformats" />
        
        <category term="microsummaries" />
        
        <category term="rest" />
        
        <category term="atom" />
        
        <summary type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">

<p>

<a href="http://microformats.org">Microformats</a> are subversive:
they not only challenge the approach of full-blown Semantic Web
approaches, but even question fundamental Web 2.0 building
blocks such as Web Feeds and Web APIs.
</p><p>
I recently attended
<a href="http://xtech06.usefulinc.com/">XTech 2006</a>,
where there were a few talks related to Microformats.
</p><p>
After summarising these talks, I&#39;ll finish with my shocking
revelations about the subversive nature of Microformats!
 &#160; ...
</p>

            </div>
        </summary>
        <content type="xhtml" xml:space="preserve">
            <div xmlns="http://www.w3.org/1999/xhtml">

<p>
</p><div class="summary"><p>
<a href="http://microformats.org">Microformats</a> are subversive:
they not only challenge the approach of full-blown Semantic Web
approaches, but even question fundamental Web 2.0 building
blocks such as Web Feeds and Web APIs.
</p><p>
I recently attended
<a href="http://xtech06.usefulinc.com/">XTech 2006</a>,
where there were a few talks related to Microformats.
</p><p>
After summarising these talks, I&#39;ll finish with my shocking
revelations about the subversive nature of Microformats!
</p></div><p>
<b><a href="http://xtech06.usefulinc.com/schedule/detail/190">Microformats from the Ground Up</a></b>
</p><p>
<a href="http://theryanking.com/">Ryan King</a> and 
<a href="http://suda.co.uk/">Brian Suda</a> from 
<a href="http://technorati.com/">Technorati</a> presented
a half-day tutorial.
</p><p>
You can describe social networks, calendars and various other
semantic relationships by annotating page elements or embedding
small XML structures into your page according to a Microformat spec.
</p><p>
Microformats take Declarative or semantic markup (e.g. in
XHTML) to the next logical level.  Microformats have been
called the &#39;lower case Semantic Web&#39;, because they fill the
need for a lightweight set of conventions for data in Web pages
that transcends the merely renderable.
</p><p>
HTML has a number of extension points that make this kind
of thing easier. For example, the &#39;rel&#39; and &#39;rev&#39; attributes 
on a link (say what type of link it is - maybe a tag); the
&#39;class&#39; attributes (used for CSS but can also carry add-on
semantics); the &#39;profile&#39; element (say what kind of thing
the whole document represents).
</p><p>
Microformats examples include 
<a href="http://microformats.org/wiki/rel-tag">rel-tag</a> (for tagging your blog entries in Technorati, etc),
<a href="http://microformats.org/wiki/hcard">hCard</a> (like vCard-on-a-page),
<a href="http://microformats.org/wiki/hcalendar">hCalendar</a> (like iCalendar-on-a-page), 
<a href="http://microformats.org/wiki/xoxo">XOXO</a> (outlines) and
<a href="http://gmpg.org/xfn/">XFN</a> (social networking).
Technorati have an hCalendar <a href="http://feeds.technorati.com/event/">subscription service</a>.
</p><p>
However, the one that stood out for me was
<a href="http://microformats.org/wiki/hatom">hAtom</a>, with which you can
publish a blog and then let feed readers poll the actual page.
They can read the hAtom markup and treat it as an Atom feed.
</p><p>
<a href="http://theryanking.com/presentations/2006/xtech/tutorial/">Slides here</a>.
</p><p>&#160;</p><p>
<b><a href="http://xtech06.usefulinc.com/schedule/detail/148">The Intelligent Design of Microformats</a></b>
</p><p>
<a href="http://theryanking.com/">Ryan King</a> also presented a talk on
the motivation and style of the Microformats effort.
</p><p>
There is no official standards body defining
<a href="http://microformats.org">Microformats</a>, just an 
&quot;Open Source&quot;-style engineering effort, which follows the
following list of Worthy Engineering Principles: &quot;Rough
Consensus and Working Code&quot;, &quot;Paving the Cowpath&quot;, &quot;Keep It
Simple and Stupid&quot;, &quot;You Ain&#39;t Gonna Need It&#39; and &quot;Don&#39;t Repeat
Yourself&quot;.
</p><p>
<a href="http://xtech06.usefulinc.com/schedule/paper/148">Paper here</a>.
</p><p>&#160;</p><p>
<b><a href="http://xtech06.usefulinc.com/schedule/detail/201">Microsummaries in Firefox and on the Web</a></b>
</p><p>
Myk Melez gave a presentation about
<a href="http://wiki.mozilla.org/Microsummaries">Microsummaries</a> in the
up-coming Firefox releases.
</p><p>
To <a href="http://xtech06.usefulinc.com/schedule/detail/201">quote</a>:
</p><blockquote class="others-content"><div><p>Microsummaries are regularly-updated compilations of the most
important and timely information on web pages. For example:
</p><ul>
<li>current stock price and movement for a company profile: &quot;GOOG: 406.74 + 0.58&quot;</li>
<li>latest headline for a news site: &quot;BBC: US dismisses Iran attack claims&quot;</li>
<li>highest bid and time remaining for an auction item: &quot;Godzilla DVD: $15 / 2 minutes left&quot;</li>
</ul><p>
</p></div></blockquote><p>
One way to create this information is to link
(&#39;rel=&quot;microsummary&quot;&#39;) from a page to its associated
Microsummary document. You can also use XSLT to build the
summary on the client. Both approaches struck me as clumsy.
</p><p>
I commented that it would be more Microformat-like to allow
embedded markup (just annotate the Microsummary information
right in the page; perhaps call it &#39;hSummary&#39;?).
</p><p>
Myk used the bandwidth and page generation cost argument
against that, but good XHTML pages should be very lightweight,
and there are various AJAX techniques that can assemble heavier
pages.
</p><p>
The current manifestation of the idea is to write this summary
on a corresponding bookmark button in the chrome.
</p><p>
Allowing just bookmark buttons seems rather restricted to me.
I&#39;d be happy with a whole page in its own tab (or a widget in
an Ajax desktop).
</p><p>
A drag-and-drop prototype was also shown, where you visually
mark up the parts of the source page you want summarised.  I
commented that a good extension of that would be dragging
across elements to a whole new page, whose construction would be
dependent on the information in one or more source pages.
</p><p>
Myk didn&#39;t jump up and down with joy at my suggestions, so I
guess we&#39;ll have to wait before we get Microsummaries written
into Web pages that generate more Web pages.
</p><p>
<a href="http://developer.mozilla.org/presentations/xtech2006/microsummaries/">Slides here</a>;
<a href="http://wiki.mozilla.org/Microsummaries">Paper here</a>.
</p><p>&#160;</p><p>
<b><a href="http://xtech06.usefulinc.com/schedule/detail/58">RDFa: The Easy Way to Publish Your Metadata</a></b>
</p><p>
Of course, the Semantic Web folk have their own Microformat
approaches, including this one.
</p><p>
To quote from their <a href="http://xtech06.usefulinc.com/schedule/paper/58">paper</a>:
</p><blockquote class="others-content"><div><p>
The approach taken by RDFa is that ultimately any RDF structure
should be representable. This means that instead of having
to &#39;codify&#39; each format to describe how it must be marked up,
we simply provide a set of rules that explain how any RDF can
be marked up, and than any RDF &#39;language&#39; can be used.
</p></div></blockquote><p>
The &#39;a&#39; stands for &#39;attribute&#39;: RDF encoded as attributes in XML.
</p><p>
The example shown was FoaF, whose Microformat competition is
<a href="http://gmpg.org/xfn/">XFN</a> and <a href="http://microformats.org/wiki/hcard">hCard</a>.
You can use attributes like <code>&lt;link rel=&quot;foaf:mbox&quot;&gt;</code>,
<code>&lt;span property=&quot;foaf:name&quot;&gt;</code>, <code>&lt;span property=&quot;foaf:phone&quot;&gt;</code>
to encode RDF triple information at various points around your
document.
</p><p>
RDFa has some arguable benefits over their competition, but I
don&#39;t see why both sides shouldn&#39;t get along and share ideas.
And, indeed, why the other alternatives 
(<a href="http://www.structuredblogging.org/">structured blogging</a>,
<a href="http://research.talis.com/2005/erdf/wiki/Main/RdfInHtml">embedded RDF</a>)
shouldn&#39;t all find a place, too. There is a 
<a href="http://www.bnode.org/archives2/58">comparison here</a>.
Another speaker at XTech, <a href="http://xtech06.usefulinc.com/schedule/speaker/86">Uche Ogbuji</a>, has also
<a href="http://www.xml.com/pub/a/2006/04/26/microformats-grddl-rdfa-nvdl.html">discussed</a>
some of these issues.
</p><p>&#160;</p><p>
<b>Web 2.0 Centraal</b>
</p><p>
Microformats not only challenge the Semantic Web, they even
challenge such basic Web 2.0 technologies as Web feeds and Web
APIs.
</p><p>
Shouldn&#39;t we be subscribing to and interacting with semantic
Web pages (note the lower case &#39;s&#39;!), not using invisible Web
Feeds and Web APIs?  Technorati think so: they are 
<a href="http://technorati.com/weblog/2006/05/108.html">leading the way</a>
in searching and subscribing to Microformats.
</p><p>
The redundancy of Atom itself (and feeds in general) has been
<a href="http://hsivonen.iki.fi/need-atom/">remarked upon</a> before.
Further, since we&#39;re using REST in the Atom Publishing
Protocol, why not use the same protocol to publish directly to
an hAtom annotated site? (e.g., just POST a new article to your
own blog&#39;s main page!)  Web &#39;API&#39;s are redundant when our pages
are just XML data anyway.
</p><p>
Writing data pages instead of document pages, then allowing
those pages to be updated and then subscribed to, is the future
of the Web: it&#39;s Web 2.0 Centraal.
</p><p>
The new lightweight, Declarative, Microformat-rich XHTML pages
we&#39;re going to be generating can be polled just as Web feeds
are, and events made from their changes. Then re-presented via
Ajax in dynamic pages.  Such standardised page formats and
micro-formats 
<a href="http://duncan-cragg.org/blog/post/strest-service-trampled-rest-will-break-web-20/">should also accept standardised POSTs</a>
where appropriate.
</p><p>
Microformats represent some first steps towards the Data Web
replacing the Document Web.  Although there has been some
thought given to extracting full-blown Semantic Web data from
Microformats, there&#39;s a significant chance that this bottom-up,
simple, minimal, <i>change-aware</i> (i.e., updateable,
subscribable) approach may teach the Semantic Web practitioners
a thing or two about the Worthy Engineering Principles that
enable the social and technical proliferation of a good idea.
</p><p>
Standardising common formats and structures is a precursor to 
this two-way, dynamic Data Web. Both the bottom-up
practitioners of Microformats and the top-down practitioners of
the Semantic Web have much to learn from each other on this path.
</p><p>&#160;</p><p>

</p>

            </div>
        </content>
    </entry>
    
    <entry>
        <id>http://duncan-cragg.org/blog/post/welcome-to-what-not-how/</id>
        <title>Welcome to &#39;What Not How&#39;</title>
        <published>2006-03-22T17:00:48Z</published>
        
        <updated>2006-03-22T17:00:48Z</updated>
        
        <link rel="alternate" type="text/html" href="http://duncan-cragg.org/blog/post/welcome-to-what-not-how/" title="Welcome to &#39;What Not How&#39;" />
        
        <category term="semanticweb" />
        
        <category term="architecture" />
        
        <category term="declarative" />
        
        <category term="web2.0" />
        
        <category term="socialsoftware" />
        
        <category term="p2p" />
        
        <category term="event-driven" />
        
        <category term="rest" />
        
        <summary type="xhtml">
            <div xmlns="http://www.w3.org/1999/xhtml">

<p>

Declarative Architectures focus on the What, not the How, of programming.  The How has dominated the field - perhaps 80% of programming is done in the traditional Imperative style, where we tell the computer How to do a task in explicit steps.
</p><p>
I&#39;d like to show in this blog how Declarative Architectures and technologies are not just an interesting sideshow to the main Imperative attraction, but a complete and powerful programming alternative in their own right - indeed, one which has already dominated certain fields.  
</p><p>
Imagine being able to simply express What we want the computer to do - to give it constraints and rules - then let it work out for itself How to achieve our goals.
</p><p>
I believe that saying What, not How, will become the dominant paradigm in programming.
 &#160; ...
</p>

            </div>
        </summary>
        <content type="xhtml" xml:space="preserve">
            <div xmlns="http://www.w3.org/1999/xhtml">

<p>
</p><div class="summary"><p>
Declarative Architectures focus on the What, not the How, of programming.  The How has dominated the field - perhaps 80% of programming is done in the traditional Imperative style, where we tell the computer How to do a task in explicit steps.
</p><p>
I&#39;d like to show in this blog how Declarative Architectures and technologies are not just an interesting sideshow to the main Imperative attraction, but a complete and powerful programming alternative in their own right - indeed, one which has already dominated certain fields.  
</p><p>
Imagine being able to simply express What we want the computer to do - to give it constraints and rules - then let it work out for itself How to achieve our goals.
</p><p>
I believe that saying What, not How, will become the dominant paradigm in programming.
</p></div><p>
</p><p>
<b>What?</b>
</p><p>
Declarative Architectures are about data: documents, assertions, truths, rules, tables, structures, state, bits. Data storage, changes, constraints, transformation, sharing, querying, fetching, interaction, presentation, subscription, tagging.  
</p><p>
In summary, we talk about stuff, changes to stuff and rules governing stuff. Not processes, actions, jobs or functions.
</p><p>
It&#39;s amazing how many interesting Declarative technologies are actually out there already - especially given that most programming is Imperative.  They tend to go unnoticed; subservient to their Imperative masters.
</p><p>
Here are some examples from our daily work life (assuming you work in computing!):
</p><ul>
<li>    XML: XSL, XPath, XQuery, Schematron, RelaxNG, Xcerpt, XForms, XRules</li>
<li>    Other MLs: XUL, XForms, XAML, YAML, ...</li>
<li>    Relational DBs, SQL</li>
<li>    Publish / Subscribe: &#39;this has changed&#39;, not &#39;do this&#39;</li>
<li>    Observer Pattern, MVC (maybe)</li>
<li>    EII: architectures for business data and events &#39;landscapes&#39;</li>
<li>    JCache, SpiritCache: updateable, cascadable caches, &#39;active queries&#39;</li>
<li>    Business Rule programming</li>
<li>    Spreadsheets</li>
<li>    JNDI</li>
<li>    Makefiles, Ant; Source Control: versioning, deltas</li>
</ul><p>
What all these have in common is that they are purely data- and event-driven or oriented. Not a thread in sight (if used properly). No method calls. Just querying, fetching, subscribing, tagging, declaring truths and rules, making changes to stuff, etc.
</p><p>
On the &#39;Net, all the dominant technologies are actually Declarative, not Imperative:
</p><ul>
<li>    DNS</li>
<li>    REST: URIs, HTTP</li>
<li>    Mail, News: SMTP, NNTP</li>
<li>    Instant Messaging; VoIP</li>
<li>    P2P: BitTorrent, Gnutella</li>
<li>    Multimedia: streaming, multicasting, PeerCast</li>
<li>    Compression, Information Theory, Cryptography, Trust</li>
</ul><p>
Again, the same things are happening: querying, fetching, subscribing, tagging, declaring truths and rules, making changes to stuff. 
</p><p>
Email (SMTP) is a great example of a Declarative Architecture, with its routing and transformation rules and self-addressed store-and-forward transmission. And, in fact, much the same applies to the rest of this list, where the Declarative aspects may include network querying and data events.  
</p><p>
Imperative protocols such as RPC, RMI, CORBA, SOAP, etc. haven&#39;t had anywhere near the impact of their Declarative cousins.
</p><p>
Now, consider the &#39;Web 2.0&#39; technologies:
</p><ul>
<li>    HTTP/1.1, XHTML</li>
<li>    Metadata: RSS, RDF, Atom, MicroFormats, tagging engines</li>
<li>    REST Web APIs for XML metadata (including RSS/Atom)</li>
<li>    DHTML; AJAX (when used as DOM updater), mod_pubsub</li>
<li>    Identity; Single Sign-On Web-APIs: OpenID</li>
</ul><p>
This is a wonderful list of Declarative approaches (as long as we use REST APIs and talk about Resources, not SOAP ones talking about functions and jobs!).
</p><p>
So far, I&#39;ve mentioned technologies that have attached themselves to the periphery of Imperative programming, where the actual behaviour is still driven procedurally, or How-like. 
</p><p>
However, Declarative programming itself has a history at least as long as Imperative programming,
and includes:
</p><ul>
<li>    Lisp, Rewriting systems</li>
<li>    Prolog, Deductive Databases, The Semantic Web</li>
<li>    Rule-Driven systems, Knowledge Engineering, Cyc, Ontologies</li>
<li>    Tuple Spaces, Javaspaces</li>
<li>    Neural Networks, Genetic Algorithms, Cellular Automata</li>
<li>    Example-based programming: Subtext</li>
</ul><p>
We can, if we choose, write 100% Declarative systems (even down to asynchronous or event-driven operating systems and hardware).
</p><p>&#160;</p><p>
<b>Wherefore?</b>
</p><p>
In this blog, I&#39;ll be pointing out opportunities where we can benefit from the Declarative approach when it&#39;s ready. 
</p><p>
Perhaps the biggest example of a Declarative Architecture that is ready to benefit us now is the Web.  In contrast, the Imperative Service-Oriented Architecture model and so-called &#39;Web&#39; Services are still weaning; still trying to get a life free of their huge standards consortia. REST, in its simplicity, ubiquity and straightforward usefulness is orders of magnitude more deployed than SOAP will likely ever be.
</p><p>
This blog is for discussing the common problems and solutions in Declarative technologies; seeing if ideas in one area can be used in another and seeing if we can distill their lessons and their approaches.  
</p><p>
Ultimately, heading towards a unified, distributed Declarative programming technology landscape. 
</p><p>
I hope you&#39;ll join me in my explorations into Declarative Architectures, in particular if you&#39;re interested in the currently most promising segment I mentioned: Web 2.0, and its application in Social Software. 
</p><p>
Or the currently massive but little-mentioned segment: Peer-to-Peer, and its application to the disruption of, well you know, all those big technological and commercial hierarchies...
</p><p>

</p>

            </div>
        </content>
    </entry>
    
</feed>

