[Yanel-commits] rev 31544 - public/yanel/trunk/src/realms/yanel-website/content/en/documentation/resources

michi at wyona.com michi at wyona.com
Sun Feb 10 22:31:09 CET 2008


Author: michi
Date: 2008-02-10 22:31:08 +0100 (Sun, 10 Feb 2008)
New Revision: 31544

Modified:
   public/yanel/trunk/src/realms/yanel-website/content/en/documentation/resources/modifiable.html
Log:
docu on modifiable re Yulup added

Modified: public/yanel/trunk/src/realms/yanel-website/content/en/documentation/resources/modifiable.html
===================================================================
--- public/yanel/trunk/src/realms/yanel-website/content/en/documentation/resources/modifiable.html	2008-02-10 18:00:52 UTC (rev 31543)
+++ public/yanel/trunk/src/realms/yanel-website/content/en/documentation/resources/modifiable.html	2008-02-10 21:31:08 UTC (rev 31544)
@@ -6,8 +6,14 @@
 </head>
 <body>
 <h1>Update (Edit/Modify) a resource</h1>
-<p>
-There are all kind of different ways on how to make a resource modifiable.
-</p>
-</body>
-</html>
+<p>A Yanel resource which allows to edit/update/modify the underlying data is called a modifiable resource. The actual data access (read/write) is specific to the resource (see <a href="viewable.html">Read/View a resource</a>). Yanel provides generic interfaces (Modifiable and Introspectable) in order to make the integration of common editing tools (for example Yulup, OpenOffice or TinyMCE) as easy as possible.<br/></p><h2>Yulup/Neutron<br/></h2>Yulup has the Neutron protocol implemented and allows editing of Plain-Text, HTML, XHTML and arbitrary XML with XSLT stylesheets applied documents in source and WYSIWYG mode. Yulup is using a Neutron introspection document as entry point. An introspection document can be specified within the head of an (X)HTML page, e.g.<br/><br/>&lt;html<span class="attribute-name"> xmlns</span>=<span class="attribute-value">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;<br/>  &lt;head&gt;<br/>    &lt;link <span class="attribute-name">href!
 </span>=<span class="attribute-value">&quot;my-introspection-document.xml&quot; </span><span class="attribute-name">type</span>=<span class="attribute-value">&quot;application/neutron+xml&quot; </span><span class="attribute-name">rel</span>=<span class="attribute-value">&quot;neutron-introspection&quot;</span><span class="attribute-name">/</span>&gt;<br/><br/>Yulup does not care how this introspection document is being generated, which means it can be a static file on the server side or it can be dynamically generated by a server side web-application. A sample introspection document looks as follows<br/><br/>&lt;introspection<span class="attribute-name"> xmlns</span>=<span class="attribute-value">&quot;http://www.wyona.org/neutron/2.0&quot;</span>&gt;<br/>  &lt;resource name=&quot;My Article&quot;&gt;<br/>    &lt;edit mime-type=&quot;application/xhtml+xml&quot;&gt;<br/>      &lt;checkout url=&quot;article.html?usecase=checkout&quot; method=&quot;GET&quot;/&gt;<br/>!
       &lt;/checkin url=&quot;article.html?usecase=checkin!
 &quot; m
ethod=&quot;PUT&quot;/&gt;<br/>    &lt;/edit&gt;<br/>  &lt;/resource<br/>&lt;/introspection&gt;<br/><br/>As described within the introduction a Yanel resource is hiding the actual data access and Yanel itself has no clue how to update the data associated with the resource. Hence it makes sense that the resource itself has a mean to provide an introspection document. This can be accomplished by implementing the Introspectable interface. The Introspectable interface of a resource can be triggered by appending the query string ?yanel.resource.usecase=introspection to the URL associated with the resource, e.g.<br/><br/>&lt;html<span class="attribute-name"> xmlns</span>=<span class="attribute-value">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt;<br/>
+  &lt;head&gt;<br/>
+    &lt;link <span class="attribute-name">href</span>=<span class="attribute-value">&quot;?yanel.resource.usecase=introspection&quot; </span><span class="attribute-name">type</span>=<span class="attribute-value">&quot;application/neutron+xml&quot; </span><span class="attribute-name">rel</span>=<span class="attribute-value">&quot;neutron-introspection&quot;</span><span class="attribute-name">/</span>&gt;<br/><br/>In most cases the resource will generate an introspection document as follows<br/><br/>&lt;introspection<span class="attribute-name"> xmlns</span>=<span class="attribute-value">&quot;http://www.wyona.org/neutron/2.0&quot;</span>&gt;<br/>
+  &lt;resource name=&quot;The data of my resource&quot;&gt;<br/>
+    &lt;edit mime-type=&quot;application/xhtml+xml&quot;&gt;<br/>
+      &lt;checkout url=&quot;?yanel.resource.viewid=source&amp;yanel.resource.usecase=checkout&quot; method=&quot;GET&quot;/&gt;<br/>
+      &lt;/checkin url=&quot;?yanel.resource.usecase=checkin&quot; method=&quot;PUT&quot;/&gt;<br/>
+    &lt;/edit&gt;<br/>
+  &lt;/resource<br/>
+&lt;/introspection&gt;<br/><br/>So by implementing the Introspectable interface, Yulup (or any other editing tool supporting the Neutron protocol) will be able to discover the entry points for reading and writing content.<br/><br/>The actual reading and writing can be done generically by implementing the Modifiable interface. In the case of reading one differentiates between open and checkout. To open means the data is being retrieved by the client, but no lock on the server side is being set. To checkout means the data is being retrieved by the client and a lock on the server side is being set/acquired.<br/><h2>Yulup/APP (Atom Publishing Protocol)</h2>Yulup has APP (Atom Publishing Protocol) implemented. Yulup is using an Atom service document as entry point. A service document can be specified within the head of an (X)HTML page, e.g.<br/><br/>&lt;html<span class="attribute-name"> xmlns</span>=<span class="attribute-value">&quot;http://www.w3.org/1999/xhtml&quot;</span>&gt!
 ;<br/>  &lt;head&gt;<br/>    &lt;link <span class="attribute-name">href=&quot;my-service-document.xml&quot; type</span>=<span class="attribute-value">&quot;application/atomsvc+xml&quot; </span><span class="attribute-name"><span class="attribute-value"><span class="attribute-name">rel</span>=<span class="attribute-value">&quot;service&quot;</span><span class="attribute-name">/</span>&gt;</span></span></body>
+</html>
\ No newline at end of file



More information about the Yanel-commits mailing list