<?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"
	>
<channel>
	<title>Comments on: On using sequences and tasks with the DrupalService</title>
	<atom:link href="http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice/feed" rel="self" type="application/rss+xml" />
	<link>http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice</link>
	<description>Opensource initiative by Dutch interactive agency dpdk.</description>
	<pubDate>Thu, 09 Feb 2012 01:09:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: Rolf Vreijdenberger</title>
		<link>http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice#comment-311</link>
		<dc:creator>Rolf Vreijdenberger</dc:creator>
		<pubDate>Thu, 11 Nov 2010 17:26:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpdk.nl/opensource/?p=426#comment-311</guid>
		<description>Hey SP,
the resource itself is not destroyed, only the local reference to the resource in the specific task. It's a memory cleanup thing. The DrupalProxy reference is nulled, so the Task does not point to it anymore. The drupalProxy instance itself is not touched at all.

We're about to release (17th of november) the DrupalInvokeTask which will make all other tasks obsolete and will allow you to sequence all of your drupal calls with the help of only this task.

a little example with some demo code for the adobe user group xl event (www.adobeusergroupxl.nl):

sequence.add(new DrupalInvokeTask(drupal, "system", "connect"));			sequence.add(new CallBackTask(drupal.setRemoteCallId, "data"));
sequence.add(new DrupalInvokeTask(drupal, "node", "get", 66));
// add a pause for the demo!
sequence.add(new CallBackTask(sequence.pause));
/*
 * tag the next call to node.get with an id of "picture". We are calling node.get again but with a different purpose. 
 * the handler for all node.get calls is the same however.
 * the remote call id allows us to distinguish between multiple calls to the same method (we could also distinguish on the node id: nid)
 */
sequence.add(new CallBackTask(drupal.setRemoteCallId, "picture"));
// node 122 is predefined and is a cck made node in drupal that has an extra field with a url of a picture in it.
sequence.add(new DrupalInvokeTask(drupal, "node", "get", 122, new Array("nid", "type", "field_picture")));
sequence.add(new CallBackTask(sequence.pause));
// it is often not needed to tag the call, but it is easy for debugging
sequence.add(new CallBackTask(drupal.setRemoteCallId, "sleep 3"));
sequence.add(new CallBackTask(write, "sleep for 3 seconds (timout test)"));

take care</description>
		<content:encoded><![CDATA[<p>Hey SP,<br />
the resource itself is not destroyed, only the local reference to the resource in the specific task. It&#8217;s a memory cleanup thing. The DrupalProxy reference is nulled, so the Task does not point to it anymore. The drupalProxy instance itself is not touched at all.</p>
<p>We&#8217;re about to release (17th of november) the DrupalInvokeTask which will make all other tasks obsolete and will allow you to sequence all of your drupal calls with the help of only this task.</p>
<p>a little example with some demo code for the adobe user group xl event (www.adobeusergroupxl.nl):</p>
<p>sequence.add(new DrupalInvokeTask(drupal, &#8220;system&#8221;, &#8220;connect&#8221;));			sequence.add(new CallBackTask(drupal.setRemoteCallId, &#8220;data&#8221;));<br />
sequence.add(new DrupalInvokeTask(drupal, &#8220;node&#8221;, &#8220;get&#8221;, 66));<br />
// add a pause for the demo!<br />
sequence.add(new CallBackTask(sequence.pause));<br />
/*<br />
 * tag the next call to node.get with an id of &#8220;picture&#8221;. We are calling node.get again but with a different purpose.<br />
 * the handler for all node.get calls is the same however.<br />
 * the remote call id allows us to distinguish between multiple calls to the same method (we could also distinguish on the node id: nid)<br />
 */<br />
sequence.add(new CallBackTask(drupal.setRemoteCallId, &#8220;picture&#8221;));<br />
// node 122 is predefined and is a cck made node in drupal that has an extra field with a url of a picture in it.<br />
sequence.add(new DrupalInvokeTask(drupal, &#8220;node&#8221;, &#8220;get&#8221;, 122, new Array(&#8221;nid&#8221;, &#8220;type&#8221;, &#8220;field_picture&#8221;)));<br />
sequence.add(new CallBackTask(sequence.pause));<br />
// it is often not needed to tag the call, but it is easy for debugging<br />
sequence.add(new CallBackTask(drupal.setRemoteCallId, &#8220;sleep 3&#8243;));<br />
sequence.add(new CallBackTask(write, &#8220;sleep for 3 seconds (timout test)&#8221;));</p>
<p>take care</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Speechless pumpkin</title>
		<link>http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice#comment-309</link>
		<dc:creator>Speechless pumpkin</dc:creator>
		<pubDate>Sat, 30 Oct 2010 22:33:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpdk.nl/opensource/?p=426#comment-309</guid>
		<description>Arrgh :).
Now I see something. After rereading my post. DrupalService and DrupalProxy. I got them mixed up. 
So I assume drupalService (outdated now, i suppose) wasn't so brutal in it's destroy method, and was reusable after one task?
What's your approach now when using DrupalProxy and sequencing? Because DrupalConnectTask and DrupalNodeTask still destroys the resource, so is there some other way to create such sequence with only one drupalService, or you have to create drupalService for each task? Or is there still something else I don't see... ?</description>
		<content:encoded><![CDATA[<p>Arrgh :).<br />
Now I see something. After rereading my post. DrupalService and DrupalProxy. I got them mixed up.<br />
So I assume drupalService (outdated now, i suppose) wasn&#8217;t so brutal in it&#8217;s destroy method, and was reusable after one task?<br />
What&#8217;s your approach now when using DrupalProxy and sequencing? Because DrupalConnectTask and DrupalNodeTask still destroys the resource, so is there some other way to create such sequence with only one drupalService, or you have to create drupalService for each task? Or is there still something else I don&#8217;t see&#8230; ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Speechless pumpkin</title>
		<link>http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice#comment-308</link>
		<dc:creator>Speechless pumpkin</dc:creator>
		<pubDate>Sat, 30 Oct 2010 22:26:09 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpdk.nl/opensource/?p=426#comment-308</guid>
		<description>Hi,
very interesting stuff.. but I don't get one thing. In the code above you create one service:DrupalService and pass it as a parameter to DrupalConnectTask. When DrupalConnectTask finishes, DrupalConnectTask.destroyTaskHook is called where you destroy dataService that was passed in (by calling this.ds.destroy()) . This is from DrupalProxy destory() method description: 
/**
 * cleans up the class.
 * destroys all references, frees memory etc.
 * after a call to destroy, the instance of DrupalProxy cannot be used anymore
 */
(notice the last line - this instance of dataProxy cannot be used anymore).
So DrupalConnect task is done and sequence continues with next task : which is first of the 100 DrupalNodeTasks. Which is passed in same drupalProxy resource (that should be already destroyed right now).. This task does its job, again destroys drupalProxy, next task kicks in, with same drupalProxy, and again and again :). 
Am I missing somethig here?
Is DrupalProxy a unkillable vampire or what?
Sorry, maybe it's too late for me , but I just can't figure this one out. Will be glad for any explanation. And yes, I'm a programmer, not a newbie, so don't go soft on me :).
Happy Halloween everyone.</description>
		<content:encoded><![CDATA[<p>Hi,<br />
very interesting stuff.. but I don&#8217;t get one thing. In the code above you create one service:DrupalService and pass it as a parameter to DrupalConnectTask. When DrupalConnectTask finishes, DrupalConnectTask.destroyTaskHook is called where you destroy dataService that was passed in (by calling this.ds.destroy()) . This is from DrupalProxy destory() method description:<br />
/**<br />
 * cleans up the class.<br />
 * destroys all references, frees memory etc.<br />
 * after a call to destroy, the instance of DrupalProxy cannot be used anymore<br />
 */<br />
(notice the last line - this instance of dataProxy cannot be used anymore).<br />
So DrupalConnect task is done and sequence continues with next task : which is first of the 100 DrupalNodeTasks. Which is passed in same drupalProxy resource (that should be already destroyed right now).. This task does its job, again destroys drupalProxy, next task kicks in, with same drupalProxy, and again and again :).<br />
Am I missing somethig here?<br />
Is DrupalProxy a unkillable vampire or what?<br />
Sorry, maybe it&#8217;s too late for me , but I just can&#8217;t figure this one out. Will be glad for any explanation. And yes, I&#8217;m a programmer, not a newbie, so don&#8217;t go soft on me :).<br />
Happy Halloween everyone.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rolf Vreijdenberger</title>
		<link>http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice#comment-99</link>
		<dc:creator>Rolf Vreijdenberger</dc:creator>
		<pubDate>Mon, 14 Dec 2009 10:30:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpdk.nl/opensource/?p=426#comment-99</guid>
		<description>Hi Benoit,

veryyy nice.. Also very nice to see that you actually used the package as envisioned by us (thanks to letting everyone be able to view your source code) and in the way we use it ourselves. Subclassing the Task class to create powerfull sequences etc. Nice to hear you could really use it and thanks for letting us know :)
take care</description>
		<content:encoded><![CDATA[<p>Hi Benoit,</p>
<p>veryyy nice.. Also very nice to see that you actually used the package as envisioned by us (thanks to letting everyone be able to view your source code) and in the way we use it ourselves. Subclassing the Task class to create powerfull sequences etc. Nice to hear you could really use it and thanks for letting us know <img src='http://www.dpdk.nl/opensource/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> take care</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Benoît de Raemy</title>
		<link>http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice#comment-95</link>
		<dc:creator>Benoît de Raemy</dc:creator>
		<pubDate>Wed, 02 Dec 2009 07:23:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpdk.nl/opensource/?p=426#comment-95</guid>
		<description>Here's my first attempt to convert my Drupal portfolio into flex :
http://www.brandnewside.com
Sorry, the content is in French, translation to English is on the way. But amateurish developer like me can still look at the source : comments are in English... well, sort of...
Professional developer : you've been warned. 
Anyway, thank you again, your stuff works perfectly.</description>
		<content:encoded><![CDATA[<p>Here&#8217;s my first attempt to convert my Drupal portfolio into flex :<br />
<a href="http://www.brandnewside.com" rel="nofollow">http://www.brandnewside.com</a><br />
Sorry, the content is in French, translation to English is on the way. But amateurish developer like me can still look at the source : comments are in English&#8230; well, sort of&#8230;<br />
Professional developer : you&#8217;ve been warned.<br />
Anyway, thank you again, your stuff works perfectly.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ercan Bozoglu</title>
		<link>http://www.dpdk.nl/opensource/on-using-sequences-and-tasks-with-the-drupalservice#comment-77</link>
		<dc:creator>Ercan Bozoglu</dc:creator>
		<pubDate>Mon, 12 Oct 2009 13:52:48 +0000</pubDate>
		<guid isPermaLink="false">http://www.dpdk.nl/opensource/?p=426#comment-77</guid>
		<description>It is not only easy to implement, but also easy to read as code. All the tasks are manipulated in separate Callback tasks...Nice, because I don't wanna use events. Greate job</description>
		<content:encoded><![CDATA[<p>It is not only easy to implement, but also easy to read as code. All the tasks are manipulated in separate Callback tasks&#8230;Nice, because I don&#8217;t wanna use events. Greate job</p>
]]></content:encoded>
	</item>
</channel>
</rss>

