<?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: MooTools First Impression</title>
	<atom:link href="http://www.theodicius.net/archives/2009/05/12/mootools-first-impression/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.theodicius.net/archives/2009/05/12/mootools-first-impression/</link>
	<description>Good. Evil. Bratwurst.</description>
	<lastBuildDate>Tue, 17 Jan 2012 18:30:32 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Joomla Experts</title>
		<link>http://www.theodicius.net/archives/2009/05/12/mootools-first-impression/comment-page-1/#comment-14060</link>
		<dc:creator>Joomla Experts</dc:creator>
		<pubDate>Mon, 13 Jul 2009 13:53:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.theodicius.net/?p=284#comment-14060</guid>
		<description>nice!</description>
		<content:encoded><![CDATA[<p>nice!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joomla Experts</title>
		<link>http://www.theodicius.net/archives/2009/05/12/mootools-first-impression/comment-page-1/#comment-14059</link>
		<dc:creator>Joomla Experts</dc:creator>
		<pubDate>Mon, 13 Jul 2009 13:52:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.theodicius.net/?p=284#comment-14059</guid>
		<description>u guys are the best!</description>
		<content:encoded><![CDATA[<p>u guys are the best!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: arlen</title>
		<link>http://www.theodicius.net/archives/2009/05/12/mootools-first-impression/comment-page-1/#comment-13887</link>
		<dc:creator>arlen</dc:creator>
		<pubDate>Wed, 13 May 2009 04:10:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.theodicius.net/?p=284#comment-13887</guid>
		<description>Guess that&#039;s where the disconnect was, then. It didn&#039;t seem to me that a class was the right way to go with this, considering the purpose was to create a box filled with text, style it, read the result, dispose of it, and from that information add a class to a different series of containers on the page supplied as an argument to the process.

Maybe it&#039;s in the definitions we use. To me, a class implies a batch of data and the set of methods that work on/with it, while this was simply a set of methods that worked on nodes of the DOM tree, therefore extending the existing class that worked on the DOM seemed the more natural way to go.

Yes, I saw the mootorials. I didn&#039;t view that particular one because classes seemed to me the wrong way to go about it, but I did follow other links there, including the &quot;30 days of mootorials&quot; one. Nothing seemed like a good fit, so I started searching forums and looking around for a MooTools plugin that did something similar to what I was after so I could dissect it and learn from it.

While I failed in that quest, some discussions on the forums got me pointed towards Element, and I crawled the source code looking for how Element.Dimensions worked, as it seemed the most similar to what I was trying to do. That was my first mental model, and I went on building outward from there.

Your tweets helped, Aaron, but as I acknowledge above, often I didn&#039;t know enough to know how to frame the question properly.

As one coming at it from the outside, I&#039;d say MooTools has an S-shaped learning curve. It doesn&#039;t take a lot of effort to do simple manipulations (I&#039;d written a slideout site login tab in it, for example, with very little diffculty). But then the curve to go beyond that gets very steep (I&#039;m expecting it to level off after that is climbed; most systems do, but since I haven&#039;t climbed it yet, I can&#039;t say for sure that it does).

Your &quot;jQuery style code&quot; example is one I would have termed a &quot;javascript style code&quot; example,as that sort of functionality is built into the language. I was writing javascript like that (where the results of one call are passed directly into a subsequent call and those results passed into another call, etc.) before I ever saw jQuery. (BTW, that highlights another piece of cognitive dissonance I ran into in the MooTools docs. That process is called &quot;chaining&quot; in every other OO language I know; what MooTools calls &quot;chaining&quot; I&#039;d always known as &quot;queueing&quot;.)

Anyway, since my Joomla workload is increasing I&#039;m sure MooTools isn&#039;t leaving my toolbox any time soon. I&#039;ll work through some of the tutorials and look around for your book.

It became clear to me during this process that MooTools is built from a viewpoint that is based on assumptions alien to me (such as creating a class to operate on data that is not contained in that class). Now, by itself different doesn&#039;t imply either better or worse. But where that becomes a factor is the benefit needs to be proportionate to the effort expended, and what I hope I was clear about in this post is &lt;i&gt;that&lt;/i&gt; is the only test that MooTools failed, and not any sort of a performance test. It just seems to me if I decided to switch I wouldn&#039;t lose anything much, if at all, I just wouldn&#039;t be gaining enough to justify the effort.</description>
		<content:encoded><![CDATA[<p>Guess that&#8217;s where the disconnect was, then. It didn&#8217;t seem to me that a class was the right way to go with this, considering the purpose was to create a box filled with text, style it, read the result, dispose of it, and from that information add a class to a different series of containers on the page supplied as an argument to the process.</p>
<p>Maybe it&#8217;s in the definitions we use. To me, a class implies a batch of data and the set of methods that work on/with it, while this was simply a set of methods that worked on nodes of the DOM tree, therefore extending the existing class that worked on the DOM seemed the more natural way to go.</p>
<p>Yes, I saw the mootorials. I didn&#8217;t view that particular one because classes seemed to me the wrong way to go about it, but I did follow other links there, including the &#8220;30 days of mootorials&#8221; one. Nothing seemed like a good fit, so I started searching forums and looking around for a MooTools plugin that did something similar to what I was after so I could dissect it and learn from it.</p>
<p>While I failed in that quest, some discussions on the forums got me pointed towards Element, and I crawled the source code looking for how Element.Dimensions worked, as it seemed the most similar to what I was trying to do. That was my first mental model, and I went on building outward from there.</p>
<p>Your tweets helped, Aaron, but as I acknowledge above, often I didn&#8217;t know enough to know how to frame the question properly.</p>
<p>As one coming at it from the outside, I&#8217;d say MooTools has an S-shaped learning curve. It doesn&#8217;t take a lot of effort to do simple manipulations (I&#8217;d written a slideout site login tab in it, for example, with very little diffculty). But then the curve to go beyond that gets very steep (I&#8217;m expecting it to level off after that is climbed; most systems do, but since I haven&#8217;t climbed it yet, I can&#8217;t say for sure that it does).</p>
<p>Your &#8220;jQuery style code&#8221; example is one I would have termed a &#8220;javascript style code&#8221; example,as that sort of functionality is built into the language. I was writing javascript like that (where the results of one call are passed directly into a subsequent call and those results passed into another call, etc.) before I ever saw jQuery. (BTW, that highlights another piece of cognitive dissonance I ran into in the MooTools docs. That process is called &#8220;chaining&#8221; in every other OO language I know; what MooTools calls &#8220;chaining&#8221; I&#8217;d always known as &#8220;queueing&#8221;.)</p>
<p>Anyway, since my Joomla workload is increasing I&#8217;m sure MooTools isn&#8217;t leaving my toolbox any time soon. I&#8217;ll work through some of the tutorials and look around for your book.</p>
<p>It became clear to me during this process that MooTools is built from a viewpoint that is based on assumptions alien to me (such as creating a class to operate on data that is not contained in that class). Now, by itself different doesn&#8217;t imply either better or worse. But where that becomes a factor is the benefit needs to be proportionate to the effort expended, and what I hope I was clear about in this post is <i>that</i> is the only test that MooTools failed, and not any sort of a performance test. It just seems to me if I decided to switch I wouldn&#8217;t lose anything much, if at all, I just wouldn&#8217;t be gaining enough to justify the effort.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Aaron Newton</title>
		<link>http://www.theodicius.net/archives/2009/05/12/mootools-first-impression/comment-page-1/#comment-13886</link>
		<dc:creator>Aaron Newton</dc:creator>
		<pubDate>Wed, 13 May 2009 00:59:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.theodicius.net/?p=284#comment-13886</guid>
		<description>&lt;blockquote&gt;I couldn’t find a HOWTO to get me started. I tusked around for a while on the net and found several supposed tutorials on writing MooTools plugins, but none of them gave me what I needed to start with. They were all about adding classes to the framework, and that’s not what this was supposed to be doing.&lt;/blockquote&gt;

Classes ARE MooTools plugins. Almost every MooTools plugin is a class. The only time you should implement things into native objects (like Element) are when you want to add a shortcut to those objects. It sounds to me like you were trying to write jQuery style code that works like so:

$$(&#039;div&#039;).myPlugin().addClass(&#039;foo&#039;).hide();

Where &quot;myPlugin&quot; applies itself to all the elements returned by divs. The right way to write such a plugin in MooTools is to... write a class. THEN, if you want a shortcut that applies that class to elements, you extend Element with a method that instantiates that class. Look at Fx.Tween in the MooTools core for an example of this. The Fx class family is where all the logic is, but myElement.tween(&#039;opacity&#039;, 0, 1); is a shortcut implemented onto Element. This shortcut just creates an instance of Fx.Tween and activates it.

For what it&#039;s worth, as the author of the MooTools book and the Mootorial (www.mootorial.com), I recognize that yes, MooTools has a steeper learning curve.

Did you see this page?

http://mootorial.com/wiki/mootorial/09-howtowriteamootoolsclass</description>
		<content:encoded><![CDATA[<blockquote><p>I couldn’t find a HOWTO to get me started. I tusked around for a while on the net and found several supposed tutorials on writing MooTools plugins, but none of them gave me what I needed to start with. They were all about adding classes to the framework, and that’s not what this was supposed to be doing.</p></blockquote>
<p>Classes ARE MooTools plugins. Almost every MooTools plugin is a class. The only time you should implement things into native objects (like Element) are when you want to add a shortcut to those objects. It sounds to me like you were trying to write jQuery style code that works like so:</p>
<p>$$(&#8216;div&#8217;).myPlugin().addClass(&#8216;foo&#8217;).hide();</p>
<p>Where &#8220;myPlugin&#8221; applies itself to all the elements returned by divs. The right way to write such a plugin in MooTools is to&#8230; write a class. THEN, if you want a shortcut that applies that class to elements, you extend Element with a method that instantiates that class. Look at Fx.Tween in the MooTools core for an example of this. The Fx class family is where all the logic is, but myElement.tween(&#8216;opacity&#8217;, 0, 1); is a shortcut implemented onto Element. This shortcut just creates an instance of Fx.Tween and activates it.</p>
<p>For what it&#8217;s worth, as the author of the MooTools book and the Mootorial (www.mootorial.com), I recognize that yes, MooTools has a steeper learning curve.</p>
<p>Did you see this page?</p>
<p><a href="http://mootorial.com/wiki/mootorial/09-howtowriteamootoolsclass" rel="nofollow">http://mootorial.com/wiki/mootorial/09-howtowriteamootoolsclass</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

