Thursday, July 27, 2006

App Dev: Benchmarks On-line

I modified Benchmarks On-line so that the benchmark search now uses the MySQL server, referencing a table in the items database. The switch was fairly painless, though I did have to make some changes.
  • The items datbase table was based on the original one used for the web site, but some of the field names had been modified. Updating the script to reference the correct field names was fairly painless.
  • The items database table contains goals from multiple goals documents. I modified the various SQL statements to only pull from Benchmarks.
  • The original table contained a field with the URL of the chapter+section+grade range. The new table did not. It would have been fairly trivial to add this information to the table, but EK seemed reluctant and upon further review I decided it would not require too much effort to modify the script to dynamically generate the URL.
  • I updated the free text search to use MySQL's built-in full text search option rather than the rather crude text search I had developed so many years ago.
Further information regarding the third bullet above:
Once I started working on modifying the code I realized it would require more work than anticipated. The original page anchors were based on the section titles, which would have been fine but often were shortened or had different capitalization. I decided a better approach than trying to figure out each section anchor I would modify the anchors to use letter instead of the title. It took a while to make the change, but probably less time overall because it simplified the programming requirement.

The major drawback to this approach is that it will break any outside links to Benchmarks that rely on the page anchors. I have a solution in mind: use JavaScript to check for an anchor and, if one is found, see if it matches one of the old anchors used. The browser can then be redirected to the appropriate anchor. Should be easy enough to code, though I haven't decided if I'm going to go ahead do so.

Scripting: Debuggin and IE

I hate developing in IE because it provides the most absolutely completely useless error message for JavaScript. I just had to get that out there.

Ok, the error was really ocurring in the Adobe SVG plug-in inside IE, but I think it uses the same or a similar JS engine. At any rate the errors reported are the same as the kind you'd get from IE.

I was able to discover the location of the error, but not the cause. At least, not from the vague error message I received. The specific error message I would encountering was "Expected identifier, string or number" ... with line/column information that was pretty much useless. Luckily I found a blog post that mirrored my situation exactly.

The error was in the JSON returned in response to an XMLHTTPRequest. Apprently the trouble was caused by an extra comma I had forgotten to take out. Seems like something that should cause problems in any JS engine due to bad syntax, but then again I do need to do more research on object notation before I can say something like that with certainty.

References:

Tuesday, July 25, 2006

Coding: Javascript Arrays

I've been working a bit with XMLHTTPRequest lately (specifically in relation to our SVG work). I wanted to make a quick and dirty sample of some functionality discussed with FM, so I thought JSON would be an easy way to get started. I'm not too familiar with object notation so from the start I knew I'd need to do some additional research on it. Plus I've been meaning to look more into the topic.

I wanted to use an associative array to represent the data I'm working with (essentially node/value pairs). While researching the question I came across the article JavaScript “Associative Arrays“ Considered Harmful. I was taken by surprise to find out that JavaScript only supports indexed arrays natively. Those associative arrays I thought I would be working with are actually property extensions to an object. Quite a shocker for me.

This won't drastically affect the progress of the work I'm doing right now because it's very preliminary. The eventual product will use a much more complex data set that requires a different representation within the code.

Based on this discovery, however, I feel I need to do some more research on JavaScript data structures in addition to object notation. This knowledge is certainly important from a programming standpoint ... I could easily work myself into a corner by not understanding the implementation of the objects and data structures in JavaScript.

Monday, July 24, 2006

IERI: Updates

The IERI utility has been in heavy use the past few weeks, so a few minor but common issues have come up. A few of these I decided to go ahead and fix, namely:

Movie availability
In order to do an enacted analysis the timecoding of the activities has to be completed by an administrator and the movie released. Once a movie was released it could not be used for further activity-level timecoding once analysis had begun. A lot of people were releasing the movie after timecoding only a single activity, or a group of related activities, even if the movie contained other activities.

It looks like the purpose of enacting movie release restrictions in the first place are not really an issue with the utility as it's currently being used. I went ahead and made it possible to undo a movie release so that further timecoding can be done.

Movie filename
There is a filename check to ensure that the movie loaded for playback matches the one selected in the utility. This was causing some problems because there are instances of the movie name being mistyped. I updated the utility to allow for the movie information to be updated from the enacted activity timecoding page.

CD/Label information
When an activity is timecoded using the JS functionality the CD label and movie filename are updated automatically. This was not happening if the information was being entered manually. I updated the page so that manual entry would result in the movie information being updated (based on the currently playing movie if available). If not current movie information is available it will maintain the previous movie information.

In addition, I made it so that any timecoding would result in the text "Save to update information." would be placed in the label/filename table cell.

Friday, July 07, 2006

Web Site Updates: 2061 Connections Index

I updated the index of 2061 Connections issues. It now lists the issues as well as the articles from those issues. The current page is static, but it may be more benefitial to create a database-driven page since MK wants to possibly provide more than one view (such as an alphabetical list of articles).

Mass Mailing: Workshops Notification, Summer 2006

A Workshop Schedule Notification was sent out on 07 Jul 2006 4:24 to 2628 E-mail Alerts users and 13 users of the one-time notification feature.

Usage Analysis Options

Webtrends can accept custom definitions of search engines. I had previously set up the program to recognize the AAAS search. However, I remembered today that when AAAS updated the search engine I forgot to update the Webtrends search engine list. This is mostly a reference note for documentation. The settings are found in the program options under the "Search Engines" area.

Search Engine Name: AAAS Vivisimo
Identification Strings: vivisimo.aaas.org vivo.aaas.org
Keyword Indicators: &query ?query