dans.blog


The miscellaneous ramblings and thoughts of Dan G. Switzer, II

qForms v2.0 News / Call For Developers...

I sent this letter to the qForms Mailing List earlier and figured I'd better post it here. Leave me a comment if you're interested in helping with development.

I know many of you have been waiting a long time for news on v2. Believe it or not, it does actually exist. The reason why it's been in sort of permanent hiatus was because I really wasn't doing any work that corresponded w/furthering the development.

qForms v2 is like 95% complete, and has been, for a long time. There have been a few key features I just have never had the time to sit down and really figure out. The key features I wanted to introduce for rev 2 that aren't done to my satisfaction yet are:

  • Applying validation rules to a qGroups (a qGroup is a group of fields that work as a single field. Picture splitting a phone number into separate fields for area code, prefix, suffix, etc and being able to use getValue()/setValue() to retrieve the values of all the fields as one string.)
  • Event queuing. One of the things I want to do is get it to the point where you can safely write add-on hooks w/out fear of them interfering w/other add-ons you must load. This still needs improvement.
  • Masking—still needs some improvements. I've re-written the code from scratch several times.

There are other things that can probably be done to improve things and I think the project really needs some new energy as I think that will help re-spark my energy for the project.

So, where am I going w/all this? Well, last night I submitted a new project request at Tigris.org. I'm hoping that those guys will approve the project soon (or I'll be looking for a new SVN home.)

What's this mean? Well, I'm planning on opening up the SVN repository for open development. Instead of opening the floodgates and letting everyone have access to the SVN repository, I'd prefer to have some volunteers from some of you who are willing to help out on the project.

So, I'm looking for experience JS programmers who have some experience w/Subversion (that's the source control I'm using) and who would like to help out on the qForms project.

As soon as the guys at Tigris approve the project, the URL for qForms SVN will be:

http://qforms.tigris.org/

For those of you not interested in following the actual day-to-day things, keep going to www.pengoworks.com/qforms for updates. However, if you're always interested in playing around w/the latest and possibly unstable builds, that's the place to go.

I'm also going to be posting the language files there (as qForms v2 supports internationalization.)

For those of who never saw it or what to see it again, you can view a preview of qForms v2 at:

http://www.pengoworks.com/qforms/preview/

Here's a brief list of what I have added:

  • Internationalization
  • Auto tabbing (via the setMaxLenght() method)
  • Remove validation rules on-the-fly
  • Keystroke dynamic masking
  • Disable/Enable validation rules per form
  • Much more customizable. (See the preview for how you can replace the default alert() handlers and drive everything via DHTML.)

-Dan


qForms Build 139 Released!

I've had a couple reports of issues or requests to make a few changes, so I've gone ahead and made them. One of the semi-big additions is a validation module that will give you the exact same functionality that's in CFFORM. Rest assured, I've made the same changes in v2. Anyway, here's the latest build:

[-] Change the _q_checkForErrors() function so that the call
    to the isNotEmpty() method used escaped double quotes
    instead of single quotes. This should allow single quotes
    in the description property.
[*] Changed the validateNumeric method to use the parseFloat()
    function to check for a valid numeric value.
[+] Added validateSame validation method
[+] Added validateInteger validation method
[-] Used my old homegrown compression routine on the compressed files.
    It doesn't compress the files down as much as either jsCruncher Pro
    or w3compiler, but it shouldn't break the source code either.
[+] Added cfform.js validation module. This should give you all of the
    exact same functionality as provided w/CFFORM.

As always, you can download the latest version of qForms from http://www.pengoworks.com/qforms/download/.


qForms Build 138 Released!

Well, since v2 is taking longer than planned, I'm releasing build 138. There's a few fixes that I've made and I've added a couple of useful properties. The highlight of this build is that you can now toggle off validation for a form by setting the qForm object's _skipValidation property to true, the validation rules will be ignored. This will be useful for those users looking for a way to "Save & Exit" from a form, without applying the validation rules. Here's a list of what's changed:

[-] Fixed a bug in the is/validateFormat() method which affected masks
    which contained 3 or fewer characters.
[-] Fixed bug in Opera v7.x where single checkbox elements where not
    working w/the setValue()/getValue() methods. I had fixed this in
    the v2 builds already.
[-] Fixed bug w/validateLengthGT and LT if the value was equal to
    the specified argument than no error was thrown (and it should
    be).
[+] Added qFormAPI.styleAttribute which allows you to specify a single
    property to apply a style change to. This defaults to "backgroundColor".
    This provides a quick CSS hack until v2 is released. If you change
    the qFormAPI.errorColor to a valid CSS property value you can do
    more than change the color. For example:
	qFormAPI.styleAttribute = "border";
	qFormAPI.errorColor = "1px dotted red";

    NOTE: This is experimental at best, you need test in different
          browser.

[+] Added obj._skipValidation property which allows you to toggle
    validation off/on for an entire form. Setting the property to
    true will cause the validation routines to be skipped for that
    form object.
[+] Added the validation_addon.js library. At this point, this contains
    one additional validation method called validateAtLeastOne(), which
    you can use to confirm that at least one field out of a list of
    fields contain a value.

As always, you can download the latest version of qForms from http://www.pengoworks.com/qforms/download/.


Jason Radosevich on qForms...

Jason, over at Terminal Fusion, has blogged some comments about qForms. Always keeping an eye out for what people have to say about qForms—good or bad.


Problem w/Mach-II & qForms when debugging...

Rob Brooks-Bilson blogged about an issue he's seen when using qForms with Mach-II. Seems that Mach-II stores all it's generated content in a variable called "Request.content." However, when running in Debug mode, the Request.content code gets outputted a second time, thus causing errors in your template because of the duplicate output.

I'll try playing around w/the code to see if I can stop qForms from throwing a fit, but this is really more of a problem with the debug templates. I normally edit CF's debug templates to make sure that output is wrap in the htmlCodeFortmat() function—that way I see actual value of the string—and not what it's rendering. One of the comments on Rob's blog also mentions this point.


qForms v2.0 Preview Online...

Ok, I finally got the qForms v2.0 Preview uploaded. I had some problems with Camtasia on my laptop—the recording was fine, but I couldn't export to SWF—I finally got things working by installing Camtasia on one of my desktops. Here's a quick rundown on some of the things you'll see in the preview:

New Features

  • Support for internationalization (i18n.) The window.$language variable will allow you define a language pack to load.
  • Better support for add-on modules. The API has been re-written to easily allow add-on mods to the library. The previous version did a great job on allow allowing new validation method to be quickly added and to add custom functions, but it took a little too much work to change the default behavior or to add your own event hooks.
  • You can now overwrite the default methods used to output errors to the screen. The sample addon/dhtml mod shows an example of this.
  • Lots of new methods--such as the setMaxLength() method which can be used to automatically forward the user to another field after X number of characters are entered. This is great for times when you went to split input between multiple fields (such as the case in phone numbers, ssn, serial numbers, etc.)
  • You can now set dynamic masking for a field. When filling out fields such as phone numbers and ssn, masks can be applied to the field and qForms will automatically filter out invalid keystrokes and insert the required mask characters where appropriate.
  • A new "Group" object has been added. Groups allow you to take multiple fields and treat them as one. This feature will often be used in conjunction with the setMaxLength() method in order to break up a particular value into multiple fields.
  • The ability to delete validation rules from the queue on-the-fly.
  • Disable/enable validation for the entire form.
  • Much, much more.

more…


qForms v2.0 Demo Coming...

Ok, one of the most common question I've been asked over the past couple of years is "When's the next version of qForms coming out?" Well, I still don't have a definitive answer for that, but I am working on it in my free time. Since I know that isn't very helpful, one thing I thought might be helpful is put up a working demo. I'm wrapping up the demo and it should be posted in the next 24 hours, so be sure to check back soon!


qForms Mentioned In Some New Books...

It's recently come to my attention that some of my work is has been getting some mention in various forms of press as of late. The last issue of the ColdFusion Developer's Journal (Volume: 05 Issue: 10) has the second part of a two part article which is based upon the DTS article I posted a while back on PengoWorks.com.

Also, much to my surprise I found mention of my qForms JSAPI in a couple of books while browsing the bookstore the other day. The following books mention me:

Title: Reality ColdFusion: Intranets and Content Management
Author(s): Ben Forta
ISBN: 0321124146
Publisher: Macromedia Press

more…


More blogging about qForms...

Christian Cantrell recently blogged on the issue of server-side and client-side validation in entry "Validation - Client or Server-side?." While he doesn't mention qForms specifically in his writings, many people commented on the usefulness of qForms and how it makes implemented the validation a cinch. Anyway, it's always good to read others viewpoints on my projects—especially when some of the comments come from people I respect. :)


qForms: See, I'm not the only one...

Well, Steve Nelson's said what I've been thinking for a long time: Macromedia should buy qForms. I really probably out to learn the Dreamweaver API so that I can build a qForms add-on for it. (PS - Thanks to Michael Brunt for passing on the link to me.)

Now, if I can only get my girlfriend to understand that I'm "wicked smart"... :)


Who me?!?

My good friend Robi blogged a little story about qForms (my open source JavaScript API) and an experience he had while working on a project a while back. He actually first told me this story a while back—and at the time it really surprised me. I really need to figure out a marketing idea for making some money off the code. I see a little bit of money from donations, but if I could get just a $1 a form (that qForms is implemented on,) that would turn out to be a lot of money—not to mention well worth the $1. Anyway, just thought Robi's story was interesting.


Denver: Friday

I got up this morning and went down to the hotel lobby for coffee and for some banana bread at the Starbucks in the hotel lobby. The lobby areas have wifi—so I was able to check my e-mail over breakfast.

Cameron and I ended up hanging around the hotel working on our presentations until lunch. We ended up meeting Robi, Kevin and Eric for at the Corner Bakery on 16th Street—which was a nice little deli (reminded me of La Chatalaine here in Columbus) around the corner from the convetion center. I wanted a light lunch, so I had half a roastbeef sandwich and a small ceasar salad. Lunch was very good and hit the spot.

I got to the convention center about 15 minutes before my presentation was to begin—which was plenty of time to set up and get ready. I had a pretty good turn out, because there were only two sessions going on at that time (instead of the normal 3-4 sessions.) The speech went pretty well—I think it helped that I actually do live coding during my presentation. I think people are always impressed when they see how easy qForms is to actually implement. I even had a couple people tell me afterwards that this was the best session they had attended and made it worth the cost of the conference—it's always a great feeling to know someone appreciated the time and work you put in to your presentation.

more…


Whew! I've been busy!

Ok, I haven't had much opportunity to post lately—as you can tell. I've been swamped with work and trying to work out going to Denver next week. Fortunately, I think everything is squared away. I'm leaving for Denver on Wednesday (5/14) and returning on Sunday (5/18.) The primary reason I'm going is to give a speech on qForms at the MX On The Rocks Conference—which was rescheduled due to the nasty blizzard in Colorado in March.

Oh yeah, I also got my tickets to see Iron Maiden in August. They're playing at the Germaine Ampitheater (formerly known as "Polaris Ampitheater.") I don't listen to Maiden like I did when I was in high school, but I've never had good seats when I've seen them in the past and really would like to try to get a bird's eye view of Steve Harris bursting off those triplets. It'll be good to see Adrian, Dave, Nicko, Steve, Bruce and Jannick all playing together (although I've never been a big fan of Jannick—he just doesn't fit the Maiden mold.)

I took Jenn to lunch today. I had to go to the east part of town to the travel agents, so I worked it out so that I could stop by and take her out to lunch. She informed me that it's our seven month anniversary today. Is Bob Evans appropriate for that? :)


Working on qForms v2.0

I got some more work done on the masking routines I'm going to use for qForms. I'm still trying to decide the best way to implement some of the functionality. I'll probably break everything out that uses keyboard event handling into it's own library.

Anyway, the API is coming along quite nicely. There are still a number of features that I would like to see included in the first release of v2, but I'm still trying to figure out the best way to implement them. The concept of "groups" is still one of the main one's I'm struggling with. I just can't decide on the best way to implement them. I'd like to try to introduce the concept without bloating the code, but I think there's going to be a good amount of code needed to do everything w/groups that I'd like to do. Anyway, I continue to play with it and I'm sure I'll figure something out I'm happy with.


FlashForward Keynote: "Royale" Sneak Peak

At the end of the FlashForward Keynote this morning, Kevin ran a video from one of the Macromedia engineers who is working on some new technology (code named Royale) that we are working on. He showed a Flash based input form with multiple sections. He then showed the code used to build it, which was written entirely in XML. Not only was the entire Flash application created from the XML file, but so was all of the databinding (SOAP Based), ActionScript and StyleSheets (yes, Cascading Style Sheets).

I sure hope this is based on the XForms spec. It could go a long way to advancing the usage of XForms in the developer community. If this is a properitary XML format, I'll be pretty disappointed since the XForms spec is pretty complete and lays out just about everything you'd want to do with a Form. With all my work on qForms, I've learned one thing—the current HTML implementation of forms leaves a lot to be desired. I'm still not sure I'm sold on the performance of RIA in Flash, but performance does seem to be getting better.