<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>Prototype JavaScript framework - blog</title>
  <id>tag:prototypejs.org,2012:mephisto/blog</id>
  <generator uri="http://mephistoblog.com" version="0.7.3">Mephisto Noh-Varr</generator>
  
  <link href="http://prototypejs.org/blog" rel="alternate" type="text/html" />
  <updated>2012-08-08T22:29:15Z</updated>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/prototype-blog" /><feedburner:info uri="prototype-blog" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2012-08-08:30797</id>
    <published>2012-08-08T22:28:00Z</published>
    <updated>2012-08-08T22:29:15Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/YNnPVQhkFqU/prototype-1-7-1" rel="alternate" type="text/html" />
    <title>Prototype 1.7.1</title>
<summary type="html">&lt;p&gt;Not long ago, I tagged Prototype 1.7.1, an update 18 months in the making. It features an overhaul of our DOM library and better coexistence with ES5 methods, but quite a bit more as well.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Not long ago, I tagged Prototype 1.7.1, an update 18 months in the making. It features an overhaul of our DOM library and better coexistence with ES5 methods, but quite a bit more as well.&lt;/p&gt;
&lt;p&gt;I’m sure you’re curious about why it’s taken so long. But first let’s look at what’s been done in 1.7.1.&lt;/p&gt;

&lt;h3&gt;Prototype 1.7.1&lt;/h3&gt;

&lt;p&gt;When last we spoke, I told you about the plans we had for 1.7.0.1 and 1.7.1 — a bugfix release and a minor release. They’ve been rolled into one large release that delivers the big things we promised from each version, plus a bunch of small fixes.&lt;/p&gt;

&lt;h4&gt;DOM rewrite&lt;/h4&gt;

&lt;p&gt;We’ve rewritten the &lt;code&gt;dom.js&lt;/code&gt; section of Prototype from the ground up. Why? For a few reasons:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;We wanted to use the code conventions that the rest of Prototype used. This means creating named functions inside a private closure, then attaching those named functions to public objects to expose an interface. It makes for more concise code and helps you debug. For instance, the &lt;code&gt;Element.hide&lt;/code&gt; function will now be called &lt;code&gt;hide&lt;/code&gt; instead of &lt;code&gt;(anonymous function)&lt;/code&gt; when you’re looking at a call stack.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We took the opportunity to change the way we register events. It makes us much less susceptible to dreaded memory leaks in older versions of Internet Explorer. Not only does this improve performance in IE on page unload (where before we’d have to unregister every event handler in order to prevent memory leaks), it also improves performance on a number of DOM-related methods, including &lt;code&gt;update&lt;/code&gt; and &lt;code&gt;remove&lt;/code&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The wholesale rewrite let us consolidate repetitive code tasks into new convenience methods. For instance, we’ve minimized the amount of arbitrary property-setting on DOM nodes, opting instead to use our &lt;a href="http://api.prototypejs.org/dom/Element/store/"&gt;storage methods&lt;/a&gt;. In most browsers, only one expando property is set on DOM nodes; in IE8 and above, &lt;em&gt;zero&lt;/em&gt; properties are set, because we use IE’s existing &lt;a href="http://msdn.microsoft.com/en-us/library/ie/ms534704(v=vs.85).aspx"&gt;uniqueID property&lt;/a&gt; instead of generating our own unique storage key for each element. This should make for faster DOM tasks in IE and better introspection across the board.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Likewise, we got rid of a bunch of redundancies created when we added the &lt;a href="http://api.prototypejs.org/dom/Element/Layout/"&gt;Element.Layout&lt;/a&gt; system, and fixed a few bugs for layout-related edge cases.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;If you’re the crazy sort who likes to read the source code, you should find all of &lt;code&gt;dom.js&lt;/code&gt; to be vastly more readable now. Workarounds for specific browsers are named in a consistent fashion, and most are &lt;a href="https://github.com/sstephenson/prototype/blob/master/src/prototype/dom/dom.js#L117"&gt;annotated with explanatory comments&lt;/a&gt;.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h4&gt;ECMAScript 5 compatibility&lt;/h4&gt;

&lt;p&gt;A number of methods popularized by Prototype are included in the &lt;a href="http://es5.github.com/"&gt;ECMAScript 5 specification&lt;/a&gt;. This is great news, but it means we have to be careful not to break code that presumes these methods will behave in an ES5-compliant way.&lt;/p&gt;

&lt;p&gt;We’ve rewritten some array methods — specifically &lt;code&gt;map&lt;/code&gt;, &lt;code&gt;some&lt;/code&gt;, &lt;code&gt;every&lt;/code&gt;, and &lt;code&gt;filter&lt;/code&gt; — so that they abide by the ES5 spec as closely as possible. That means, for instance, that they’ll throw &lt;code&gt;TypeError&lt;/code&gt;s if you try to call them on &lt;code&gt;null&lt;/code&gt; values, just like they would in their native browser implementations.&lt;/p&gt;

&lt;p&gt;This means that Prototype acts as a &lt;a href="http://remysharp.com/2010/10/08/what-is-a-polyfill/"&gt;polyfill&lt;/a&gt; for ES5 array methods, adding them to any browser that doesn’t support them natively. Credit goes to &lt;a href="https://github.com/arthurschreiber"&gt;Arthur Schreiber&lt;/a&gt; for spearheading this effort.&lt;/p&gt;

&lt;p&gt;One small compromise we chose to make: in ES5, these methods throw a &lt;code&gt;TypeError&lt;/code&gt; if no iterator is given. In Prototype, the iterator is optional, and defaults to an identity function if omitted. We decided it was better to keep the latter behavior for backward-compatibility than to break existing code in the name of rigid ES5 compliance.&lt;/p&gt;

&lt;p&gt;Similarly, ES5 &lt;a href="http://es5.github.com/#x15.3.4.5"&gt;also specifies&lt;/a&gt; &lt;code&gt;Function.prototype.bind&lt;/code&gt;, so we’ve updated our &lt;code&gt;Function#bind&lt;/code&gt; method to behave like an ES5 polyfill.&lt;/p&gt;

&lt;h4&gt;Other fixes&lt;/h4&gt;

&lt;p&gt;In addition to the bug fixes listed above, we fixed a bug with &lt;code&gt;Element.setOpacity&lt;/code&gt; that was causing problems in IE9 and the upcoming IE10. And we fixed a number of small issues with unnecessary variable declarations, redundant code, and typos in documentation.&lt;/p&gt;

&lt;p&gt;Also, we fixed the way we serialize form values to be more accurate to the way browsers work. The &lt;a href="http://www.w3.org/TR/html4/interact/forms.html#h-17.13.4.1"&gt;HTML spec says&lt;/a&gt; that line breaks (&lt;code&gt;\n&lt;/code&gt;) are normalized to &lt;code&gt;\r\n&lt;/code&gt;, and that spaces are replaced with &lt;code&gt;+&lt;/code&gt; rather than URL-encoded as &lt;code&gt;%20&lt;/code&gt;. So now we do the same thing. This may affect you if you use &lt;code&gt;Form.serialize&lt;/code&gt; or &lt;code&gt;Hash#toQueryString&lt;/code&gt;.&lt;/p&gt;

&lt;h4&gt;Download, report bugs, and get help&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ajax.googleapis.com/ajax/libs/prototype/1.7.1.0/prototype.js"&gt;Download Prototype 1.7.1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://api.prototypejs.org/"&gt;View the API documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/sstephenson/prototype/"&gt;Check out the Prototype source code&lt;/a&gt; on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a href="https://prototype.lighthouseapp.com/projects/8886-prototype/overview"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
&lt;li&gt;&lt;a href="http://prototypejs.org/discuss"&gt;Get Prototype help&lt;/a&gt; on the mailing list or the #prototype IRC channel&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to a number of determined contributors who made this release possible!&lt;/p&gt;

&lt;h3&gt;Hey, I’ve got all kinds of questions.&lt;/h3&gt;

&lt;p&gt;I don’t blame you. Let’s hear them.&lt;/p&gt;

&lt;h4&gt;Why is development so slow?&lt;/h4&gt;

&lt;p&gt;It’s been a year and a half since our last release, which is slow even by Prototype’s standards. It’s because I’m now the only person who works on Prototype on a regular basis, and the pace of development has slowed as a result.&lt;/p&gt;

&lt;p&gt;Many of you have wondered whether Prototype is “dead,” and I can say that it definitely isn’t. But because of the way I work on Prototype — months of inaction followed by a flurry of commits and bug fixes — it’s fair to say that Prototype &lt;em&gt;hibernates&lt;/em&gt; for long periods of time.&lt;/p&gt;

&lt;p&gt;Now, this doesn’t bother me, but I can understand how it may bother you. If you’re concerned about Prototype’s future, I can only tell you that I have no plans to abandon its development. But, at the same time, I can’t commit to any milestones or consistent release schedule, because I’m doing this in my free time.&lt;/p&gt;

&lt;h4&gt;How about adding developers to the team?&lt;/h4&gt;

&lt;p&gt;Sounds like a great idea.&lt;/p&gt;

&lt;p&gt;In the short term, if you have specific things you want to fix and you feel like they aren’t getting done quickly enough, a GitHub pull request would be the best way to get it in front of my eyes.&lt;/p&gt;

&lt;p&gt;In the long term, if this process reveals some consistent and helpful contributors, I’d certainly be interested in adding those people to the core team.&lt;/p&gt;

&lt;h4&gt;What about Prototype 2?&lt;/h4&gt;

&lt;p&gt;That’s an excellent question. To call Prototype 2 “vaporware” wouldn’t be an insult; it’d just be accurate.&lt;/p&gt;

&lt;p&gt;Right now it’s a collection of ideas contributed over the years by the Prototype core team and trusted friends. We know it’s an opportunity to break backward-compatibility and thus cast off all the short-sighted decisions we’ve been dragging around for years. We know we want to introduce a few new code conventions. We know we want to make it intuitive and ordered while still addressing the common 80% of use cases.&lt;/p&gt;

&lt;p&gt;But so far, that doesn’t add up to enough to differentiate it from Prototype 1.X.&lt;/p&gt;

&lt;p&gt;To treat it like a film: It’s a sequel I’m interested in making, but only if I can get a good idea for where the story should go. I don’t want to do a retread or a cash-in. I hope that makes sense.&lt;/p&gt;

&lt;p&gt;That means it’s on the back burner for now — not an abandoned idea, but an incomplete one. My near-term plans are all about making improvements to 1.X. Ajax-related enhancements, among other things, are coming in 1.8. I’d love to add some other much-requested features as well.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=YNnPVQhkFqU:V-k_FoAzN68:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=YNnPVQhkFqU:V-k_FoAzN68:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=YNnPVQhkFqU:V-k_FoAzN68:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2012/8/8/prototype-1-7-1</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2010-11-22:28087</id>
    <published>2010-11-22T19:52:00Z</published>
    <updated>2010-11-22T20:35:31Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/NedbyWnB9Kw/prototype-1-7" rel="alternate" type="text/html" />
    <title>Prototype 1.7</title>
<summary type="html">&lt;p&gt;Last week, we tagged the first stable release of 1.7, marking the end of a far-too-long release cycle. We've made more than 50 improvements since the last stable version and are already working on 1.7.0.1.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Last week, we tagged the first stable release of 1.7, marking the end of a far-too-long release cycle. We've made more than 50 improvements since the last stable version and are already working on 1.7.0.1.&lt;/p&gt;
&lt;h3&gt;What's new?&lt;/h3&gt;

&lt;p&gt;To learn about new features in version 1.7, refer to the &lt;a href="http://prototypejs.org/2010/4/5/prototype-1-7-rc1-sizzle-layout-dimensions-api-event-delegation-and-more"&gt;blog post about the 1.7 RC1 release&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As always, this release includes an assortment of bug fixes. Consult the CHANGELOG for further details, or &lt;a href="http://github.com/sstephenson/prototype/compare/1.7_rc3...1.7"&gt;see the full diff between this release and RC3&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;What's next?&lt;/h3&gt;

&lt;p&gt;As I said when we released RC3, I'm eager to resume work on &lt;a href="http://scripty2.com"&gt;script.aculo.us 2.0&lt;/a&gt;, which had its first beta release two months ago. But we've also got plenty planned for the next few versions of Prototype:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The next bugfix version&lt;/strong&gt; (1.7.0.1) will feature a rewrite of the DOM code to be easier to read and faster at the same time. We'll be consulting the &lt;a href="http://dante.dojotoolkit.org/taskspeed/"&gt;TaskSpeed benchmarks&lt;/a&gt; throughout to measure our progress toward speeding up common DOM tasks.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The next minor release&lt;/strong&gt; (1.7.1) will feature better compatibility with ECMAScript5 for all the stuff we share: &lt;code&gt;Function#bind&lt;/code&gt;, &lt;code&gt;Array#map&lt;/code&gt;, and so on. We'll make sure these methods are up to spec so that we can implement them as proper &lt;a href="http://remysharp.com/2010/10/08/what-is-a-polyfill/"&gt;polyfills&lt;/a&gt; when they don't exist in the browser &amp;mdash; and use the native versions where they do exist.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The next major release&lt;/strong&gt; (1.8) will feature an overhaul of the Ajax code. We'll add a bunch of new features: JSONP, timeouts, guaranteed firing of callbacks for non-guaranteed readyStates, and a lot more.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In addition, there are exciting things in the future for &lt;a href="https://github.com/tobie/Evidence"&gt;Evidence&lt;/a&gt; (the eventual replacement for our unit testing library) and &lt;a href="http://getsprockets.org/"&gt;Sprockets&lt;/a&gt; (our JavaScript concatenator and dependency manager).&lt;/p&gt;

&lt;h3&gt;Download, report bugs, and get help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://ajax.googleapis.com/ajax/libs/prototype/1.7.0.0/prototype.js"&gt;Download Prototype 1.7&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://api.prototypejs.org"&gt;View the API documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/sstephenson/prototype/"&gt;Check out the Prototype source code&lt;/a&gt; on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a href="https://prototype.lighthouseapp.com/projects/8886-prototype/overview"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
&lt;li&gt;&lt;a href="/discuss"&gt;Get Prototype help&lt;/a&gt; on the mailing list or #prototype IRC channel&lt;/li&gt;
&lt;li&gt;&lt;a href="http://groups.google.com/group/prototype-core"&gt;Talk to the core team&lt;/a&gt; on the prototype-core mailing list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to the many contributors who made this release possible!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=NedbyWnB9Kw:0E6ExQN0-WM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=NedbyWnB9Kw:0E6ExQN0-WM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=NedbyWnB9Kw:0E6ExQN0-WM:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2010/11/22/prototype-1-7</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2010-10-12:27906</id>
    <published>2010-10-12T20:49:00Z</published>
    <updated>2010-10-13T03:33:45Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/dXrUGYZt8-U/prototype-1-7-rc3-support-for-ie9" rel="alternate" type="text/html" />
    <title>Prototype 1.7 RC3: Support for IE9</title>
<summary type="html">&lt;p&gt;Release Candidate 3 of Prototype 1.7 is now out. This long-delayed version includes full support for Internet Explorer 9.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Release Candidate 3 of Prototype 1.7 is now out. This long-delayed version includes full support for Internet Explorer 9.&lt;/p&gt;
&lt;p&gt;It was five months ago that we released RC2, and it was true that we were planning to release 1.7 final soon after. Two problems intervened:&lt;/p&gt;

&lt;h3&gt;Element.getDimensions&lt;/h3&gt;

&lt;p&gt;To minimize code duplication, we had redefined &lt;code&gt;Element#getDimensions&lt;/code&gt; (and the related methods &lt;code&gt;getWidth&lt;/code&gt; and &lt;code&gt;getHeight&lt;/code&gt;) to use the new and preferred &lt;code&gt;Element.Layout&lt;/code&gt; methods for measuring dimensions. This logic, while more robust, produced slightly different results in a few cases, so we decided to revert to the previous implementation of &lt;code&gt;Element#getDimensions&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;If you're writing new code, we encourage you to use &lt;code&gt;Element.Layout&lt;/code&gt; — e.g., &lt;code&gt;someNode.measure('border-box-width')&lt;/code&gt; instead of &lt;code&gt;someNode.getWidth()&lt;/code&gt;. You'll get more accurate results in general. But we're leaving &lt;code&gt;Element#getDimensions&lt;/code&gt; the way it is to ensure that people don't have to rewrite existing code.&lt;/p&gt;

&lt;h3&gt;Internet Explorer 9&lt;/h3&gt;

&lt;p&gt;The far more important reason for putting the brakes on 1.7 was the impending release of Internet Explorer 9. In short, we didn't want to put out something that would break in large ways when IE9 was released. That meant waiting for a preview release of IE9 that was stable enough (and representative enough of the final product) to test against.&lt;/p&gt;

&lt;p&gt;The IE9 beta passes all but one of our unit tests. The one minor failure is the result of an issue on Microsoft's end; we hear it will be fixed before the final release of IE9.&lt;/p&gt;

&lt;h3&gt;Other changes&lt;/h3&gt;

&lt;p&gt;To learn about new features in version 1.7, refer to the &lt;a href="http://prototypejs.org/2010/4/5/prototype-1-7-rc1-sizzle-layout-dimensions-api-event-delegation-and-more"&gt;blog post about the 1.7 RC1 release&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;As always, this release includes an assortment of bug fixes. Consult the CHANGELOG for further details, or &lt;a href="http://github.com/sstephenson/prototype/compare/1.7_rc2...1.7_rc3"&gt;see the full diff between this release and the previous release candidate&lt;/a&gt; (RC2 to RC3).&lt;/p&gt;

&lt;h3&gt;What now?&lt;/h3&gt;

&lt;p&gt;Now that we've got these two issues solved, we're eager to get the final release out the door. It'll free me up to lend more time to &lt;a href="http://scripty2.com"&gt;script.aculo.us 2.0&lt;/a&gt; (which just saw a beta release) and its nascent UI components.&lt;/p&gt;

&lt;h3&gt;Download, report bugs, and get help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://prototypejs.org/assets/2010/10/12/prototype.js"&gt;Download Prototype 1.7 RC3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://api.prototypejs.org"&gt;View the API documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/sstephenson/prototype/"&gt;Check out the Prototype source code&lt;/a&gt; on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a href="https://prototype.lighthouseapp.com/projects/8886-prototype/overview"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
&lt;li&gt;&lt;a href="/discuss"&gt;Get Prototype help&lt;/a&gt; on the mailing list or #prototype IRC channel&lt;/li&gt;
&lt;li&gt;&lt;a href="http://groups.google.com/group/prototype-core"&gt;Talk to the core team&lt;/a&gt; on the prototype-core mailing list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to the many contributors who made this release possible!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=dXrUGYZt8-U:DMmb0buQPCo:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=dXrUGYZt8-U:DMmb0buQPCo:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=dXrUGYZt8-U:DMmb0buQPCo:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2010/10/12/prototype-1-7-rc3-support-for-ie9</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2010-05-13:26692</id>
    <published>2010-05-13T00:19:00Z</published>
    <updated>2010-05-13T22:34:59Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/qpaKQh2-YoE/prototype-1-7-rc2" rel="alternate" type="text/html" />
    <title>Prototype 1.7 RC2</title>
<summary type="html">&lt;p&gt;We’ve just tagged Release Candidate 2 of Prototype 1.7, with the intent of putting out a final 1.7 release very soon.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;We’ve just tagged Release Candidate 2 of Prototype 1.7, with the intent of putting out a final 1.7 release very soon.&lt;/p&gt;
&lt;p&gt;In addition to the usual bug fixes, RC2 includes a late addition: the &lt;code&gt;Element#purge&lt;/code&gt; method, used to dispose of an element (remove its event handlers and storage keys) before removing it from the page.&lt;/p&gt;

&lt;p&gt;In addition, &lt;code&gt;Element#update&lt;/code&gt; now performs a similar cleanup process on content that will be replaced via &lt;code&gt;innerHTML&lt;/code&gt;. Both these additions should help keep memory usage down, especially for apps that create and destroy lots of DOM nodes.&lt;/p&gt;

&lt;p&gt;Consult the &lt;a href="http://github.com/sstephenson/prototype/blob/1.7_rc2/CHANGELOG"&gt;CHANGELOG&lt;/a&gt; for further details.&lt;/p&gt;

&lt;h3&gt;Download, report bugs, and get help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://prototypejs.org/assets/2010/5/13/prototype.js"&gt;Download Prototype 1.7 RC2&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://api.prototypejs.org"&gt;View the API documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/sstephenson/prototype/"&gt;Check out the Prototype source code&lt;/a&gt; on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a href="https://prototype.lighthouseapp.com/projects/8886-prototype/overview"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
&lt;li&gt;&lt;a href="/discuss"&gt;Get prototype help&lt;/a&gt; on the mailing list or #prototype IRC channel&lt;/li&gt;
&lt;li&gt;&lt;a href="http://groups.google.com/group/prototype-core"&gt;Talk to the core team&lt;/a&gt; on the prototype-core mailing list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to the many contributors who made this release possible!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=qpaKQh2-YoE:5yql015Mgtk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=qpaKQh2-YoE:5yql015Mgtk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=qpaKQh2-YoE:5yql015Mgtk:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2010/5/13/prototype-1-7-rc2</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2010-04-05:26520</id>
    <published>2010-04-05T16:42:00Z</published>
    <updated>2010-04-05T16:46:30Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/nm7KqOwij0M/prototype-1-7-rc1-sizzle-layout-dimensions-api-event-delegation-and-more" rel="alternate" type="text/html" />
    <title>Prototype 1.7 RC1: Sizzle, layout/dimensions API, event delegation, and more</title>
<summary type="html">&lt;p&gt;We've just tagged the first release candidate of Prototype 1.7: a major new version with some major new features.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;We've just tagged the first release candidate of Prototype 1.7: a major new version with some major new features.&lt;/p&gt;
&lt;h3&gt;Sizzle as the selector engine (or mix in your own)&lt;/h3&gt;

&lt;p&gt;With Prototype 1.7, we've finally realized our long-held goal of moving to &lt;a href="http://sizzlejs.com/" title="Sizzle JavaScript Selector Library"&gt;Sizzle&lt;/a&gt;, the middleware selector engine used by &lt;a href="http://jquery.com/" title="jQuery: The Write Less, Do More, JavaScript Library"&gt;jQuery&lt;/a&gt; and others. I wrote our previous selector engine, used since 1.5.1, but nevertheless I'm excited to switch to a more robust engine that's shared between frameworks.&lt;/p&gt;

&lt;p&gt;So Sizzle is the new default. But there's more to it than that. In moving to Sizzle, we've modularized the selector engine entirely. If you want to use Diego Perini's &lt;a href="http://javascript.nwbox.com/NWMatcher/" title="NWMatcher - CSS3 Selector and Matcher"&gt;NWMatcher&lt;/a&gt; library in place of Sizzle, you can. Just check out the source code and build like so:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;rake dist SELECTOR_ENGINE=nwmatcher
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you're a sentimentalist, you can use the legacy Prototype selector engine by specifying &lt;code&gt;SELECTOR_ENGINE=legacy_selector&lt;/code&gt;. Or add your own selector engine by creating a subdirectory in &lt;code&gt;vendor/&lt;/code&gt; and following &lt;a href="http://github.com/sstephenson/prototype/tree/master/vendor/legacy_selector/" title="vendor/legacy_selector at master from sstephenson's prototype - GitHub"&gt;some simple conventions&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;Element#on&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://api.prototypejs.org/dom/element/on/"&gt;&lt;code&gt;Element#on&lt;/code&gt;&lt;/a&gt; is a new way to access the Prototype event API. It provides first-class support for event delegation and simplifies event handler removal.&lt;/p&gt;

&lt;p&gt;In its simplest form, &lt;code&gt;Element#on&lt;/code&gt; works just like &lt;code&gt;Element#observe&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;$("messages").on("click", function(event) {
  // ...
});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;An optional second argument lets you specify a CSS selector for event delegation. This encapsulates the pattern of using &lt;code&gt;Event#findElement&lt;/code&gt; to retrieve the first ancestor element matching a specific selector. So this Prototype 1.6 code...&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;$("messages").observe("click", function(event) {
  var element = event.findElement("a.comment_link");
  if (element) {
    // ...
  }
});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;...can be written more concisely with &lt;code&gt;Element#on&lt;/code&gt; as:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;$("messages").on("click", "a.comment_link", function(event, element) {
  // ...
});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;code&gt;Element#on&lt;/code&gt; differs from &lt;code&gt;Element#observe&lt;/code&gt; in one other important way: its return value is an object with a &lt;code&gt;#stop&lt;/code&gt; method. Calling this method will remove the event handler. (Technically, this is an instance of a new class called &lt;a href="http://api.prototypejs.org/dom/event/handler/"&gt;&lt;code&gt;Event.Handler&lt;/code&gt;&lt;/a&gt;.) With this pattern, there's no need to retain a reference to the handler function just so you can pass it to &lt;code&gt;Element#stopObserving&lt;/code&gt; later.&lt;/p&gt;

&lt;p&gt;For example, in Prototype 1.6, where you'd need to write something like...&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;start: function() {
  this.clickHandler = function(event) {
    // ...
  };

  $("messages").observe("click", this.clickHandler);
},

stop: function() {
  $("messages").stopObserving("click", this.clickHandler);
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;...you can now write:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;start: function() {
  this.clickHandler = $("messages").on("click", function(event) {
    // ...
  });
},

stop: function() {
  this.clickHandler.stop();
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Also note that the &lt;code&gt;Event.Handler&lt;/code&gt; class has a corresponding &lt;code&gt;#start&lt;/code&gt; method that lets you re-attach an observer you've removed with &lt;code&gt;#stop&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;So, to review, &lt;code&gt;Element#on&lt;/code&gt; is &lt;em&gt;both&lt;/em&gt; a new approach to event observation &lt;em&gt;and&lt;/em&gt; an implementation of event delegation. Feel free to eschew &lt;code&gt;Element#observe&lt;/code&gt; and use &lt;code&gt;Element#on&lt;/code&gt; exclusively; or use &lt;code&gt;Element#on&lt;/code&gt; just for event delegation; or keep using &lt;code&gt;Element#observe&lt;/code&gt; the way you always have.&lt;/p&gt;

&lt;h3&gt;Element.Layout: Your digital tape measure&lt;/h3&gt;

&lt;p&gt;The second major feature in 1.7 is &lt;code&gt;Element.Layout&lt;/code&gt;, a class for pixel-perfect measurement of element dimensions and offsets.&lt;/p&gt;

&lt;p&gt;Now you don't have to decide between properties like &lt;code&gt;offsetWidth&lt;/code&gt; (which return numbers, but not the numbers you &lt;em&gt;want&lt;/em&gt;) or retrieving computed styles (which have their own set of quirks and require a call to &lt;code&gt;parseInt&lt;/code&gt;).&lt;/p&gt;

&lt;h4&gt;The simple case&lt;/h4&gt;

&lt;p&gt;If you want a one-off measurement of an element, use the new &lt;a href="http://api.prototypejs.org/dom/element/measure/"&gt;&lt;code&gt;Element#measure&lt;/code&gt;&lt;/a&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;$('troz').measure('width'); //-&gt; 150
$('troz').measure('border-top'); //-&gt; 5

// Offsets, too:
$('troz').measure('top'); //-&gt; 226&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The argument passed to &lt;code&gt;measure&lt;/code&gt; is one of a handful of intuitive names, most of which are derived from their CSS equivalents. So &lt;code&gt;width&lt;/code&gt; means the width of the content box, just like in CSS — but we throw in extra properties (e.g., &lt;code&gt;padding-box-width&lt;/code&gt;, &lt;code&gt;margin-box-height&lt;/code&gt;) for some common measurements. This approach gives you far more granularity than common DHTML properties like &lt;code&gt;offsetWidth&lt;/code&gt; and &lt;code&gt;clientHeight&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;These measurements are guaranteed to be in pixels. Even in IE. (In fact, Prototype works around a handful of IE quirks that would ordinarily result in inaccurate measurments.) It can even measure elements that are &lt;em&gt;hidden&lt;/em&gt;, as long as their parents are visible. (Like when you want to animate an element from a hidden state and need to know how tall it will be.)&lt;/p&gt;

&lt;h4&gt;The complex case&lt;/h4&gt;

&lt;p&gt;If you need to measure several things at once, though, &lt;code&gt;Element#measure&lt;/code&gt; is not the most efficient way to do it. Often an element will need a bit of manipulation before it reports its dimensions accurately, which means measurements can be costly.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Element.Layout&lt;/code&gt; class tries to minimize that cost. It's a read-only subclass of &lt;code&gt;Hash&lt;/code&gt; that remembers values in order to avoid re-computing. &lt;/p&gt;

&lt;p&gt;First, use &lt;a href="http://api.prototypejs.org/dom/element/layout/"&gt;&lt;code&gt;Element#getLayout&lt;/code&gt;&lt;/a&gt; to obtain an instance of &lt;code&gt;Element.Layout&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;var layout = $('troz').getLayout();&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Now use &lt;code&gt;Element.Layout#get&lt;/code&gt; to retrieve values, using the same property names you used for &lt;code&gt;Element#measure&lt;/code&gt;:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;layout.get('width');  //-&gt; 150
layout.get('height'); //-&gt; 500

layout.get('padding-left');  //-&gt; 10
layout.get('margin-left');   //-&gt; 25
layout.get('border-top');    //-&gt; 5
layout.get('border-bottom'); //-&gt; 5

layout.get('padding-box-width'); //-&gt; 170
layout.get('border-box-height'); //-&gt; 510

layout.get('width');  //-&gt; 150&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Here's where the remembered values (or &lt;em&gt;memoization&lt;/em&gt;, if you prefer) come in. When I ask for &lt;code&gt;width&lt;/code&gt;, Prototype measures the element – which, as we discussed, is a costly operation — and returns a value. A few lines later, I ask for &lt;code&gt;width&lt;/code&gt; again, and I get the same value. But this time it didn't do any measuring. It remembered the value from last time.&lt;/p&gt;

&lt;p&gt;There's more. When I ask for &lt;code&gt;border-box-height&lt;/code&gt;, Prototype knows that's just &lt;code&gt;height&lt;/code&gt; plus &lt;code&gt;border-top&lt;/code&gt; plus &lt;code&gt;border-bottom&lt;/code&gt;. All three of those properties are already memoized, since I asked for them earlier, so it skips the measurement phase and just gives me the sum.&lt;/p&gt;

&lt;p&gt;How does it know when an element's dimensions change? It doesn't. Don't hang onto an instance of &lt;code&gt;Element.Layout&lt;/code&gt; for too long; it's meant for short-term efficiency, not long-term caching. You can grab a new instance by calling &lt;code&gt;Element#getLayout&lt;/code&gt; again.&lt;/p&gt;

&lt;p&gt;Believe it or not, this is the short version. &lt;a href="http://api.prototypejs.org/dom/element/layout/"&gt;Read the documentation&lt;/a&gt; to learn more.&lt;/p&gt;

&lt;h3&gt;JSON fixes, ES5 compliance&lt;/h3&gt;

&lt;p&gt;The JSON interface slated for ECMAScript 5 is already being implemented in major browsers. It uses many of the same method names as Prototype's existing JSON implementation, but with different behavior, so we rewrote ours to be ES5-compliant and to fall back to the native JSON support where possible. A few other methods, like &lt;code&gt;Object.keys&lt;/code&gt;, received similar treatment.&lt;/p&gt;

&lt;h3&gt;And, of course, bug fixes&lt;/h3&gt;

&lt;p&gt;Consult the &lt;a href="http://github.com/sstephenson/prototype/blob/1.7_rc1/CHANGELOG"&gt;CHANGELOG&lt;/a&gt; for further details.&lt;/p&gt;

&lt;h3&gt;Download, report bugs, and get help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://prototypejs.org/assets/2010/4/1/prototype.js"&gt;Download Prototype 1.7 RC1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://api.prototypejs.org"&gt;View the API documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/sstephenson/prototype/"&gt;Check out the Prototype source code&lt;/a&gt; on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a href="https://prototype.lighthouseapp.com/projects/8886-prototype/overview"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
&lt;li&gt;&lt;a href="/discuss"&gt;Get prototype help&lt;/a&gt; on the mailing list or #prototype IRC channel&lt;/li&gt;
&lt;li&gt;&lt;a href="http://groups.google.com/group/prototype-core"&gt;Talk to the core team&lt;/a&gt; on the prototype-core mailing list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;As always: thanks to the many contributors who made this release possible!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=nm7KqOwij0M:VJFGwaroKBg:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=nm7KqOwij0M:VJFGwaroKBg:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=nm7KqOwij0M:VJFGwaroKBg:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2010/4/5/prototype-1-7-rc1-sizzle-layout-dimensions-api-event-delegation-and-more</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2009-09-10:25907</id>
    <published>2009-09-10T05:20:00Z</published>
    <updated>2009-09-10T05:21:23Z</updated>
    <category term="blog" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/S7h7Npf78Is/documentation-not-just-new-but-also-improved" rel="alternate" type="text/html" />
    <title>Documentation: not just new, but also improved</title>
<summary type="html">&lt;p&gt;When we officially released 1.6.1 last week, we also published new documentation, the first official docs generated with &lt;a href="http://pdoc.org" title="PDoc"&gt;PDoc&lt;/a&gt;.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;When we officially released 1.6.1 last week, we also published new documentation, the first official docs generated with &lt;a href="http://pdoc.org" title="PDoc"&gt;PDoc&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Tobie, ear to the ground, brought to my attention what many of you were saying (on the blog and &lt;a href="http://search.twitter.com/search?q=%40prototypejs" title="@prototypejs - Twitter Search"&gt;on Twitter&lt;/a&gt;): the new docs were harder to navigate and, therefore, harder to browse. Though I had eventual plans to re-do the navigation, the instant feedback showed it was a more critical issue than I’d guessed. So I spent the last week making some changes to the template we use to generate the docs.&lt;/p&gt;

&lt;p&gt;You can see the results at &lt;a href="http://api.prototypejs.org"&gt;api.prototypejs.org&lt;/a&gt;. The biggest change is obvious: a fixed, always-visible sidebar that makes it easier to move from section to section. Typing in the search box replaces the hierarchical navigation with a list of matching results. Clearing the search box (use the ESC key as a shortcut) switches back to the ordinary navigation. The sidebar will preserve state from page to page — it’ll remember your search term and the scrollbar position.&lt;/p&gt;

&lt;p&gt;The docs aren’t perfect yet, but they’re good enough to use. I’ve tested them on Firefox 3.5, Safari 4.0, and IE 7–8. If there are glitches in these browsers or others, please &lt;a href="http://github.com/savetheclocktower/prototype-pdoc-template/issues"&gt;open issues on the GitHub project&lt;/a&gt;. (If you, as a JavaScript developer, are still using IE 6; I’d like to take you out for a beer and ask you why.)&lt;/p&gt;

&lt;p&gt;We intend for this to be default template included with PDoc, albeit without the Prototype branding. And now that we’ve accomplished the most pressing goal — getting PDoc to generate comprehensive and canonical docs for Prototype — we can focus on the big ideas we’ve got for the next version of our inline documentation tool.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=S7h7Npf78Is:hBsADQQ7t2g:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=S7h7Npf78Is:hBsADQQ7t2g:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=S7h7Npf78Is:hBsADQQ7t2g:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2009/9/10/documentation-not-just-new-but-also-improved</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:prototypejs.org,2009-09-01:25733</id>
    <published>2009-09-01T14:20:00Z</published>
    <updated>2009-09-01T14:25:12Z</updated>
    <category term="blog" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/qXKYqYrrL3U/core-team-update-andrew-and-tobie-take-the-reins" rel="alternate" type="text/html" />
    <title>Core Team update: Andrew &amp; Tobie take the reins</title>
<summary type="html">&lt;p&gt;In addition to &lt;a href="http://prototypejs.org/blog/2009/9/1/prototype-1-6-1-released"&gt;releasing Prototype 1.6.1&lt;/a&gt;, I’m pleased to announce that Andrew Dupont and Tobie Langel now officially head up the Prototype Core Team. They’ll be in charge of maintaining Prototype, deciding what makes the cut for new releases, and handling day-to-day operations.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;In addition to &lt;a href="http://prototypejs.org/blog/2009/9/1/prototype-1-6-1-released"&gt;releasing Prototype 1.6.1&lt;/a&gt;, I’m pleased to announce that Andrew Dupont and Tobie Langel now officially head up the Prototype Core Team. They’ll be in charge of maintaining Prototype, deciding what makes the cut for new releases, and handling day-to-day operations.&lt;/p&gt;
&lt;p&gt;This change in responsibility will let me focus on some infrastructural projects we need for the next-generation version of Prototype. It’ll also help us fix bugs faster and release new versions more frequently. And I’ll remain on the Core Team, contributing code and offering input on &lt;span class="caps"&gt;API&lt;/span&gt; design.&lt;/p&gt;


	&lt;p&gt;Andrew and Tobie have proved themselves to be worthy keepers of the code, so I’m certain Prototype is in good hands. Congratulations, guys, and thanks for all your hard work!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=qXKYqYrrL3U:OOINiuy9hdU:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=qXKYqYrrL3U:OOINiuy9hdU:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=qXKYqYrrL3U:OOINiuy9hdU:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2009/9/1/core-team-update-andrew-and-tobie-take-the-reins</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>sam</name>
    </author>
    <id>tag:prototypejs.org,2009-09-01:25731</id>
    <published>2009-09-01T14:15:00Z</published>
    <updated>2009-09-03T22:39:36Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/eXuED6GTGo0/prototype-1-6-1-released" rel="alternate" type="text/html" />
    <title>Prototype 1.6.1 released</title>
<summary type="html">&lt;p&gt;We’re pleased to announce the release of Prototype 1.6.1 today. This version features improved performance, an element metadata storage system, new mouse events, and compatibility with the latest browsers. It’s also the first release of Prototype built with &lt;a href="http://getsprockets.org/"&gt;Sprockets&lt;/a&gt;, our JavaScript packaging tool, and &lt;a href="http://pdoc.org/"&gt;PDoc&lt;/a&gt;, our inline documentation tool.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;We’re pleased to announce the release of Prototype 1.6.1 today. This version features improved performance, an element metadata storage system, new mouse events, and compatibility with the latest browsers. It’s also the first release of Prototype built with &lt;a href="http://getsprockets.org/"&gt;Sprockets&lt;/a&gt;, our JavaScript packaging tool, and &lt;a href="http://pdoc.org/"&gt;PDoc&lt;/a&gt;, our inline documentation tool.&lt;/p&gt;
&lt;h3&gt;Highlights&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Full compatibility with new browsers.&lt;/strong&gt; This version of Prototype fully supports versions 1.0 and higher of Google Chrome, and Internet Explorer 8 in both compatibility mode and super-standards mode.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Element metadata storage.&lt;/strong&gt; Easily associate JavaScript key/value pairs with a DOM element. &lt;a href="http://prototypejs.org/2009/2/16/pimp-my-code-1-element-storage"&gt;See the blog post that started it off.&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;New mouse events.&lt;/strong&gt; Internet Explorer’s proprietary “mouseenter” and “mouseleave” events are now available in all browsers.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Improved performance and housekeeping.&lt;/strong&gt; The frequently used Function#bind, String#escapeHTML, and Element#down methods are faster, and Prototype is better at cleaning up after itself.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Built with Sprockets.&lt;/strong&gt; You can now include the Prototype source code repository in your application and use &lt;a href="http://getsprockets.org/"&gt;Sprockets&lt;/a&gt; for dependency management and distribution.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Inline documentation with PDoc.&lt;/strong&gt; Our &lt;a href="http://api.prototypejs.org/"&gt;API documentation&lt;/a&gt; is now stored in the source code with &lt;a href="http://pdoc.org/"&gt;PDoc&lt;/a&gt; so it’s easy to send patches or view documentation for a specific version. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;See the &lt;a href="http://prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8-compatibility-element-storage-and-bug-fixes"&gt;RC2 blog post&lt;/a&gt;, &lt;a href="http://prototypejs.org/2009/6/16/prototype-1-6-1-rc3-chrome-support-and-pdoc"&gt;RC3 blog post&lt;/a&gt;, and &lt;a href="http://github.com/sstephenson/prototype/blob/f405b2c510e09b55d08c926a9e1a5c2e2d0a1834/CHANGELOG"&gt;CHANGELOG&lt;/a&gt; for more details.&lt;/p&gt;

&lt;h3&gt;Download, report bugs, and get help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://prototypejs.org/assets/2009/8/31/prototype.js"&gt;Download Prototype 1.6.1&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="/api"&gt;View the API documentation&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/sstephenson/prototype/"&gt;Check out the Prototype source code&lt;/a&gt; on GitHub&lt;/li&gt;
&lt;li&gt;&lt;a href="http://prototype.lighthouseapp.com/"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
&lt;li&gt;&lt;a href="http://prototypejs.org/discuss"&gt;Get Prototype help&lt;/a&gt; on the mailing list or #prototype IRC channel&lt;/li&gt;
&lt;li&gt;&lt;a href="http://groups.google.com/group/prototype-core"&gt;Interact with the Core Team&lt;/a&gt; on the protoype-core mailing list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We hope you enjoy the new version!&lt;/p&gt;

&lt;h3&gt;UPDATE&lt;/h3&gt;

&lt;p&gt;We’re aware of the usability issues with the current PDoc-generated API documentation. We’re working hard to fix those.&lt;/p&gt;

&lt;p&gt;In the meantime, we’ve reverted our changes and you can again access the &lt;a href="/api"&gt;old Prototype documentation&lt;/a&gt;. For those of you courageous enough, the &lt;a href="http://api.prototypejs.org"&gt;new documentation&lt;/a&gt; is still available.&lt;/p&gt;

&lt;p&gt;Sorry for the inconvenience.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=eXuED6GTGo0:AGtlqyYnU1k:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=eXuED6GTGo0:AGtlqyYnU1k:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=eXuED6GTGo0:AGtlqyYnU1k:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2009/9/1/prototype-1-6-1-released</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2009-06-16:25365</id>
    <published>2009-06-16T22:21:00Z</published>
    <updated>2009-06-16T22:23:13Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/yuOblz1fWLc/prototype-1-6-1-rc3-chrome-support-and-pdoc" rel="alternate" type="text/html" />
    <title>Prototype 1.6.1 RC3: Chrome support and PDoc</title>
<summary type="html">&lt;p&gt;Today we’re announcing Release Candidate 3 of Prototype 1.6.1. Among the highlights of this release are official Chrome support, improved IE8 compatibility, faster generation of API documentation with &lt;a href="http://pdoc.org/" title="PDoc"&gt;PDoc&lt;/a&gt;, and lots of bug fixes.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Today we’re announcing Release Candidate 3 of Prototype 1.6.1. Among the highlights of this release are official Chrome support, improved IE8 compatibility, faster generation of API documentation with &lt;a href="http://pdoc.org/" title="PDoc"&gt;PDoc&lt;/a&gt;, and lots of bug fixes.&lt;/p&gt;
&lt;h3&gt;Chrome support&lt;/h3&gt;

&lt;p&gt;Since &lt;a href="http://www.google.com/chrome" title="Google Chrome - Download a new browser"&gt;Google Chrome&lt;/a&gt; is a close sibling of Safari, Prototype has had excellent Chrome compatibility ever since the browser was first released. Now we’re making it official: Prototype supports Chrome 1.0 and greater.&lt;/p&gt;

&lt;p&gt;If you have Chrome installed on your system (Windows only for now, even though early alphas exist for Mac), invoking &lt;code&gt;rake test&lt;/code&gt; will run the unit tests in all locally-installed browsers, including Chrome. To run the unit tests in Chrome alone, try &lt;code&gt;rake test BROWSERS=chrome&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;Generate your own docs with PDoc&lt;/h3&gt;

&lt;p&gt;It’s been a long, strange trip for &lt;a href="http://pdoc.org/" title="PDoc"&gt;PDoc&lt;/a&gt;, the inline-doc tool that will soon be for Prototype and &lt;a href="http://script.aculo.us/" title="script.aculo.us - web 2.0 javascript"&gt;script.aculo.us&lt;/a&gt; what &lt;a href="http://rdoc.sourceforge.net/" title="RDoc - Document Generator for Ruby Source"&gt;RDoc&lt;/a&gt; is for &lt;a href="http://rubyonrails.org/" title="Ruby on Rails"&gt;Rails&lt;/a&gt;. It started as Tobie’s brainchild over a year ago, but key contributions from &lt;a href="http://jcoglan.com/" title="James Coglan"&gt;James Coglan&lt;/a&gt; and &lt;a href="http://github.com/samleb" title="samleb's Profile - GitHub"&gt;Samuel Lebeau&lt;/a&gt; have helped to carry it across the finish line.&lt;/p&gt;

&lt;p&gt;PDoc was a part of RC2, but has since been updated to make doc generation &lt;em&gt;much, much&lt;/em&gt; faster. On my machine, a process that used to take 20 minutes now takes only &lt;em&gt;60 seconds&lt;/em&gt;. Furthermore, we’ve solved a couple of minor issues that made it hard to build the docs on Windows.&lt;/p&gt;

&lt;p&gt;Ever since Prototype 1.5, we’ve kept our documentation in &lt;a href="http://mephistoblog.com/" title="Mephisto—The best blogging system ever"&gt;Mephisto&lt;/a&gt;, the same engine that powers the rest of the site (and this blog). It’s served us well, but it meant that updating the docs became a chore that could only be started once we’d released a particular version. PDoc will make it far easier to maintain our documentation — and far easier to keep archival copies of the docs for older versions of Prototype.&lt;/p&gt;

&lt;p&gt;Upon final release of 1.6.1, we’ll put the generated docs on this site, just like Rails hosts &lt;a href="http://api.rubyonrails.org/" title="Rails Framework Documentation"&gt;its most recent stable documentation&lt;/a&gt;. Until then, you can generate your own local docs by checking out the full source and running &lt;code&gt;rake doc&lt;/code&gt; from the command line.&lt;/p&gt;

&lt;h3&gt;Other improvements&lt;/h3&gt;

&lt;p&gt;There have also been a number of bugs fixed since RC2 — including a heinous bug relating to &lt;code&gt;Event#observe&lt;/code&gt; — and a number of key optimizations. We’ve further improved IE8 compatibility, solving some edge-case issues that popped up since RC2. Credit goes to Juriy (kangax), our newest team member, for working tirelessly these last few months to make 1.6.1 faster and less reliant on browser sniffs.&lt;/p&gt;

&lt;h3&gt;Download, report bugs, and get help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="/assets/2009/6/16/prototype.js"&gt;Download Prototype 1.6.1 RC3&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://prototype.lighthouseapp.com"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
&lt;li&gt;&lt;a href="/discuss"&gt;Get Prototype help&lt;/a&gt; on the mailing list or &lt;code&gt;#prototype&lt;/code&gt; IRC channel&lt;/li&gt;
&lt;li&gt;&lt;a href="http://groups.google.com/group/prototype-core"&gt;Interact with the Core Team&lt;/a&gt; on the protoype-core mailing list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to the many contributors who made this release possible!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=yuOblz1fWLc:8DamXzxIfPs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=yuOblz1fWLc:8DamXzxIfPs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=yuOblz1fWLc:8DamXzxIfPs:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2009/6/16/prototype-1-6-1-rc3-chrome-support-and-pdoc</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2009-03-27:25040</id>
    <published>2009-03-27T23:33:00Z</published>
    <updated>2009-03-27T23:39:26Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <category term="Releases" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/un2FVWWZ23I/prototype-1-6-1-rc2-ie8-compatibility-element-storage-and-bug-fixes" rel="alternate" type="text/html" />
    <title>Prototype 1.6.1 RC2: IE8 compatibility, Element storage, and bug fixes</title>
<summary type="html">&lt;p&gt;Today we tagged the first public release candidate of Prototype 1.6.1. (What happened to RC1? Long story.) While there are more minor fixes we’d like to get into this release, we decided an interim release was necessary because of the final release of &lt;a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx"&gt;Internet Explorer 8&lt;/a&gt; last week.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Today we tagged the first public release candidate of Prototype 1.6.1. (What happened to RC1? Long story.) While there are more minor fixes we’d like to get into this release, we decided an interim release was necessary because of the final release of &lt;a href="http://www.microsoft.com/windows/Internet-explorer/default.aspx"&gt;Internet Explorer 8&lt;/a&gt; last week.&lt;/p&gt;
&lt;p&gt;This is the first public release of Prototype that is fully compatible — and fully &lt;em&gt;optimized for&lt;/em&gt; — Internet Explorer 8’s “super-standards” mode. In particular, Prototype now takes advantage of IE8’s support of the &lt;a href="http://www.w3.org/TR/selectors-api/" title="Selectors API"&gt;Selectors API&lt;/a&gt; and its ability to extend the prototypes of DOM elements.&lt;/p&gt;

&lt;h3&gt;What’s new?&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Full compatibility with Internet Explorer 8&lt;/strong&gt;. &lt;a href="http://thinkweb2.com/projects/prototype/" title="perfection kills"&gt;Juriy&lt;/a&gt; has spearheaded the effort to replace most of our IE “sniffs” into outright capability checks — making it far easier to support IE8 in both “super-standards” mode and compatibility mode.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Element storage&lt;/strong&gt;, a feature &lt;a href="http://prototypejs.org/2009/2/16/pimp-my-code-1-element-storage" title="Prototype JavaScript framework: Pimp My Code #1: Element.Storage"&gt;announced previously&lt;/a&gt;. Safely associate complex metadata with individual elements.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;code&gt;mouseenter&lt;/code&gt; and &lt;code&gt;mouseleave&lt;/code&gt;&lt;/strong&gt; events — simulating the IE-proprietary events that tend to be far more useful than &lt;code&gt;mouseover&lt;/code&gt; and &lt;code&gt;mouseout&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;An &lt;code&gt;Element#clone&lt;/code&gt; method&lt;/strong&gt; for cloning DOM nodes in a way that lets you perform “cleanup” on the new copies.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;What’s been improved?&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Better housekeeping on event handlers in order to prevent memory leaks.&lt;/li&gt;
&lt;li&gt;Better performance in &lt;code&gt;Function#bind&lt;/code&gt;, &lt;code&gt;Element#down&lt;/code&gt;, and a number of other often-used methods.&lt;/li&gt;
&lt;li&gt;A number of bug fixes.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Consult the &lt;a href="http://github.com/sstephenson/prototype/blob/6c38d842544159d2334f2252c9015c737d5046b0/CHANGELOG" title="CHANGELOG at 6c38d842544159d2334f2252c9015c737d5046b0 from sstephenson's prototype - GitHub"&gt;CHANGELOG&lt;/a&gt; for more details.&lt;/p&gt;

&lt;p&gt;In addition to the code itself, the 1.6.1 release features Prototype’s embrace of two other excellent projects we’ve been working on: &lt;a href="http://getsprockets.org/" title="JavaScript dependency management and concatenation: Sprockets"&gt;Sprockets&lt;/a&gt; (JavaScript concatenation) and &lt;a href="http://pdoc.org/" title="PDoc"&gt;PDoc&lt;/a&gt; (inline documentation). Sprockets is now used to “build” Prototype into a single file for distribution. PDoc will be the way we document the framework from now on. The official API docs aren’t quite ready yet, but they’ll be ready for the final release of 1.6.1.&lt;/p&gt;

&lt;h3&gt;Download, Report Bugs, and Get Help&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="/assets/2009/3/27/prototype.js"&gt;Download Prototype 1.6.1_rc2&lt;/a&gt;&lt;/li&gt;
    &lt;li&gt;&lt;a href="https://prototype.lighthouseapp.com/projects/8886-prototype/overview"&gt;Submit bug reports&lt;/a&gt; to Lighthouse&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://prototypejs.org/discuss"&gt;Get Prototype help&lt;/a&gt; on the rails-spinoffs mailing list or #prototype &lt;span class="caps"&gt;IRC&lt;/span&gt; channel&lt;/li&gt;
    &lt;li&gt;&lt;a href="http://groups.google.com/group/prototype-core"&gt;Interact with the Core Team&lt;/a&gt; on the prototype-core mailing list&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Thanks to the many contributors who made this release possible!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=un2FVWWZ23I:UsTuwnCE3Iw:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=un2FVWWZ23I:UsTuwnCE3Iw:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=un2FVWWZ23I:UsTuwnCE3Iw:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2009/3/27/prototype-1-6-1-rc2-ie8-compatibility-element-storage-and-bug-fixes</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2009-02-20:24708</id>
    <published>2009-02-20T01:59:00Z</published>
    <updated>2009-02-20T02:01:06Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/Fou0BVhTbe0/sprockets-beautiful-and-angular" rel="alternate" type="text/html" />
    <title>Sprockets: Beautiful and angular</title>
<summary type="html">&lt;p&gt;&lt;a href="http://www.37signals.com/svn/posts/1587-introducing-sprockets-javascript-dependency-management-and-concatenation" title="Introducing Sprockets: JavaScript dependency management and concatenation - (37signals)"&gt;Over at SvN&lt;/a&gt;, Sam announced the 1.0 release of &lt;a href="http://getsprockets.org/" title="JavaScript dependency management and concatenation: Sprockets"&gt;Sprockets&lt;/a&gt;, the new dependency management and concatenation tool that makes it easy to modularize your JavaScript. Sprockets is Prototype’s new build system, but it’s also been &lt;a href="http://github.com/sstephenson/sprockets/tree/master" title="sstephenson's sprockets at master - GitHub"&gt;extracted into a Ruby library&lt;/a&gt; so &lt;em&gt;you&lt;/em&gt; can use it anywhere you write JavaScript.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;&lt;a href="http://www.37signals.com/svn/posts/1587-introducing-sprockets-javascript-dependency-management-and-concatenation" title="Introducing Sprockets: JavaScript dependency management and concatenation - (37signals)"&gt;Over at SvN&lt;/a&gt;, Sam announced the 1.0 release of &lt;a href="http://getsprockets.org/" title="JavaScript dependency management and concatenation: Sprockets"&gt;Sprockets&lt;/a&gt;, the new dependency management and concatenation tool that makes it easy to modularize your JavaScript. Sprockets is Prototype’s new build system, but it’s also been &lt;a href="http://github.com/sstephenson/sprockets/tree/master" title="sstephenson's sprockets at master - GitHub"&gt;extracted into a Ruby library&lt;/a&gt; so &lt;em&gt;you&lt;/em&gt; can use it anywhere you write JavaScript.&lt;/p&gt;
&lt;p&gt;There are many great ways to use Sprockets in your own projects. You can use it the way Prototype does — split up your JavaScript into small, maintainable files, then &lt;a href="http://github.com/sstephenson/prototype/blob/ab1313ea202e0d0bfb7cd0f563b035040710da9b/src/dom.js" title="src/dom.js at ab1313ea202e0d0bfb7cd0f563b035040710da9b from sstephenson's prototype - GitHub"&gt;create “meta-files”&lt;/a&gt; that include the smaller files in a logical order. Prototype had previously been doing this with plain ERB; now we integrate Sprockets as a Git submodule and use it to build our distributable file.&lt;/p&gt;

&lt;p&gt;Sprockets can also be used to write JavaScript “plugins”: bundles of files that can easily be integrated into existing code. With Sprockets, &lt;a href="http://getsprockets.org/installation_and_usage#specifying_dependencies_with_the_require_directive" title="JavaScript dependency management and concatenation: Sprockets"&gt;you can formally declare&lt;/a&gt; that &lt;code&gt;foo.js&lt;/code&gt; depends on &lt;code&gt;thud.js&lt;/code&gt;; when your files are concatenated into one output file, &lt;code&gt;thud.js&lt;/code&gt; will be included first.&lt;/p&gt;

&lt;p&gt;In addition, &lt;a href="http://getsprockets.org/installation_and_usage#bundling_assets_with_the_provide_directive" title="JavaScript dependency management and concatenation: Sprockets"&gt;Sprockets lets JavaScript files &lt;em&gt;provide&lt;/em&gt; other assets&lt;/a&gt; — HTML, CSS, images, and the like. At build time, those assets will be copied into the document root of your server (in a way that preserves the sub-structure of directories within). This allows the plugin to refer to those assets via absolute URLs, instead of having to ask you where they’re located.&lt;/p&gt;

&lt;p&gt;A few facts are worth special mention.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sprockets does not require Prototype.&lt;/strong&gt; Sprockets directives can be inserted into any arbitrary JavaScript file. You can use Sprockets in your build system no matter which JavaScript framework you prefer.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sprockets does not require Rails.&lt;/strong&gt; Sam has also written an excellent &lt;code&gt;sprockets-rails&lt;/code&gt; plugin, one which deftly applies the conventions of Rails plugins to JavaScript. But he has also written a &lt;a href="http://github.com/sstephenson/sprockets/blob/e0ddeaf4c2f1e9e175df6dc909afd78057326a42/ext/nph-sprockets.cgi" title="ext/nph-sprockets.cgi at e0ddeaf4c2f1e9e175df6dc909afd78057326a42 from sstephenson's sprockets - GitHub"&gt;generic CGI wrapper around Sprockets&lt;/a&gt; that is framework-agnostic. Or, instead, you can integrate Sprockets into your build cycle without bothering your server stack with the details. If you use Rake, you can do this with Ruby, as Prototype does; otherwise you can use the &lt;code&gt;sprocketize&lt;/code&gt; binary from the command line.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Sprockets-enabled JavaScript files can work just fine without Sprockets.&lt;/strong&gt; If your plugin has its own “build stage,” then the distributable JavaScript will include no Sprockets directives. On the other hand, if your plugin is small enough not to require this overhead, your distributable can be a short JS file that declares its external dependencies at the top. Because &lt;code&gt;require&lt;/code&gt; directives are an extension of comment syntax, they won’t confuse a JS interpreter.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;In short, we’re excited about what Sprockets means for the Prototype ecosystem. If you maintain a Prototype add-on library, the &lt;a href="http://groups.google.com/group/prototype-core" title="Prototype: Core | Google Groups"&gt;prototype-core mailing list&lt;/a&gt; would love to help you make it Sprockets-aware.&lt;/p&gt;

&lt;p&gt;Now is the time on Sprockets when we dance.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=Fou0BVhTbe0:CA_XA968tkY:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=Fou0BVhTbe0:CA_XA968tkY:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=Fou0BVhTbe0:CA_XA968tkY:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2009/2/20/sprockets-beautiful-and-angular</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2009-02-16:24535</id>
    <published>2009-02-16T08:41:00Z</published>
    <updated>2009-04-08T14:48:20Z</updated>
    <category term="blog" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/9Y2giB4vZLc/pimp-my-code-1-element-storage" rel="alternate" type="text/html" />
    <title>Pimp My Code #1: Element.Storage</title>
<summary type="html">&lt;p&gt;Man, it's quiet around here. Interested in doing some pimpin'?&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Man, it's quiet around here. Interested in doing some pimpin'?&lt;/p&gt; 
&lt;p&gt;WAIT! COME BACK.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Code&lt;/em&gt; pimping. You know? &lt;a href="http://prototypejs.org/2008/10/7/want-your-code-pimped" title="Prototype JavaScript framework: Want your code 'pimped'?"&gt;The thing I'd discussed before&lt;/a&gt;? Forgive my earlier informality. I see now how my words could have been confusing.&lt;/p&gt;

&lt;p&gt;The very first edition of &lt;cite&gt;Pimp My Code&lt;/cite&gt; is special because the code we’ll be looking at &lt;em&gt;will be included in Prototype 1.6.1&lt;/em&gt;. (It's a bit like if we were to Pimp [someone's] Ride™, then decide to keep the car for ourselves.) So this is more than just an academic exercise for us — the “pimped” result is now part of the Prototype source code.&lt;/p&gt;

&lt;h3&gt;The Original&lt;/h3&gt;

&lt;p&gt;The code in question, from Sébastien Grosjean (a.k.a. ZenCocoon), implements element “storage” — attaching of arbitrary data to DOM nodes in a safe and leak-free manner. Other frameworks have had this for a while; &lt;a href="http://jquery.com/" title="jQuery: The Write Less, Do More, JavaScript Library"&gt;jQuery&lt;/a&gt;’s &lt;code&gt;$.fn.data&lt;/code&gt;, for instance, is used heavily by jQuery plugin authors &lt;a href="http://docs.jquery.com/Internals/jQuery.data" title="Internals/jQuery.data - jQuery JavaScript Library"&gt;to great effect&lt;/a&gt;. But Seb’s is based on the similar Mootools API, which I’ve admired since &lt;a href="http://mootools.net/blog/2008/01/22/whats-new-in-12-element-storage/" title="MooTools - What’s New in 1.2: Element Storage"&gt;it debuted in Mootools 1.2&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Here’s Seb’s code. It’s a long code block, since he’s been thoughtful enough to comment the hell out of it:&lt;/p&gt;

&lt;p&gt;The idea is this: instead of storing arbitrary objects as properties on DOM nodes, create &lt;em&gt;one&lt;/em&gt; custom property on the DOM node: an index to a global hashtable. The value of that key in the table will itself be a collection of custom key/value pairs. On top of avoiding nasty IE memory leaks (circular references between DOM objects and JS objects), this has the benefit of encapsulating all of an element’s custom metadata into one place.&lt;/p&gt;

&lt;p&gt;Let’s make a first pass at this, line-by-line.&lt;/p&gt;

&lt;h3&gt;The Critique&lt;/h3&gt;

&lt;pre&gt;&lt;code class=""&gt;Object.extend(Prototype, {UID: 1});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Already we’ve gotten to something I’d change. Seb is using the &lt;code&gt;Prototype&lt;/code&gt; namespace correctly here, in that he’s storing something that’s of concern only to the framework and should feel “private.” But my own preference is to move this property into the &lt;code&gt;Element.Storage&lt;/code&gt; namespace. I am fickle and my mind is hard to read.&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;Element.Storage = {
  get: function(uid) {
    return (this[uid] || (this[uid] = {}));
  },

  init: function(item) {
    return (item.uid || (item.uid = Prototype.UID++));
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;OK, another change jumps out at me. The &lt;code&gt;Element.Storage.init&lt;/code&gt; method gets called in both &lt;code&gt;Element#store&lt;/code&gt; and &lt;code&gt;Element#retrieve&lt;/code&gt;; it handles the case where an element doesn’t have any existing metadata. It creates our custom property on the node and increments the counter.&lt;/p&gt;

&lt;p&gt;In other words, &lt;code&gt;store&lt;/code&gt; and &lt;code&gt;retrieve&lt;/code&gt; are the only two places where this method is needed, so I balk at making it public. My first instinct was to make it a private method inside a closure:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;(function() {
  function _init(item) {
    return (item.uid || (item.uid = Prototype.UID++));
  }

  // ... rest of storage code
})();&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I started down this path but quickly stopped. Instead, we’re going to refactor this part so that the &lt;code&gt;init&lt;/code&gt; case is handled without the need for a separate method. Let’s move on for now.&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;Element.Methods.retrieve = function(element, property, dflt) {
  if (!(element = $(element))) return;
  if (element.uid == undefined) Element.Storage.init(element);
  var storage = Element.Storage.get(element.uid);
  var prop = storage[property];
  if (dflt != undefined &amp;&amp; prop == undefined)
    prop = storage[property] = dflt;
  return prop;
};&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;A few things to mention here.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;
    &lt;p&gt;Variable naming is important. The ideal name for the third parameter of this function would be &lt;code&gt;default&lt;/code&gt;, but that’s off-limits; &lt;code&gt;default&lt;/code&gt; is a reserved word in JavaScript. Seb’s opted for &lt;code&gt;dflt&lt;/code&gt; here, which is clear enough. I’d change it to &lt;code&gt;defaultValue&lt;/code&gt; because I like vowels.&lt;/p&gt;


&lt;p&gt;As an aside: my first instinct was to remove the &lt;code&gt;defaultValue&lt;/code&gt; thing altogether, because I was surprised by the way it behaved. I didn’t find it very intuitive to give &lt;code&gt;Element#retrieve&lt;/code&gt; the capability to &lt;em&gt;store&lt;/em&gt; properties as well. So I took it out.&lt;/p&gt;

&lt;p&gt;I changed my mind several minutes later, when I wrote some code that leveraged element metadata. I had assumed I wouldn’t need the “store a default value” feature often enough to warrant the surprising behavior, but I was &lt;em&gt;spectacularly wrong&lt;/em&gt;. I put it back in. Consider that a lesson on how your API design needs to be grounded in use cases.&lt;/p&gt;

  &lt;/li&gt;

  &lt;li&gt;
    &lt;p&gt;The idiom in the first line is used throughout Prototype and script.aculo.us (and, in fact, should be used more consistently). It runs the argument through &lt;code&gt;$&lt;/code&gt;, but also checks the return value to ensure we got back a DOM node and not &lt;code&gt;null&lt;/code&gt; (as would happen if you passed a non-existent ID). An empty &lt;code&gt;return&lt;/code&gt; is equivalent to &lt;code&gt;return undefined&lt;/code&gt;, which (IMO) is an acceptable failure case. Bonus points, Seb!&lt;/p&gt;
  &lt;/li&gt;

  &lt;li&gt;
    &lt;p&gt;&lt;p&gt;The custom property Seb’s been using is called &lt;code&gt;uid&lt;/code&gt;. I’m going to change this to something that’s both (a) clearly private; (b) less likely to cause a naming collision. In keeping with existing Prototype convention, we’re going to call it &lt;code&gt;_prototypeUID&lt;/code&gt;.&lt;/p&gt;
&lt;/p&gt;
  &lt;/li&gt;

  &lt;li&gt;
     &lt;p&gt;Here’s a nitpick: &lt;code&gt;if (element.uid == undefined)&lt;/code&gt;. The comparison operator (&lt;code&gt;==&lt;/code&gt;) isn’t very precise, so if you’re testing for &lt;code&gt;undefined&lt;/code&gt;, you should use the identity operator (&lt;code&gt;===&lt;/code&gt;). You could also use Prototype’s &lt;code&gt;Object.isUndefined&lt;/code&gt;. In fact, I will.&lt;/p&gt;


    &lt;p&gt;I have a prejudice against the &lt;code&gt;==&lt;/code&gt; operator. Most of the time the semantics of &lt;code&gt;===&lt;/code&gt; are closer to what you &lt;em&gt;mean&lt;/em&gt;. But this has special significance with &lt;code&gt;undefined&lt;/code&gt;, which one encounters often in JavaScript. As an example: when you’re trying to figure out if an optional parameter was passed into a function, you’re looking for &lt;code&gt;undefined&lt;/code&gt;. Any other value, no matter how “falsy” it is, means the parameter &lt;em&gt;was&lt;/em&gt; given; &lt;code&gt;undefined&lt;/code&gt; means it &lt;em&gt;was not&lt;/em&gt;.&lt;/p&gt;


    &lt;p&gt;(Oh, by the way: I am aware of the code screenshot on our homepage that violates the advice I just gave.)&lt;/p&gt;
  &lt;/li&gt;

  &lt;li&gt;
    &lt;p&gt;There are other checks against &lt;code&gt;undefined&lt;/code&gt; in this function. For consistency I’m going to change these to use &lt;code&gt;Object.isUndefined&lt;/code&gt; as well. Also, the check for &lt;code&gt;dflt != undefined&lt;/code&gt; is unnecessary: if that compound conditional passes, it means &lt;code&gt;retrieve&lt;/code&gt; is going to return &lt;code&gt;undefined&lt;/code&gt; anyway, so it doesn’t matter which of the two &lt;code&gt;undefined&lt;/code&gt; values we return.&lt;/p&gt;

  &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Man, I’m a bastard, aren’t I? Luckily, &lt;code&gt;Element#store&lt;/code&gt; is similar enough that there’s no new feedback to be given here, so I’m done kvetching.&lt;/p&gt;

&lt;p&gt;Before we rewrite this code to reflect the changes I’ve suggested, we’re going to make a couple design decisions.&lt;/p&gt;

&lt;h3&gt;Feature Design&lt;/h3&gt;

&lt;p&gt;While I was deciding how to replace &lt;code&gt;Element.Storage.init&lt;/code&gt;, I had an idea: rather than use ordinary &lt;code&gt;Object&lt;/code&gt;s to store the data, we should be using Prototype’s &lt;code&gt;Hash&lt;/code&gt;. In other words, we’ll create a global table of &lt;code&gt;Hash&lt;/code&gt; objects, each one representing the custom key-value pairs for a specific element.&lt;/p&gt;

&lt;p&gt;This isn’t just a plumbing change; it’s quite useful to be able to deal with the custom properties in a group rather than just one-by-one. And since &lt;code&gt;Hash&lt;/code&gt; mixes in &lt;code&gt;Enumerable&lt;/code&gt;, interesting use cases emerge: e.g., looping through all properties and acting on those that begin with a certain “namespace.”&lt;/p&gt;

&lt;p&gt;So let’s envision a new method: &lt;code&gt;Element#getStorage&lt;/code&gt;. Given an element, it will return the &lt;code&gt;Hash&lt;/code&gt; object associated with that element. If there isn’t one, it can “initialize” the storage on that element, thus making &lt;code&gt;Element.Storage.init&lt;/code&gt; unnecessary.&lt;/p&gt;

&lt;p&gt;This new method also establishes some elegant parallels: the &lt;code&gt;store&lt;/code&gt; and &lt;code&gt;retrieve&lt;/code&gt; methods are really just aliases for &lt;code&gt;set&lt;/code&gt; and &lt;code&gt;get&lt;/code&gt; on the hash itself. Actually, &lt;code&gt;retrieve&lt;/code&gt; will be a bit more complicated because of the “default value” feature, but we’ll be able to condense &lt;code&gt;store&lt;/code&gt; down to two lines.&lt;/p&gt;

&lt;h3&gt;The Rewrite&lt;/h3&gt;

&lt;p&gt;Enough blathering. Here’s the rewrite:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;Element.Storage = {
  UID: 1
};&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;As promised, I’ve moved the &lt;code&gt;UID&lt;/code&gt; counter. The &lt;code&gt;Element.Storage&lt;/code&gt; object also acts as our global hashtable, but all its keys will be numeric, so the &lt;code&gt;UID&lt;/code&gt; property won’t get in anyone’s way.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;Element#getStorage&lt;/code&gt; assumes the duties of &lt;code&gt;Element.Storage.get&lt;/code&gt; and &lt;code&gt;Element.Storage.init&lt;/code&gt;, thereby making them obsolete. We’ve removed them.&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;Element.addMethods({
  getStorage: function(element) {
    if (!(element = $(element))) return;

    if (Object.isUndefined(element._prototypeUID))
      element._prototypeUID = Element.Storage.UID++;

    var uid = element._prototypeUID;

    if (!Element.Storage[uid])
      Element.Storage[uid] = $H();

    return Element.Storage[uid];
  },&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The new &lt;code&gt;getStorage&lt;/code&gt; method checks for the presence of &lt;code&gt;_prototypeUID&lt;/code&gt;. If it’s not there, it gets defined on the node.&lt;/p&gt;

&lt;p&gt;It then looks for the corresponding &lt;code&gt;Hash&lt;/code&gt; object in &lt;code&gt;Element.Storage&lt;/code&gt;, creating an empty &lt;code&gt;Hash&lt;/code&gt; if there’s nothing there.&lt;/p&gt;

&lt;p&gt;As I said before, &lt;code&gt;Element#store&lt;/code&gt; is much simpler now:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;  store: function(element, key, value) {
    if (!(element = $(element))) return;
    element.getStorage().set(key, value);
    return element;
  },&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;I thought about returning the stored value, to make it behave exactly like &lt;code&gt;Hash#set&lt;/code&gt;, but some feedback from others suggested it was better to return the element itself for chaining purposes (as we do with many methods on &lt;code&gt;Element&lt;/code&gt;).&lt;/p&gt;

&lt;p&gt;And &lt;code&gt;Element#retrieve&lt;/code&gt; is nearly as simple:&lt;/p&gt;

&lt;pre&gt;&lt;code class="javascript"&gt;  retrieve: function(element, key, defaultValue) {
    if (!(element = $(element))) return;

    var hash = element.getStorage(), value = hash.get(key);

    if (Object.isUndefined(value)) {
      hash.set(key, defaultValue);
      value = defaultValue;
    }

    return value;
  }
});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;And we’re done.&lt;/p&gt;

&lt;h3&gt;Further refinements&lt;/h3&gt;

&lt;p&gt;In fact, we’re &lt;em&gt;not&lt;/em&gt; done. This is roughly what the code looked like when I first checked in this feature, but some further improvements have been made.&lt;/p&gt;

&lt;p&gt;Since we’d been using a system similar to this to associate event handlers with nodes, we had to rewrite that code to use the new storage API. In doing so, we found that we needed to include &lt;code&gt;window&lt;/code&gt; in our storage system, since it has events of its own. Rather than define a &lt;code&gt;_prototypeUID&lt;/code&gt; property on the global object, we give &lt;code&gt;window&lt;/code&gt; a UID of &lt;code&gt;0&lt;/code&gt; and check for it specifically in &lt;code&gt;Element#getStorage&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Also, based on an excellent suggestion, we changed &lt;code&gt;Element#store&lt;/code&gt; so that it could accept an object full of key/value pairs, much like &lt;code&gt;Hash#update&lt;/code&gt;.&lt;/p&gt;

&lt;h3&gt;In Summation&lt;/h3&gt;

&lt;p&gt;I was happy to come across Sébastien's submission. It was the perfect length for a drive-by refactoring; it made sense as a standalone piece of code, without need for an accompanying screenshot or block of HTML; and it implemented a feature we'd already had on the 1.6.1 roadmap.&lt;/p&gt;

&lt;p&gt;You can &lt;a href="http://github.com/sstephenson/prototype/tree/master" title="sstephenson's prototype at master - GitHub"&gt;get the bleeding-edge Prototype&lt;/a&gt; if you want to try out the code we wrote. Or you can &lt;a href="http://gist.github.com/53924" title="gist: 53924 - GitHub"&gt;grab this gist&lt;/a&gt; if you want to drop the new functionality in alongside 1.6.0.3.&lt;/p&gt;

&lt;p&gt;We're further grateful to Mootools for the API we're stealing. And to &lt;a href="http://www.wilshipley.com/blog/" title="Call Me Fishmeal."&gt;Wil Shipley&lt;/a&gt; for the recurring blog article series we're stealing.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=9Y2giB4vZLc:h0rhkVuUTFk:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=9Y2giB4vZLc:h0rhkVuUTFk:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=9Y2giB4vZLc:h0rhkVuUTFk:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2009/2/16/pimp-my-code-1-element-storage</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Tobie</name>
    </author>
    <id>tag:prototypejs.org,2008-10-17:22154</id>
    <published>2008-10-17T07:32:00Z</published>
    <updated>2008-10-17T07:33:12Z</updated>
    <category term="blog" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/cGBpHFk_-pw/prototype-linkedin-group" rel="alternate" type="text/html" />
    <title>Prototype Linkedin Group</title>
<summary type="html">&lt;p&gt;When we first &lt;a href="http://prototypejs.org/2008/5/6/prototype-linkedin-group"&gt;launched&lt;/a&gt; the &lt;a href="http://www.linkedin.com/e/gis/99273/13A82A188D9E"&gt;Linkedin Prototype Group&lt;/a&gt;, we weren’t necessarily expecting it to be such a success–it’s over 800 members strong and counting.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;When we first &lt;a href="http://prototypejs.org/2008/5/6/prototype-linkedin-group"&gt;launched&lt;/a&gt; the &lt;a href="http://www.linkedin.com/e/gis/99273/13A82A188D9E"&gt;Linkedin Prototype Group&lt;/a&gt;, we weren’t necessarily expecting it to be such a success–it’s over 800 members strong and counting.&lt;/p&gt;
&lt;p&gt;Also, at the time, there wasn’t much you could do after having joined the group. This has changed with the recent introduction of discussions.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.linkedin.com/groupAnswers?viewQuestionAndAnswers=&amp;amp;gid=99273&amp;amp;discussionID=196323"&gt;One of the first posts&lt;/a&gt; spurred some thoughts about the usefulness and goals of this Linkedin group especially given the high quality of our &lt;a href="http://groups.google.com/group/prototype-scriptaculous"&gt;new mailing list&lt;/a&gt;. (And let me take the opportunity to sincerely thank &lt;a href="http://crowdersoftware.com/"&gt;T.J. Crowder&lt;/a&gt; for all the effort he’s put into it.)&lt;/p&gt;

&lt;p&gt;My initial reaction, based on &lt;a href="http://groups.google.com/group/prototype-scriptaculous/browse_thread/thread/efc72972db79650e"&gt;an early August thread&lt;/a&gt; was to suggest keeping the development-orientated discussions in the mailing list, while expecting more career-orientated ones to take place in the Linkedin group.&lt;/p&gt;

&lt;p&gt;Of course, there’s no way we can nor should be controlling this, and in the end, you will be deciding what will happen where. So I suppose the only real &lt;em&gt;raison d’être&lt;/em&gt; of this post is to advise you of this new feature and open up the debate.&lt;/p&gt;

&lt;p&gt;Thoughts ?&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=cGBpHFk_-pw:g27KyVDtYFs:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=cGBpHFk_-pw:g27KyVDtYFs:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=cGBpHFk_-pw:g27KyVDtYFs:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2008/10/17/prototype-linkedin-group</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2008-10-07:22119</id>
    <published>2008-10-07T21:23:00Z</published>
    <updated>2008-10-07T21:24:52Z</updated>
    <category term="blog" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/5eWauAF1H94/want-your-code-pimped" rel="alternate" type="text/html" />
    <title>Want your code "pimped"?</title>
<summary type="html">&lt;p&gt;We decided it’s finally time to implement an idea we had long ago.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;We decided it’s finally time to implement an idea we had long ago.&lt;/p&gt;
&lt;p&gt;I’m an avid reader of the blog of Wil Shipley, a man in the business of writing great apps for OS X. His running code improvment series, &lt;a href="http://www.wilshipley.com/blog/2005/07/i-will-insult-your-code.html" title="Call Me Fishmeal.: I will insult your code!"&gt;Pimp My Code&lt;/a&gt;, takes submissions from readers who think their code needs refactoring. Then Shipley refactors them, explaining the whys and hows along the way. The submissions are small (never more than 75-100 lines), but in rewriting them Shipley always happens upon specific, useful programming tips. I don’t know the first thing about Objective-C, but I find the series fascinating and instructive.&lt;/p&gt;

&lt;p&gt;So we’re going to do something similar on this blog. Do you have a piece of JavaScript you want refactored? Does it use Prototype? Do this:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Sign up for a &lt;a href="https://github.com/"&gt;GitHub&lt;/a&gt; account if you don’t have one. It’s free and quick.&lt;/li&gt;
&lt;li&gt;Go to &lt;a href="http://gist.github.com/" title="Gist &amp;mdash; GitHub"&gt;Gist&lt;/a&gt;, GitHub’s pastebin app, and paste the code you want us to refactor. Mark it as “private” if you like.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://github.com/inbox/new/savetheclocktower"&gt;Message me on GitHub&lt;/a&gt; with the URL to your code snippet. If necessary, explain a bit about what the code does (or should do), but don’t write an epistle or anything.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;I’ll share the submissions with the rest of the team and we’ll pick a few that we like. Then we’ll dedicate a post to each one, refactoring out loud along the way. We won’t be mean or snarky; this is not a &lt;a href="http://thedailywtf.com/" title="The Daily WTF: Curious Perversions in Information Technology"&gt;DailyWTF&lt;/a&gt;-style exercise.&lt;/p&gt;

&lt;p&gt;To pre-empt the obvious rebuttal: we do not consider this to be an act of charity, or code manna from computer heaven, or a gift from the light-bearers to the huddled masses. Whether we actually “improve” your code is not for us to say. It will, however, illustrate our coding style.&lt;/p&gt;

&lt;p&gt;If that sounds useful to you, then step up! Give us code and ask that it be pimped!&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=5eWauAF1H94:G-WmhzEtjBM:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=5eWauAF1H94:G-WmhzEtjBM:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=5eWauAF1H94:G-WmhzEtjBM:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2008/10/7/want-your-code-pimped</feedburner:origLink></entry>
  <entry xml:base="http://prototypejs.org/">
    <author>
      <name>Andrew</name>
    </author>
    <id>tag:prototypejs.org,2008-10-07:22118</id>
    <published>2008-10-07T17:39:00Z</published>
    <updated>2008-10-07T19:37:06Z</updated>
    <category term="blog" />
    <category term="Featured" />
    <link href="http://feedproxy.google.com/~r/prototype-blog/~3/7ffph10QC2A/growing-the-community" rel="alternate" type="text/html" />
    <title>Growing the community</title>
<summary type="html">&lt;p&gt;Now that 1.6.0.3 is out, let’s talk about the Prototype community.&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Now that 1.6.0.3 is out, let’s talk about the Prototype community.&lt;/p&gt;
&lt;p&gt;A lot of people have been commenting on how quiet it’s been around here over the last few months. There are several reasons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We were quite busy with behind-the-scenes stuff. Moving to &lt;a href="http://github.com"&gt;GitHub&lt;/a&gt; and &lt;a href="http://lighthouseapp.com"&gt;Lighthouse&lt;/a&gt; was quite the task. As part of that migration we went through all the bugs on the old Rails Trac and were therefore left with a large backlog of bugs that we’d waited too long to address.&lt;/li&gt;
&lt;li&gt;We were quite busy with our day jobs. Only a couple of us are freelancers; the rest work full-time for software companies. And usually there are several people working on Prototype at any one time, but over the summer it’s rarely been more than one or two.&lt;/li&gt;
&lt;li&gt;In an effort to “catch up” with the accumulated tickets, we tried to stuff too much into a single bugfix release. We need to keep releases small and focused; trying to change too much at once tends to disorient us and our users. Once we realized we needed to scale back this release, it took a while to figure out which changes needed to stay and which needed to be reverted.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These aren’t excuses; they’re just explanations. As a team, we agree that we’ve got to prevent such a long release gap from happening again, and to keep an eye out for warning signs like the ones listed above.&lt;/p&gt;

&lt;p&gt;This means, among other things, that we’re planning to move away from a “when it’s ready” release schedule. Instead, we’ll move toward one in which there are several releases per year; whatever &lt;em&gt;is&lt;/em&gt; ready in time for a given release will go in, and whatever &lt;em&gt;is not&lt;/em&gt; will have to wait. That applies to bug fixes and features alike. Eight months between releases just won’t work.&lt;/p&gt;

&lt;h3&gt;What you can do&lt;/h3&gt;

&lt;p&gt;Community outreach was one of the major goals of Prototype Developer Day. Many people are frustrated with the state of the Prototype community and would like to see some changes made. We’re in complete agreement.&lt;/p&gt;

&lt;p&gt;Ideally, as an open-source community grows, those who want to help out gravitate toward specific roles. Those who can grok the source code write patches; those who are good at diagnosing problems file bug reports; those who can write clearly contribute documentation; and so on. We’d love to grow that “halo” around Prototype Core so that things can get done more quickly.&lt;/p&gt;

&lt;p&gt;To be more specific, we would love help in any of these areas:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Give support on the &lt;a href="http://groups.google.com/group/prototype-scriptaculous"&gt;Prototype &amp;amp; scrip.aculous mailing list&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;&lt;a href="http://prototype.lighthouseapp.com/projects/8886/home"&gt;File bugs in Lighthouse&lt;/a&gt; when you encounter errors or surprising behavior in Prototype.&lt;/li&gt;
&lt;li&gt;Write test cases or patches for &lt;a href="http://prototype.lighthouseapp.com/projects/8886-prototype/tickets?q=tagged%3A%22needs_tests%22"&gt;existing bugs in Lighthouse&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Discuss the direction of the library and its future on the &lt;a href="http://groups.google.com/group/prototype-core"&gt;Prototype Core mailing list&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Propose new features and implement them.&lt;/li&gt;
&lt;li&gt;Write documentation wherever you feel we need more; &lt;a href="http://prototype.lighthouseapp.com/projects/8886/home"&gt;submit it to Lighthouse&lt;/a&gt; as an enhancement.&lt;/li&gt;
&lt;li&gt;Suggest blog posts. (Or even write them!) &lt;a href="http://groups.google.com/group/prototype-core"&gt;Post to the Prototype Core list&lt;/a&gt; if you’re interested in doing this.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;There are, of course, many other things one can do to help us out. But if you’re looking for a way to contribute and don’t have something specific in mind, we’d suggest doing one of these seven things.&lt;/p&gt;

&lt;h3&gt;What we can do&lt;/h3&gt;

&lt;p&gt;We know we need more help, but we also know we need to be better community curators. So here are some things we pledge to do better:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;We’ll beef up the Prototype web site so that it’s easier to get started with the framework, easier to find great resources like &lt;a href="http://scripteka.com/" title="Scripteka :: Prototype extensions library"&gt;Scripteka&lt;/a&gt; and &lt;a href="http://prototype-ui.com/" title="Prototype UI"&gt;Prototype UI&lt;/a&gt;, and easier to find answers to common questions.&lt;/li&gt;
&lt;li&gt;We’ll give special attention to documentation tickets on Lighthouse so that our API docs don’t stay stale and thin.&lt;/li&gt;
&lt;li&gt;We’ll release on a more consistent schedule, as explained above.&lt;/li&gt;
&lt;li&gt;We’ll resume work on &lt;a href="http://github.com/tobie/pdoc/tree/master"&gt;PDoc&lt;/a&gt; (inline documentation) and &lt;a href="http://github.com/sstephenson/sprockets/tree/master"&gt;Sprockets&lt;/a&gt; (JS dependency management), spin-off projects that make Prototype more of a “platform.” They’ll be a boon to the Prototype ecosystem when they’re completed.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Finally: if you consider yourself to be good at planning and organizing an open-source project, then we’d love your input on how to grow our community. Our highest priority, however, is not to launch a new initiative or process; it’s to get more people doing the seven things listed above.&lt;/p&gt;
          &lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=7ffph10QC2A:Y3NiAsSnz_c:V_sGLiPBpWU"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?i=7ffph10QC2A:Y3NiAsSnz_c:V_sGLiPBpWU" border="0"&gt;&lt;/img&gt;&lt;/a&gt; &lt;a href="http://feeds.feedburner.com/~ff/prototype-blog?a=7ffph10QC2A:Y3NiAsSnz_c:7Q72WNTAKBA"&gt;&lt;img src="http://feeds.feedburner.com/~ff/prototype-blog?d=7Q72WNTAKBA" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content>  <feedburner:origLink>http://prototypejs.org/2008/10/7/growing-the-community</feedburner:origLink></entry>
</feed>
