Archive for 'Prototype'
V1.8.2: Prototype 1.6.0.3, service release/bug fixes
November 18, 2008 | Filed under: Prototype
This is a bugfix release that bumps script.aculo.us to version 1.8.1.
This version is recommended for all users.
…
Trying to be private in JavaScript
November 17, 2008 | Filed under: Prototype
Erik Arvidsson has an updated take on instance private, class private, package and friends.
One thing that shoots out at you is actually at the end:
Gmail was written without any true private members. We just use a naming convention.
We love to focus on little geek things like encapsulation, but once again… you can write amazing, complex applications without purity.
In his …
LightBox 2.0 for WordPress
November 10, 2008 | Filed under: Prototype
Lightbox Javascript is a script based on Prototype and Scriptaculous, which allows you to view individual photos and galleries.
How Do You Prototype Your Apps?
November 5, 2008 | Filed under: Prototype
I’ve seen more ways to create application prototypes than I can count, from PowerPoint (I’m look at you Chuck) to FileMaker Pro (and you, Bob) and everything in-between. Often, I see folks skip prototypes entirely and just using good ol’ OmniGraffle / Illustrator / Photoshop / hand-drawn wireframes with sticky notes. Never have any of the mechanisms I’ve seen or …
Quiz Prototype - Rolling Text in JavaScript (Beats! Design)
November 1, 2008 | Filed under: Prototype
I thought it was about time for a new mini-project so I got to work on an easy-to-use quiz applet. The idea was to set a quiz out on one page, but use JavaScript to bring each question in one at-a-time, rolling in and replacing the previous. The JavaScript / Ajax would carry and process the form data, bringing the …
Prototype Javascript Calendar
October 31, 2008 | Filed under: Prototype
Found a great javascript calendar. Works with Prototype and Scriptaculous libraries. Seems to work well, allows developers to utilize this date-picker free of charge for even commercial projects. Easy to integrate and helps to keep user submitted data sanitized.
CleverValidation: Plugin for ruby on rails validation
October 31, 2008 | Filed under: Prototype
CleverValidation is an extension to the existing rails validation methods that includes the ability to customize your validation error messages and features javascript functionality for adding a bit of interaction to your validations via scriptaculous effects.
Using Prototype Javascript to get the value of a radio group
October 30, 2008 | Filed under: Prototype
A useful function for retrieving radio list values via Prototype.
20 Amazing Javascript Prototype Scripts
October 29, 2008 | Filed under: Prototype
20 Amazing Javascript Prototype Scripts, Elements, Widgets, Classes…
Cognizant -Contract to Hire -Java, JQuery, Prototype -Pune
October 18, 2008 | Filed under: Prototype
Company : Cognizant (www.cognizant.com)Skills: JavaPrimary: XHTML, CSS, javascriptSecondary: JQuery, AjaxAwareness of JavaScript frameworks like -JQuery,PototypeJob Type:- Contract to Hire (initially for 6 Months)Job Location : PuneExp: 2 to 4 Years.
Another look at JavaScript inheritance
October 16, 2008 | Filed under: Prototype
Stoyan Stefanov of Yahoo! has published a nice article on JavaScript’s class-less objects.
This is published on JavaRanch, so it talks to the Java community, and uses that lense to explain the differences.
He delves into:
Constructor functions
Function objects and prototype property
Inheritance via the prototype
Inheritance by copying properties
Crockford’s beget object:
PLAIN TEXT
JAVASCRIPT:
function begetObject(o) {
function F() {}
F.prototype = o;
return new …
Pimp My Site with CSS and Prototype
October 8, 2008 | Filed under: Prototype
Do you like some code pimpage? We saw a couple of interesting posts on this recently in fact.
First, our own Christian Heilmann took a table based layout, and in short order turned it over to the light via YUI Grids and CSS.
He took this:
And it quickly became this:
He has made the code available, and …
Want your code "pimped"?
October 7, 2008 | Filed under: Prototype
We decided it’s finally time to implement an idea we had long ago.
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, Pimp My Code, takes submissions from readers who think their code needs …
Growing the community
October 7, 2008 | Filed under: Prototype
Now that 1.6.0.3 is out, let’s talk about the Prototype community.
A lot of people have been commenting on how quiet it’s been around here over the last few months. There are several reasons:
We were quite busy with behind-the-scenes stuff. Moving to GitHub and Lighthouse was quite the task. As part of that migration we went through all the …
Multiple Unobstrusive Onload Events Using Prototype in Rails
October 6, 2008 | Filed under: Prototype
This article explains a technique for using multiple OnLoad events making using of the Prototype javascript framework within Ruby on Rails.
Life: The game in Canvas
October 3, 2008 | Filed under: Prototype
Kyle McGregor took a look at the JavaScript games for Life out there and decided to write a Canvas version that ends up being a lot snappier. The entire game is pretty small:
PLAIN TEXT
JAVASCRIPT:
var counterface = 0;
var oInstance;
var Game = Class.create();
Game.prototype = {
‘working’: false,
…
Compressed prototype + scriptaculous
October 3, 2008 | Filed under: Prototype
On several occasions I needed both the prototype js framework and the scriptaculous library for a project, both compressed in a single file to save on the actual javascript code size. I’ve found a project named protoaculous, but it’s no longer maintained, so I needed to find a way to make the compression myself.
Prototype 1.6.0.3 out there
October 1, 2008 | Filed under: Prototype
Just a short one, Prototype has a new point release that is a drop in replacement for your 1.6.* code:
Yesterday we released Prototype 1.6.0.3, the result of some much-needed bug fixes, and a stopgap release on the road to 1.6.1.
It’s a backwards-compatible, drop-in replacement recommended for all users of Prototype 1.6. We’ve fixed 30 bugs and made 25 other …
Prototype 1.6.0.3: A long-awaited bugfix release
September 30, 2008 | Filed under: Prototype
Yesterday we released Prototype 1.6.0.3, the result of some much-needed bug fixes, and a stopgap release on the road to 1.6.1.
It’s a backwards-compatible, drop-in replacement recommended for all users of Prototype 1.6. We’ve fixed 30 bugs and made 25 other improvements to our already-rock-solid library.
Developers who follow along in Git might’ve noticed that the repository has seen a lot of …
Extending Classes in Objective-C With Categories
September 28, 2008 | Filed under: Prototype
Objective-C supports extending classes through categories. Like re-opening classes in Ruby, modifying an objects prototype in JavaScript, or creating extension methods in C#, categories allow you to add additional functionality to objects that you are not the original creator of. You don’t even need the source to the original classes.
Easy to use Javascript Image Cropper UI with Prototype.js
September 28, 2008 | Filed under: Prototype
I just found this great javascript library that is an user interface for cropping images. It depends on both prototype.js and scriptaculous, which I like since I’m using them on all my projects. The code is easy to use, and I integrated it into my Zend Framework with a couple of hours work.
Prototype Basics: Creating a Javascript Class
September 24, 2008 | Filed under: Prototype
The basics of creating and extending classes and objects using Prototype and Javascript.
Detailed JavaScript and Processing.js from John Resig
September 24, 2008 | Filed under: Prototype
John Resig has given some great talks recently, and just posted about some of them.
First, we have his interactive learning area where the presentation is just a JavaScript application that you can play with. Double click on the code, make a change, and save away!
The talk goes into the innards of the language that we are know, love, …
Jeene: Automatic partial evaluation for JavaScript, in JavaScript
September 16, 2008 | Filed under: Prototype
Jeene is a new open source project by Karl Krukow, which aims to create a partial evaluator for JavaScript.
A partial evaluator (or program specializer) is a program which takes two inputs: another program and an environment mapping variables to values; it outputs a specialized (i.e., more efficient) version of the input program with respect to the environment. One can …
Brendan discusses how TraceMonkey is climbing faster; Ruby on the Web with V8
September 3, 2008 | Filed under: Prototype
Brendan Eich jumped right in and benchmarked the tip of tree for TraceMonkey, with the V8 version that came with Google Chrome:
We win on the bit-banging, string, and regular expression benchmarks. We are around 4x faster at the SunSpider micro-benchmarks than V8.
This graph does show V8 cleaning our clock on a couple of recursion-heavy tests. We have a plan, …
Auto Complete Function
August 23, 2008 | Filed under: Prototype
Make an auto-complete or auto-suggest book box in JavaScript, without use of prototype handlers and opposite front techniques. This script could be adapted for use in a assort of divergent situations.
querySelectorAll is coming fast
August 21, 2008 | Filed under: Prototype
We have all been talking about querySelectAll for awhile, but John Resig gives us a wrap-up that covers the state of play.
He talks about the browsers, and the libraries that wrap them and clean up shop via code like:
PLAIN TEXT
JAVASCRIPT:
function querySelectorAll(selector){
try {
return Array.prototype.slice.call(
document.querySelectorAll( selector ) );
} catch(e){}
…
Secrets of the JavaScript Ninja: A sneak peak for Ajaxians
August 14, 2008 | Filed under: Prototype
John Resig is working on the Secrets of the JavaScript Ninja book, which I am sure will be a success.
Manning has been kind enough to give us a sneak peak at some of the chapters:
How closures work
This content introduces the closure, an important aspect of JavaScript, and describes its use. It goes into detail on making private data, …
Tripeedo: Command line for travel
August 13, 2008 | Filed under: Prototype
Tripeedo is a new little site that uses Prototype to power a command line for travel. You just type in where you want to go and when, and it will launch you into a search. I really enjoy the command line interfaces, and much prefer them to the long forms that …
Practical Prototype and script.aculo.us
August 11, 2008 | Filed under: Prototype
We’re very happy to announce a new addition to the Prototype bookshelf: core committer Andrew Dupont’s Practical Prototype and script.aculo.us published by Apress.
Obviously, Practical Prototype and script.aculo.us covers all you need to know about the latest versions of Prototype and script.aculo.us. But it goes well beyond that. Andrew does an awesome job at setting …
Preload Hyperlinks on your site with Javascript
August 3, 2008 | Filed under: Prototype
“I coded this tiny piece of javascript that loops through your hyperlinks, checks if “load” is in the rel-property, and loads the page from the href in an hidden iframe. Make sure you are using prototype.”
onJSReady Prototype Plug-in
July 30, 2008 | Filed under: Prototype
In a follow-up to our post a few days ago on parallelizing JavaScript loading and firing an event when loading is done, Stefan Hayden wrote a Prototype extension (based on onDOMReady) that makes it easy for you to execute your code when all JavaScript is loaded:
PLAIN TEXT
JAVASCRIPT:
Event.onJSReady(function () { dependent_on_external_js(); });
JavaScript with Object-Orientation techniques
July 29, 2008 | Filed under: Prototype
It includes DOM, Advanced JavaScript with proper use of prototype. Web technology is adapting prototype techniques rapidly as of now.
First Prototype Developer Day: Monday September 29, 2008!
July 25, 2008 | Filed under: Prototype
Prototype Core is happy to announce the first Prototype Developer Day! The Prototype Developer Day is going to be a recurring event bringing together Prototype Core members and users from the Prototype community to share experiences, offer insight into what’s coming up, and discuss topics like contribution, support, and the Prototype ecosystem. If you’re big on …
Module Pattern vs. Prototype/MooTools Class objects
July 23, 2008 | Filed under: Prototype
The Module Pattern is a way to structure your javascript into classes supporting both private/public variables and private/public functions. The Module Pattern offers several advantages versus the Class objects defined in popular frameworks like Prototype, MooTools, etc. Here is an example use of the Module Pattern and a summary of the advantages…
Make images appear in random order - Prototype, jQuery
July 20, 2008 | Filed under: Prototype
It’s a very easy to achieve, but beautiful effect. All images and objects with class .appear_randomly will appear in slightly random order.Enough to do is to load appropriate library (Prototype or jQuery), create a site wide loaded Javascript file (in example generic.js) and put this simple code inside
Semantic Constructors
July 18, 2008 | Filed under: Prototype
PLAIN TEXT
JAVASCRIPT:
Class.create = (function(original) {
var fn = function() {
var result = original.apply(null, arguments);
result.toString = function() { return result.prototype.initialize.toString() };
return result;
};
fn.toString = function(){ return original.toString() };
return fn;
})(Class.create);
This monkey patch by kangax allows you to get sense from inspecting a constructor setup via Prototype.
His code changes a simple person class …
Announcing new Prototype support mailing list
July 14, 2008 | Filed under: Prototype
Subscribers to the Rails Spinoffs mailing list should switch to our new, better-named list: Prototype & script.aculo.us.
While these two venerable libraries are, in truth, spinoffs of the Rails project, we’ve come to realize it’s far more user-friendly to have the libraries’ names in the name of the mailing list. This should help guide …
Creativescrape: Thomas and Amy team up again
July 14, 2008 | Filed under: Prototype
Thomas Fuchs and Amy Hoy have teamed up again for a micro-app called Creativescrape “an inspration utility for those moments when you just seem to be braindead. It comes with a OS X screensaver for your enjoyment.”
All via 188 lines of fun living on top of Prototype and Script.aculo.us.
Object-Oriented JavaScript: Using the `Prototype` Property
July 8, 2008 | Filed under: Prototype
# Object-Oriented JavaScript: Using the `Prototype` Property# Prototyping objects: looking at the “prototype” property# Object interaction in JavaScript: applying Inheritance through the “prototype” property# Traversing object properties: using the “for in” loop structure
JavaScript Plugins; The beauty of loosely coupled code
July 3, 2008 | Filed under: Prototype
James Coglan wrote a piece on There is no such thing as a JavaScript plugin that uses jQuery as a use case for how simple it is to have a plugin contract.
When you think about plugins in many environments, you have strict contracts through interfaces that you have to implement. With jQuery, you can just add on to the …
Starfield Sim Picasa Gallery with Prototype
July 2, 2008 | Filed under: Prototype
Asad Sheth has been playing with a Starfield Sim Picasa Gallery using Prototype. He said:
I think it’s an interesting way to think about temporally organized data (I could see RSS feeds navigated through some similar mechanism, with the z-axis being time and the x- and y-axes being some kind of similarity measure), and further display that graphical presentation is …
eval(’foo=a’, obj.fn); How you aren’t private in Firefox
June 27, 2008 | Filed under: Prototype
Peter Michaux has found the magical eval(…, context) method available in the Firefox implementation. This means that you can’t create truly private data:
PLAIN TEXT
JAVASCRIPT:
// Getting "private" variables
var obj = (function() {
var a = 21;
return {
// public function must reference ‘a’
fn: function() {a;}
};
})();
var foo;
eval(’foo=a’, obj.fn);
console.log(foo); // 21
// Setting "private" variables
var obj …
Javascript animations without prototype or scriptaculous
June 20, 2008 | Filed under: Prototype
In a Javascript world ruled by prototype and scriptaculous all animation better be done that way. But DIY still means Do-It-Yourself and this post gives just one ten liner function to just pull off any visual effect you can imagine.
Hypno trip down the fractal rug
June 18, 2008 | Filed under: Prototype
What a great title. It is an entry in the JavaScript 20 liners call out:
PLAIN TEXT
JAVASCRIPT:
// chain( func )
// make func chainable by making it return itsReturnValue||this
function chain( func )
{
return function()
{
…
Enhanced Class Inheritance with JavaScriptMVC
June 16, 2008 | Filed under: Prototype
Brian Moschel from the JavaScriptMVC project wrote in to tell us about their recent efforts extending John Resig’s earlier Simple Class Inheritance work.
In case you missed it, John’s blog talked about his efforts to take the best of the many efforts to simulate classical inheritance in JavaScript and reduce them to a simple, easy-to-use piece of stand-alone …
Mozilla Week: From Client (Firefox 3) to Server (Weave) to Mobile (Fennec)
June 13, 2008 | Filed under: Prototype
It has been a busy week for Mozilla. We have seen news across the board of their technology.
First we have the news that Firefox 3 should be available to download on June 17th. They are having a download party to kick things off.
Stuart Parmenter had a proxy post that delves into the world of fonts and text:
When Mozilla …
An Interview with Ryan Johnson
June 11, 2008 | Filed under: Prototype
Today’s interviewee is Ryan Johnson of Control Suite fame.
Ryan just launched PersonalGrid, a new file sharing and publishing web application, along with a complete overhaul of Control Suite, now renamed LivePipe UI.
Hi, Ryan. Could you please introduce yourself.
Ryan Johnson: I’ve been writing web pages since 1993, but I’ve only felt comfortable calling myself a …
Method & Function Binding in Prototype Javascript
June 6, 2008 | Filed under: Prototype
Function binding in Javascript is an often difficult to understand concept. This tutorial explains what binding is, what the bind() method does, and why its use is important for creating object oriented Javascript code.
Eight Weeks of Prototype: Week 8, A Complete Prototype Examp
May 29, 2008 | Filed under: Prototype
So far in this series, “Eight Weeks of Prototype,” I have shown you some of the extensive features the Prototype JavaScript framework provides. In this, the final article of the series, I will bring many of these features together into a simple example.

