Drupal SoC 2006 Application: AJAX Form Creator
I propose to develop an AJAX form creator module, that can be used as the UI component for any Drupal interface where form building is required. The core of my proposal is to develop what's been
proposed already∞. That is, a form builder that supports most (if not all) of the fields and properties available in the Drupal Forms API, through an interface similar to that at
JotForm∞ and at
Wufoo∞. The actual JavaScript library will be heavily based on the JotForm and Wufoo code, but will be modified so as to be built upon drupal.js. Since both JotForm and Wufoo depend on the Prototype and Scriptaculous libraries, I also intend to make my code dependent on Jeff Robbins' S/P Ajax module.
The primary use of this module will be to enhance the node type editing interface for the CCK module, but I am also intent on making it reusable enough that it can be implemented elsewhere, such as in the webform module. Additionally, I will make every effort to ensure that this interface degrades gracefully to a fully working non-JS equivalent. When I say 'degrades', I really do mean 'degrades': that is, without any per-user or per-interface option to disable it (although it may be worthwhile implementing such options anyway). I am aware that this will be a big challenge, but I personally feel very strongly about achieving it.
I intend to link the form-building interface dynamically to Drupal's theming system, to ensure true WYSIWYG behaviour (i.e. the fields in the interface are themed exactly as they will be themed when finished), and to make the interface itself just as themable and customizable as actual forms. This means that if a user adds a CSS class to a field, that field will be instantly updated to reflect its new style attributes. This will get even better with JS behaviour: users will be able to toggle behaviours like 'collapsible' for fieldsets, and 'resizable' for textareas, and will see these behaviours instantly being applied or unapplied to fields in the interface. In order to do this, either some of the core processing of the Forms API will need to be ported to JS, or this module will need to request new individual themed form elements from the server via AJAX callbacks (I'm leaning towards the latter option).
Proposed roadmap:
MILESTONE: May 23rd, start project
- Study the inner workings of JotForm and Wufoo in greater detail. Also get better acquainted with Prototype and Scriptaculous.
- Develop a prototype (no pun intended) of a form builder in Drupal - no AJAX yet, but a static version of the interface should be presented. Will be accompanied by diagrams and other documentation.
MILESTONE: Jun 11th, present prototype and documents
- Develop base JS library, inspired by JotForm and Wufoo libraries, and utilising S/P Ajax, as well as drupal.js wherever possible.
- Develop a Drupal module with a page that demonstrates the form builder interface. At least two basic form field types should be implemented and available (e.g. #textfield, #textarea).
MILESTONE: Jun 28th, beta-quality code ready to be delivered
- Implement more field types one-by-one, until all the simple (i.e. non-grouping) field types are ready.
- At this point, evaluate the code to make sure that it will be able to be integrated with CCK (this is something that will ideally be kept in mind throughout the project).
MILESTONE: Jul 7th, beta-quality code ready to be delivered
- Implement support for nested fieldsets.
- Develop all WYSIWYG functionality that can be done without the server (e.g. dynamic textfield resizing, adding CSS classes, cosmetic JS behaviours).
MILESTONE: Jul 15th, beta-quality code ready to be delivered
VACATION: Jul 16th-23rd.
- Write the server-side code (some will be AJAX callback, some won't be) to handle validation, per-element dynamic theming, and processing of a form submitted from the form builder interface.
- Write the admin interface for managing custom-built forms, and the code for loading/saving forms to the database.
MILESTONE: Aug 6th, beta-quality code ready to be delivered
- Implement the AJAX form builder within the CCK's node type editing interface.
- Testing (particularly cross-browser), refinement, documentation.
MILESTONE: Aug 20th, project complete, ready for submission
Why I am well suited to complete this project
- I have experience in writing AJAX-enabled modules for Drupal! I wrote the activeselect module∞, which deals specifically with AJAX and form elements, and with creating and manipulating form elements dynamically with JS.
- I think I'll have a lot of fun doing this, and they say that nobody works better than he who loves what he does. Writing an AJAX form builder is surely the most awesome thing a web developer could be doing in 2006: what's not to love? ;-)
Other info
Name: Jeremy Epstein
Email: omitted
IM: omitted
How much time do I expect to have for this project: approx. 20 hours on any given week (excluding weeks when I will be away).
Note: this is also an updated estimate for my other SoC application, the "generic import / export module".
Jobs, summer classes, and/or vacations that I'll need to work around:
- Jobs: I'm doing a work placement with Optus∞ (Australian phone company) until 7th Jul, which involves working 9-5, Mon-Fri. However, there's no homework, so my weekends and evenings are pretty free during this time.
- Classes: I live in Australia, and it's not summer here, so my break is quite short! I start classes on 3rd Aug, and will have about 10 hours of classes per week (taking up 2 days of the week), which I consider to be a fairly light schedule.
- Vacations: Going on a ski trip, 16th-23rd Jul. Will also possibly be away for the week before this (TBC).
My technical experience
- PHP: Very experienced, through my being a Drupal contributor over the past year.
- XHTML/CSS: Very experienced, through approx. 7 years of web designing, starting as an amateur and gradually moving into professional work.
- SQL: Very experienced, through writing MySQL and PostgreSQL compatible queries for some of my Drupal contributions. Also experienced in using Sybase, and in using Transact-SQL to write stored procedures and triggers for this database.
- JavaScript: moderately experienced, through scripts that I've written for my own site, and through contributions to Drupal.
- UNIX: some experience in writing bash scripts, familiar with tools such as grep and awk.
- CVS: moderately experienced, through my contributions to Drupal. Also familiar with SVN, as I've used this at university and with clients.
- C/C: moderately experienced, through lessons at university, and through writing some simple command-line programs of my own.
- Java: moderately experienced, through lessons at university, and through maintenance of Java applications in my work placement.
- Visual Basic (v6): moderately experienced, through projects at high school, and through maintaining VB6 apps in my work placement.
My usage experience/familiarity with Drupal: very high. I am an active member of the Drupal developer community, as well as a part-time Drupal consultant.
My development experience with Drupal: extensive. I have written modules for Drupal from scratch (such as the category module), I have produced custom themes, and I have written patches for Drupal core.
Did I participate in a 2005 Summer of Code project: No. I had some very big consulting jobs that I was involved in last year, and I decided that I didn't have adequate time to participate in SoC - but if I'd had the time, I would have applied!
Have I applied (or do I plan to apply) for any other 2006 Summer of Code projects: Yes - I plan to apply for other Drupal projects (still deciding which ones to apply for), from the list being maintained on drupal.org.
School that I attend: University of Technology Sydney∞.
Years of attendance: 3 (including this year).
My specialty/major at the school: Information Technology (no major, since my course is a short 'fast-track' course - but I am considering doing honours).
My resume: http://basement.greenash.net.au/resume/resume2006.pdf∞
My blog: http://www.greenash.net.au/∞
There are no comments on this page. [Add comment]