Strict Standards: Declaration of Walker_Page::start_lvl() should be compatible with Walker::start_lvl($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_Page::end_lvl() should be compatible with Walker::end_lvl($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_Page::start_el() should be compatible with Walker::start_el($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_Page::end_el() should be compatible with Walker::end_el($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 584

Strict Standards: Declaration of Walker_PageDropdown::start_el() should be compatible with Walker::start_el($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 603

Strict Standards: Declaration of Walker_Category::start_lvl() should be compatible with Walker::start_lvl($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_Category::end_lvl() should be compatible with Walker::end_lvl($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_Category::start_el() should be compatible with Walker::start_el($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_Category::end_el() should be compatible with Walker::end_el($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 702

Strict Standards: Declaration of Walker_CategoryDropdown::start_el() should be compatible with Walker::start_el($output) in /home/narcvs/blog.narcvs.com/wp-includes/classes.php on line 727

Strict Standards: Redefining already defined constructor for class wpdb in /home/narcvs/blog.narcvs.com/wp-includes/wp-db.php on line 58

Deprecated: Assigning the return value of new by reference is deprecated in /home/narcvs/blog.narcvs.com/wp-includes/cache.php on line 99

Strict Standards: Redefining already defined constructor for class WP_Object_Cache in /home/narcvs/blog.narcvs.com/wp-includes/cache.php on line 404

Deprecated: Assigning the return value of new by reference is deprecated in /home/narcvs/blog.narcvs.com/wp-includes/query.php on line 21

Deprecated: Assigning the return value of new by reference is deprecated in /home/narcvs/blog.narcvs.com/wp-includes/theme.php on line 576
ajaxlights » App Engine

Archive for the ‘App Engine’ Category

FormLess - style agnostic and auto-validating forms

Thursday, January 1st, 2009

Creating HTML forms can be a drag. Validating the form input is even worse. I wrote up a javascript utility to demonstrate how easy and enjoyable it could (should) be to create forms. Check out the demo. You create a form with:

new FormLess('form-container-element-id', items);

where items is an array of objects. Each item requires at least a name and a type, but could also take an array of options or a validation function that gets called to validate the value of that item.

items = [{
  name : 'Gender',
  type : 'select',
  options : ['None of your business', 'Male', 'Female'],
  validate : function(data) {
    return data && data != 'None of your business'
  }
}]

Each time an item’s value changes, the validation function gets called for that item. If a validation function returns false, the item gets marked as invalid. Valid and invalid items can be styled however you please:

.valid {
  background-color : green;
}

.invalid {
  background-color : red;
}

When the form is submitted, each item gets has its validation function called. If all validation functions pass, the submit function gets called along with a key-value object containing the items names and values. This tool has not been tested across browsers - it’s mostly a demonstration of how easy it should be to gather and handle user-entered data. Check out the demo Screenshot of FormLess demo application

I’ve Got Code Running on Google

Monday, May 12th, 2008

Google App Engine is awesome.

Repeat. Google App Engine is awesome.

A quick tutorial video, 30 minutes of tinkering and playing around, and I’ve got database code running on Google’s BigTable(!). Go check it out - leave a shout.

Oh, and it turns out - Ruby to Python isn’t that bad after all.

Google I/O Registration - Comes with App Engine Invitation

Monday, May 12th, 2008

I finally registered for Google I/O, and was happy to see that it comes with an invitation to App Engine. Tonight I’m meeting up with a Python friend to show me the ropes.

I’m now intending to port ShareWithMe from rails to python and BigTable for its first, long overdue release.