Archive for the ‘javascript’ Category

I spent a good two hours figuring out how to do this and so I’m gleefully going to share it with you.  Those of you with small monitors (or other strange habits) might have operating system dock (the thing at the bottom or top of the screen that you use to start programs, check the [...]

The correct call for posting to a user’s facebook wall with Python and pyfacebook, after you’ve established both user authentication via FacebookConnect and gotten stream_publish permission, is: request.facebook.stream.publish( message = render_to_string(template_path, fb_context), action_links = simplejson.dumps( [{'text': "Check Us Out!", 'href': "http://someurl.com"}]), target_id = ‘nf’) See that ‘nf’ down there in target_id?  It’s not on any [...]

Introduction When you roll around the web you see lots of web applications that show off some localized capability to get data from a back-end in a semi-real-time manner. The most famous is the “search suggestion” drop-down that comes off Google or Bing, and those are wonderful, but often the Javascript for the drop down [...]

Most people encountering the Ajax components of Django for the first time usually encounter this pairing: from django.utils import simplejson … return HttpResponse(simplejson.dumps(some_python_obj)) For most applications, this is enough.  But I’m especially fond of iterators, generators, functors and closures, dense components that express one thought well: the structure of a tree, or the rows of [...]

09Apr

Additions to the JFP.

Posted by Elf Sternberg as javascript, programming

I have added Restricting a function’s scope to a specific object to the Javascript Framework Phrasebook.

As some of you may have heard, I recently lost my job at Isilon. In that great tradition, I have put up my resume. Have a look, and please comment on the content or presentation of either version: Kenneth M. Sternberg, Senior Web and User Interface Developer and Designer. There’s a copy for printing here.

I work with EXT and Prototype at the office, and Dojo at home. I have a lot more time with EXT than either of the other two, so when I’m working on a personal project my first thought is “If this were EXT, I’d do it this way, but how do I do it in [...]

For the past eight days or so, I’ve been having the absolute pleasure of working on a pure research project, re-implementing FireWatir in Python. The project is known internally as “Whiskey,” (FireWatir without the R) and at some 1805 lines is faster and more concise than firewatir’s 6522 lines. The real trick was to stop [...]

A few months ago, I asked a group of web deveropers what the new operator does in Javascript. There wasn’t much of a response, but I did eventually figure it out. Sometimes you just have to wade through the specifications. Here’s the outcome of my research: [ECMA Version 3 (1999), section 11.2.2, page 56] The [...]