Thursday, October 9th, 2008

An Interesting Twist on a Pastebin

Category: JavaScript, jQuery

Pastebins have become an important part of sharing code with colleagues. Sites such as Pastebin & Pastie.org are extremely popular because they’re easy to use and very effective in letting people compare notes on source code, especially in a support setting.

Remy Sharp wanted to take the pastebin concept a step further, past the static posting of code. His idea, which he tossed around for 6 months, finally came to fruition in the form of JS Bin, a new pastebin site with a twist:

JS Bin is a form of paste bin, but with a twist. It allows you to also include the HTML and CSS to provide context to your pasty. As such, it means you can actually run the JavaScript and pass this on to a colleague to help to debug.

This is a great idea as it lets you troubleshoot your code while seeing immediate results. The feature list is well thought out as well.

  • Save private snippet
  • Remote Ajax debugging
  • Snippet URLs run entirely on their own (i.e. without the JS Bin framework around them)
  • Support to quickly inject major JS libraries including jQuery, jQuery UI, Prototype, Scriptaculous, Dojo, MooTools & YUI
  • Saves state within the open window (i.e. refresh and the code doesn’t reset)

The ability to inject many of the popular JavaScript libraries is especially important and I would highly recommend individual project teams to contact Remy directly to have their libs included.

To give this a run, I’d suggest going to the JS Bin site and putting it through its paces. In addition, Remy has produced two videos which go into detail on how to leverage JS Bin:

Posted by Rey Bango at 10:52 am
5 Comments

+++--
3.7 rating from 24 votes

5 Comments »

Comments feed TrackBack URI

Hopefully they will make use of the Google Ajax Libraries API.

http://code.google.com/apis/ajaxlibs/documentation/index.html

Comment by Diodeus — October 9, 2008

You can already use many of the Google search APIs, plus the Feed API, using Dojo

Comment by sos — October 9, 2008

So it’s a lot like http://pastebin.me but with the inclusion of libs other than jquery and a tabbed view instead of the split pane view…

Comment by seancurtis — October 9, 2008

@seancurtis: If that site lets you run your code as well as paste it, then possibly

Comment by ReyBango — October 9, 2008

Yup – you put your markup and whatever up top and it shows you the working result below – there is a template dropdown that will insert some premade templates also.

Pastebin.me doesn’t have any fancy styling applied to it that will interfere with your output either (JS Bin has a black background – not sure what other CSS styles may be inherited)

Comment by seancurtis — October 9, 2008

Leave a comment

You must be logged in to post a comment.