So yesterday, as I said I would, I got started in earnest on my behavior management application, WeMinder. I scoped out what I thought was a reasonable initial data model, drew up a raw pen-and-paper ER diagram between the tables, and got started creating what are called the Domains, the central objects that make up the heart of the system.
It's not as impressive as it sounds. All told, it's like four files, and maybe 60 lines of code. But it's a start. The development framework I'm using is called Grails. It's awesome. I love it.
I also hate it a little bit. It can be very persnickety about certain things. I found out that you really can't name domains "Action" for some reason. I also was having a little trouble with the project scaffolding.
Scaffolding is this awesome rapid-prototyping feature of Grails - you toss this one line into the controller for your domain, and WHAM BANG YOW OTHER SOUND EFFECT - a fully functioning basic user interface comes out the other side.
It looks kind of like this:
Awesome, right? It's nowhere near perfect, and I'm going to customize the living heck out of it, until it looks very pretty and does a lot more stuff. But you gotta start somewhere.
Scaffolding like this is designed for CRUD. (No, not that it looks like crud, although granted, it kinda does.) CRUD is an acronym for the 4 basic database operations you can do. Create, Read, Update, Delete. It's good for administrative stuff, and for when you're just getting started building an application.
But, this crud has to actually WORK first. And yesterday, it didn't. I could add potential actions, like snuggling, or getting a spanking, but they just wouldn't list properly. What's more, I couldn't make any entries, because they're relationally tied to the actions. Unacceptable!
I banged it at for several hours trying to figure out what it was. It turned out I had one line of code in there I just didn't need. This one.
After a bunch of tech book surfing and googling, I had an epiphany early this morning at my mistake, and I fixed it.
I'm super grateful that I can get myself over my own crud.