<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Obsolete: New way of editing items</title>
	<atom:link href="http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/feed/" rel="self" type="application/rss+xml" />
	<link>http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/</link>
	<description>All about the web, online marketing, Sitecore, .NET and building sites...</description>
	<lastBuildDate>Tue, 07 Feb 2012 08:09:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Alex de Groot</title>
		<link>http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/comment-page-1/#comment-19</link>
		<dc:creator>Alex de Groot</dc:creator>
		<pubDate>Tue, 04 Apr 2006 09:47:00 +0000</pubDate>
		<guid isPermaLink="false">http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/#comment-19</guid>
		<description>Guess it would be good to update the CHM and the API online: http://sdn5.sitecore.net/doc/api%205.1.1/Sitecore.Data.Items.ItemEditing.EndEdit_overload_1.html</description>
		<content:encoded><![CDATA[<p>Guess it would be good to update the CHM and the API online: <a href="http://sdn5.sitecore.net/doc/api%205.1.1/Sitecore.Data.Items.ItemEditing.EndEdit_overload_1.html" rel="nofollow">http://sdn5.sitecore.net/doc/api%205.1.1/Sitecore.Data.Items.ItemEditing.EndEdit_overload_1.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lars Nielsen</title>
		<link>http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/comment-page-1/#comment-18</link>
		<dc:creator>Lars Nielsen</dc:creator>
		<pubDate>Tue, 04 Apr 2006 08:46:20 +0000</pubDate>
		<guid isPermaLink="false">http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/#comment-18</guid>
		<description>Hi

In the old days we acctually recommended use of the EditContext, but we&#039;ve changed best practices for the reasons Jakob explains;

If an error occours as the changes you&#039;ve applied so far are commited. This endangers the transaction.</description>
		<content:encoded><![CDATA[<p>Hi</p>
<p>In the old days we acctually recommended use of the EditContext, but we&#8217;ve changed best practices for the reasons Jakob explains;</p>
<p>If an error occours as the changes you&#8217;ve applied so far are commited. This endangers the transaction.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alex de Groot</title>
		<link>http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/comment-page-1/#comment-17</link>
		<dc:creator>Alex de Groot</dc:creator>
		<pubDate>Tue, 04 Apr 2006 07:04:01 +0000</pubDate>
		<guid isPermaLink="false">http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/#comment-17</guid>
		<description>Hi Jakob,

Thank you for your reply. Good to know the stuff above. Gonna figure out what&#039;s the best way at certain moments.

I&#039;ve already heard of the Security-options, definitelly interested in the SectionTimer(seen the class in the API, didn&#039;t know what to do with it.

Thank you for your information.</description>
		<content:encoded><![CDATA[<p>Hi Jakob,</p>
<p>Thank you for your reply. Good to know the stuff above. Gonna figure out what&#8217;s the best way at certain moments.</p>
<p>I&#8217;ve already heard of the Security-options, definitelly interested in the SectionTimer(seen the class in the API, didn&#8217;t know what to do with it.</p>
<p>Thank you for your information.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jakob</title>
		<link>http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/comment-page-1/#comment-16</link>
		<dc:creator>Jakob</dc:creator>
		<pubDate>Mon, 03 Apr 2006 21:39:11 +0000</pubDate>
		<guid isPermaLink="false">http://sitecore.alexiasoft.nl/2006/04/03/new-way-of-editing-items/#comment-16</guid>
		<description>Hi Alex

I can&#039;t help give you a little info with using &quot;using&quot; statements. Ole and I prefered the &quot;using&quot; method as it seems very clean and intuitive.

However you can have problems with transactions using &quot;using&quot;s as it works as a try...finally construct. 

Imagine that you update 3 fields:

using(new EditContext) {
  item.Field[&quot;1&quot;] = &quot;1&quot;;
  item.Field[&quot;2&quot;] = &quot;2&quot;;
  item.Field[&quot;3&quot;] = &quot;3&quot;;
}

and the second field throws an exception. This will actually commit the change to field 1, but not field 2 and 3.

This is why we kept the BeginEdit/EndEdit constructs.

BTW: Check out SecurityEnabler, SecurityDisabler, SecuritySwitcher and for something really useful: SectionTimer.
Just thought you should know.</description>
		<content:encoded><![CDATA[<p>Hi Alex</p>
<p>I can&#8217;t help give you a little info with using &#8220;using&#8221; statements. Ole and I prefered the &#8220;using&#8221; method as it seems very clean and intuitive.</p>
<p>However you can have problems with transactions using &#8220;using&#8221;s as it works as a try&#8230;finally construct. </p>
<p>Imagine that you update 3 fields:</p>
<p>using(new EditContext) {<br />
  item.Field["1"] = &#8220;1&#8243;;<br />
  item.Field["2"] = &#8220;2&#8243;;<br />
  item.Field["3"] = &#8220;3&#8243;;<br />
}</p>
<p>and the second field throws an exception. This will actually commit the change to field 1, but not field 2 and 3.</p>
<p>This is why we kept the BeginEdit/EndEdit constructs.</p>
<p>BTW: Check out SecurityEnabler, SecurityDisabler, SecuritySwitcher and for something really useful: SectionTimer.<br />
Just thought you should know.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

