Dummy Data Generator

I always find myself needing to generate some dummy data for web applications that I’m working on. In the past, I’ve either done it manually, written scripts, or recycled data from other apps. However, I think those days are over. I just came across generatedata.com. It gives you a convenient interface to specify what data fields you want, how many records you would like, and what kind of output you’d like it in (XML, CSV, etc.):

generatedata.com interface

It even has pre-defined lists of names, sample titles, departments, cities, etc., so you don’t have to specify them all. However, you can add or customize your own lists too.

The only thing I’d like to see added is an option to generate XML with properties as attributes, instead of nodes. But the source is on GitHub, so you can tweak it as you need to.

opttree For OpenLaszlo 4.7

A while back, I was tasked with creating a versatile tree for OpenLaszlo that was extensible. It needed to have several features (available in different incarnations of the same base tree) for this one particular project:

  • It had to support checkboxes for selection, independently of normal leaf selection.
  • It needed to support visual tree lines.
  • It needed to support drag-and-drop both internally (i.e. from one leaf to another) and externally (i.e. to drop targets outside of the tree).
  • It needed to be easy to add icons to different nodes.
  • It had to support large datasets. The “official” OpenLaszlo tree doesn’t support any form of lazy replication, so it was impractical.

I started with a version of opttree that was created by Adam Wolff (formerly of the Laszlo Foundation Classes and now of ShareGrove). In the meantime, that opttree got incorporated into OpenLaszlo, although it never made it into the official component set; it’s in the incubator. (Source for that opttree). In order to meet the above requirements, I needed to refactor the code somewhat to have a more reusable base class (sharedtreenode), from which I could create the various incarnations (checktreenode, dragtreenode, etc.). Mine never made it into the official OpenLaszlo distribution, although it has been widely used after it was informally released on the OpenLaszlo forums.

Anyway, that’s the background. Here’s one incarnation (checktree) in action:

I’ve finally updated this to run on OpenLaszlo 4.7; because it wasn’t part of the official distribution, it was never kept up-to-date. You can download the source for my opttree, complete with checktree, dragtree variants, as well as examples of how to add icons, and so forth. The test cases should give you a pretty good idea of how it’s used.

The Most Important OpenLaszlo Application?

I just discovered PuzzlePixies.com, which is arguably one of the most valuable and important OpenLaszlo applications I’ve seen.

PuzzlePixies.com logo

PuzzlePixies.com is a children’s educational site. It’s not actually a single OpenLaszlo app, but lots of little games for different age groups.

I’ve seen some of these games before (e.g. the classic card matching memory game). But there’s something about the colors and simple graphics that seemed to appeal to my 3-year-old son immediately. Maybe it’s the fact that a child’s voice introduces each game and tells you if you got the right answer?

The whole site is free. If you have kids, check it out!