Menu Content/Inhalt
Home arrow News arrow Journal arrow Thursday, June 29, 2006
Thursday, June 29, 2006

Good progress today. I'm working on fun stuff now! I learned today that in perl, "shift and unshift do the same thing to the left end of an array that pop and push do to the right end" (source: perldoc). I learned a little more Template Toolkit syntax. Apparently it is case sensitive; at least, it won't know something's a directive if it's not in upper case. I also found, by looking at the annotated version of the online Catalyst tutorial, the meaning of a message I've seen a lot: Where "name" doesn't have a value, this results in a "harmless" warning; Use of uninitialized value in concatenation (.)

I set up the userid pulldown on our page to generate its list from the database, so it's no longer hard coded. Before I went on to do anything much more extensive, I created a new copy. This was also so that I could figure out how to set up our pages to use TTSite, a Template Toolkit module that allows you to modularize your pages. It gives them a common header, footer, and stylesheet, and it uses a lot of variables. All in all, it makes it a lot less likely that you'll mismatch something because you typed it differently in different places. It also means that in my pages, I don't have to set up a doctype and all the other HTML framework - just the content itself. I tweaked the code to make sure that our pages will validate against HTML and CSS standards.

So now that this is all up and running, I would like to look at a better way for the user to enter the date - something that gives them less of a chance to enter bad data, but is intuitive and easy to use. So far, my top few ideas are:

  • A small, scrollable calendar - similar to what you see here
  • List of month, day, and year - not a pulldown, because that requires clicking and scrolling, but the kind where all options are visible, so they can get their date with 3 clicks and a Submit. (For the HTML-savvy, something like <select size="31"> for day, size="12" for month, etc, but with some CSS applied to make it look pretty.)
  • A text box with some smart code behind it, such that they can type in a date in almost any format conceivable and the program can interpret it. As they type, on the screen it will show them - perhaps with a calendar image - what it thinks they mean. It won't let them submit the date if it can't figure it out. (Implementation details: This would require Javascript, which can be turned off, so of course server-side validation would also be used.)

I should try to get subversion running when Nate gets back. It would be a lot safer and easier than creating new copies of the app and changing its name in all the files

 

Last Updated ( Thursday, 29 June 2006 )
 
< Prev   Next >