<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Undoing changes in CubicWeb (CubicWeb&#39;s Forge) RSS Feed</title>
    <description></description>
    <link>http://www.cubicweb.org/blogentry/2223885</link>
<item>
<guid isPermaLink="true">http://www.cubicweb.org/blogentry/2223885</guid>
  <title>Undoing changes in CubicWeb</title>
  <link>http://www.cubicweb.org/blogentry/2223885</link>
  <description>&lt;p&gt;Many desktop applications offer the possibility for the user to
undo the recent changes : a similar &lt;em&gt;undo feature&lt;/em&gt; has now been
integrated into the CubicWeb framework.&lt;/p&gt;
&lt;p&gt;Because a semantic web application and a common desktop
application are not the same thing at all, especially as far as
undoing is concerned, we will first introduce &lt;em&gt;what&lt;/em&gt; is the &lt;em&gt;undo
feature&lt;/em&gt; for now.&lt;/p&gt;
&lt;div class=&quot;section&quot; id=&quot;what-s-undoing-in-a-cubicweb-application&quot;&gt;
&lt;h3&gt;&lt;a&gt;What&#39;s &lt;em&gt;undoing&lt;/em&gt; in a CubicWeb application&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;A CubicWeb application acts upon an &lt;em&gt;Entity-Relationship&lt;/em&gt; model,
described by a schema. This ensures some data integrity
properties. It also implies that changes are made by group called &lt;em&gt;transaction&lt;/em&gt; : so as to insure the data integrity the transaction is completely applied &lt;em&gt;or&lt;/em&gt; none of it is applied.
What may appear as a simple atomic action to a user can actually consist in several actions for the framework. The end-user has no need to know the details of all actions in those transactions. Only the so-called &lt;em&gt;public&lt;/em&gt; actions will appear in the description of the an undoable transaction.&lt;/p&gt;
&lt;p&gt;Lets take a simple example: posting a &amp;quot;comment&amp;quot; for a blog entry will create the entity itself and the link to the blog entry.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;the-undo-feature-for-cubicweb-end-users&quot;&gt;
&lt;h3&gt;&lt;a&gt;The &lt;em&gt;undo feature&lt;/em&gt; for CubicWeb end-users&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;For now there are two ways to access the &lt;em&gt;undo feature&lt;/em&gt; when
it has been activated in the instance configuration file with
the option &lt;em&gt;undo-support=yes&lt;/em&gt;. Immediately after having done something the undo** link appears in the &amp;quot;creation&amp;quot; message.&lt;/p&gt;
&lt;img alt=&quot;Screenshot of the undo link in the message&quot; class=&quot;align-center&quot; src=&quot;/file/2198577?vid=download&quot; /&gt;
&lt;p&gt;Otherwise, one can access at any time the &lt;strong&gt;undo-history view&lt;/strong&gt;
accessible from the start-up page.&lt;/p&gt;
&lt;img alt=&quot;Screenshot of the undo link in the message&quot; class=&quot;align-center&quot; src=&quot;/file/2198579?vid=download&quot; /&gt;
&lt;p&gt;This view shows the transactions, and each provides its own
&lt;strong&gt;undo&lt;/strong&gt; link. Only the transactions the user has permissions to
see and undo will be shown.&lt;/p&gt;
&lt;img alt=&quot;Screenshot of the **undo** link in the message&quot; class=&quot;align-center&quot; src=&quot;/file/2198582?vid=download&quot; /&gt;
&lt;p&gt;If the user attempts to undo a transaction which can&#39;t be undone or whose undoing fails, then a message will explain the situation and
no partial undoing will be left behind.&lt;/p&gt;
&lt;/div&gt;
&lt;div class=&quot;section&quot; id=&quot;what-s-next&quot;&gt;
&lt;h3&gt;&lt;a&gt;What&#39;s next&lt;/a&gt;&lt;/h3&gt;
&lt;p&gt;The undo feature is functional but the interface and configuration
options are quite limited. One major, planned, improvement would be enable the user to filter which transactions or actions
he sees in the &lt;em&gt;undo-history view&lt;/em&gt;. Another critical
improvement would be to selectively enable the undo feature on  part of the entity-relationship schema to avoid storing too much
data and reduce the underlying overhead.&lt;/p&gt;
&lt;p&gt;Feedback on this undo feature for specific CubicWeb applications is welcome.
More detailed information regarding the &lt;em&gt;undo feature&lt;/em&gt; will be published in the &lt;a class=&quot;reference&quot; href=&quot;http://docs.cubicweb.org&quot;&gt;CubicWeb book&lt;/a&gt; when the patches make it through the review process.&lt;/p&gt;
&lt;/div&gt;
</description>
  <dc:date>2012-02-29T18:06-01:00</dc:date>
  <dc:creator>Anthony Truchet</dc:creator>
</item>
  </channel>
</rss>