First public Grails project
January 19, 2008
I’ve been working with a couple guys on a Grails-based project in my spare time, but I bunked off today and wrote something else. Much smaller in scale, and inspired a bit by my recent twittering, I put together tinyPollr.com. Yes, the name is a dumb ripoff of flickr - (”big deal, you wanna fight about it?” <– bad family guy joke)
The basic idea was/is that I’ve not seen anyone (yet) take a minimalist approach to online polls. There are loads of free polling services, but nearly all load the screen up with ads, and give you dozens of choices. This first draft is intentionally void of both, although I may add some google ads on the ‘results’ page (after someone’s already voted, not before), and I’ve got a few other ideas. The biggest one I was able to implement already is an XML data dump of the poll and all the responses (including IP and time/date stamp of each vote).
The XML dump is RESTful, I guess, in that there’s just a ’secret’ URL available which is custom for each poll. I’ve not seen anyone else give raw data access to polls. This may be more a geek street cred thing, and prove to be not useful to regular joes, who may just want an ‘excel dump’. The other big ideas I’ve not implemented yet is a mechanism for publicizing polls, and a way of password protecting polls. A general purpose ’social poll’ system, where the polls themselves are public, encouraging people to vote, with the original ‘owner’ having direct access to the XML data, seems like it would be interesting. Perhaps *everyone* should have access to the raw data feed? That might be too open, and not useful enough, or perhaps that would be another option when setting it up. I’m trying to avoid the ‘dozens of options’ problem and keep things as simple as possible.
As with most of my interfaces, it’s extremely basic. If anyone would like to help with a better looking layout, please contact me.
Lastly, this whole Grails project took me about 14 hours. This would have taken me about 3 hours in PHP, tops, but I’ve been learning a lot of Grails stuff. I’m planning to use this as a basis for a ‘grails for php developers’ talk, and point out many of the pitfalls I encountered - either things that were just un- or under-documented, or things that really don’t make sense to a long-term PHP guy, where to get libraries you may need, hosting, etc. When I have more free time (what’s that?!?!) I’ll be posting some of that here, perhaps as a series of articles.
Oh yeah, it’s also using the google chart api, and the grails plugin for that. Pretty slick stuff, all in all.
Please have a look and let me know what you think (good bad and ugly!)
Did you like this post? Buy me a hot chocolate!
Posted in 




January 20th, 2008 at 1:03 pm
I like the idea of super-simple polling. If there was–I hate to say it but I’m gunna anyway–a “widget” I could drop on my site or where ever, it could be really useful.
Also, I’d definitely be interested in learning more about Grails if you did post some articles.
January 20th, 2008 at 1:28 pm
One article is in the works already - thought it might be split up in to multiple smaller ones to give me more time to write.
Yeah, the ‘widget’ idea is on the plate, I just have about 6 hours of other work to do first. It *might* be up tonight, but probably not for a few days realistically.
Still rocking with the G @ panera?
January 31st, 2008 at 12:32 pm
Looks interesting. Any interest in sharing the source code?
Also, what are you using for the graph?
Thanks for this interesting blog.
January 31st, 2008 at 12:57 pm
Hey Josh.
Thanks for the kind words. Source is up at http://www.michaelkimsal.com/code/tinypollr.tgz, excluding the actual database itself, which grails should create for you automatically. This was a quick hack together (well, not *quick*, but quick for me when learning a new system, and hosting and all that jazz!). Any feedback or fixes are appreciated!
The graph stuff is the google chart service - thought I’d mentioned that. Yeah - last paragraph or so in the original post.
Thanks again!