The Artima Developer Community
Sponsored Link

Python Buzz Forum
Repetition Javascript Library

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ian Bicking

Posts: 900
Nickname: ianb
Registered: Apr, 2003

Ian Bicking is a freelance programmer
Repetition Javascript Library Posted: Nov 6, 2005 11:42 PM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ian Bicking.
Original Post: Repetition Javascript Library
Feed Title: Ian Bicking
Feed URL: http://www.ianbicking.org/feeds/atom.xml
Feed Description: Thoughts on Python and Programming.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ian Bicking
Latest Posts From Ian Bicking

Advertisement

Imaginary Landscape open-sourced some work I did recently on a Javascript library for handling repeating elements in forms. I've rewritten it more than once since then, and might just rewrite it again before it settles down.

After the last rewrite it more-or-less follows the WHAT-WG Web Forms 2.0 spec with respect to repeating forms. The implementation practically falls out of the spec, so after I just read it closely it was pretty clear how to implement it. Though, having implemented it, I need to bring some questions back to the WHAT-WG group -- especially related to moving repetition blocks around.

Conveniently, the spec works very well with FormEncode and variabledecode in particular. But it's actually expedience that made me implement it in the first place. Without repeating form elements, you have to have multiple complex forms, with lots of add/edit/delete functionality. With repeating forms you just have a single form, and the update is a single HTTP request. Less templates, less things to explain, less controllers, and a better user experience to boot.

I still have to figure out where this will go. I like MochiKit, but I've ended up factoring out nearly all the MochiKit dependencies (not because I was trying, it just happened). And it also fits a somewhat different style -- the Javascript is largely implicit, based on declarative HTML as defined in the spec. A big feature of the Web Forms 2.0 spec (IMHO) is that it isn't expressed in Javascript, and you don't have to think about Javascript while using it.

OTOH, I have no desire to set up a separate project or deal with any of that. I'd much rather glom onto someone else's project ;)

I've seen other implementations of portions of WHAT-WG. But they all seem complicated, or tied to one browser. (Well, I haven't tested on IE yet, but that's incidental.) That seems unnecessary, because at least large portions of Web Forms 2.0 is pretty simple Javascript. Plus I have a hard time finding them.

Anyway, the files are temporarily located at http://svn.colorstudy.com/home/ianb/repeat_form and a demo at http://ianbicking.org/examples/repeat_form/form.html

Read: Repetition Javascript Library

Topic: Repetitive Information Injury... sort of Previous Topic   Next Topic Topic: Structure and Interpretation of Computer Programming, iPod edition

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use