I just released (at RIAForge naturally: http://randomdatagenerator.riaforge.org/) a new ColdFusion Builder Extension: Generate Random Data. The idea behind the extension is simple. Many times I have need of a ColdFusion query, but don't have the actual data itself. I may be building a service component, or perhaps writing a simple test for a blog entry. I typically do something like so:
<cfset q = queryNew("id,name")> <cfloop index="x" from="1" to="10"> <cfset queryAddRow(q)> <cfset querySetCell(q, "id", x)> <cfset querySetCell(q, "name", "Random X")> </cfloop>
And while this "works", I had a hunch ColdFusion Builder would allow me to do it even quicker. With that idea in mind, I quickly whipped up the following extension. Click the image below to watch a quick video:
The extension makes use of both jQuery and the jQuery Validation library. Right now it's pretty simple. You can generate queries with random names, random numbers, random values from a list, and random booleans. If folks have ideas on how to extend this, just file an enhancement request at the RIAForge project.
So.... useful?
Archived Comments
That rules dude.
What's really kinda rocking for me is - I keep running into little tools that _I_ need, and I can just add them. It's like a CFBuilder tuned just for myself. ;)
Ray, maybe you could do a commercial .... "ColdFusion Builder was my idea!" Errr, maybe not.
Ray, super extension!
some feedback:
- Take a look at the types used by http://www.generatedata.com/ maybe you'll find some ideas for extra types over there.
- What about population a database with this generated data?
So who is going to play the more sexier/actor version of me? ;)
Wow, darn good ideas there. Like phone number. Wow. Thanks Guust!
As to your second idea - I want to stay vague, but someone else is making inroads into that right now. :)
Update:
You can get 1.1 from RIAForge. It includes:
*Thanks to Ryan V for pointing out I forgot the darn code to turn off cfdebugging.
*Support for random emails
*Support for random us phone #s
*Support for auto-incrementing numbers (acts like a primary key)
And I should say - thank you Guust for the pointer to generatedata.com.
Hi Ray,
I have a Random Data Generator for CF that is also available on RiaForge. The RiaForge page lists data that the generator can create, and some of the data is slightly accurate (like the zip-code generation per state).
Note: because the street-addresses are 'made-up' on the fly, the address generator isn't useful for testing lat/lng geoencoders.
However, the test-data generated is highly-readable.
http://coldfusiondatagenera...
Please feel free to use any of my older project in your CFBuilder Extension.
Thanks David - I had no idea about your project before I worked on mine. The zip code part by itself sounds perfect. I'll take a look this week.
Hi Ray,
I'm afraid mine never got much traction. I'm also an amateur when it comes to CF, so I'm not going to promise that it's going to provide any moments of awe if you crack it open.
I built the project when I needed to test a system repeatedly and needed highly readable data.
I really like random data generators because they give a talking point in-house between developers and designers (the last name field should be on the same line as the first name), they give an idea as to the worst-case scenarios (what happens when a title is too long in the layout?), they allow you to test illegal characters (is this SQL Injection going to happen?) and they also give you a way to create various test-cases using a mix of data that may cause a system to crash if there's combination of required logic that hasn't been taken into consideration (if the user asked to be subscribed to the mailing list but never provided an email address, does the system fail), WITHOUT having to write test cases for every possible condition.
Mine included a content generator, too, similar to http://lipsum.riaforge.org/ in intent.
Anyhow, the data inside of "Gazoo" may save you time if you continue to evolve your project.