Subject: Re: [CODE4LIB] Newbie asking for some suggestions with javascript

From: Daniel Forsman <[email-masked]>
Date: Fri, 12 Jun 2009 02:14:45 -0400

Hi Derik,
I have a PHP script run in Cron that fetches the tictocs file and converts
it into XML. The XML file is then parsed when we include it in our OPAC or
other sources. This requires that you have PHP compiled with CLI. I can send
some sample code if you are interested. If you want to have a look you can
do a search for any journal in our OPAC
(http://julia.hj.se/F/?func=find-b-0&CON_LNG=eng ) if you need an example
look for journal of clinical nursing.

Daniel

Daniel Forsman
Systems librarian
Jonkoping University Library
Sweden
[email-masked]
+46 (0)36 101043

>>> Derik Badman <[email-masked]> 6/11/2009 6:34 PM >>> 
Hello all,

Just joined the list, and I'm hoping to get a suggestion or two.

I'm working on using the ticTOCs ( http://www.tictocs.ac.uk/ ) text file of
rss feed urls for journals to insert links to those feeds in our Serials
Solution Journal Finder.

I've got it working using a bit of jQuery.

Demo here: http://155.247.22.22/badman/toc/demo.html
The javascript is here: http://155.247.22.22/badman/toc/toc-rss.js

Getting that working wasn't too hard, but I'm a bit concerned about
efficiency and caching.

I'm not sure the way I'm checking isbns against the text file is the most
efficient way to go. Basically I'm making an ajax call to the file that
takes the data and makes an array of objects. I then query the isbn of each
journal on the page against the array of objects. If there's a match I pull
the data and put it on the page. I'm wondering if there's a better way to do
this, especially since the text file is over 1mb. I'm not looking for code,
just ideas.

I'm also looking for any pointers about using the file itself and somehow
auto-downloading it to my server on a regular basis. Right now I just saved
a copy to my server, but in the future it'd be good to automate grabbing the
file from ticTOCs server on a regular basis and updating the one on my
server (perhaps I'd need to use a cron job to do that?).

Thanks for much for any suggestions or pointers. (For what it's worth, I can
manage with javascript or php.)

-- 
Derik A. Badman
Digital Services Librarian
Reference Librarian for Education and Social Work
Temple University Libraries
Paley Library 209
Philadelphia, PA
Phone: 215-204-5250
Email: [email-masked]
AIM: derikbad

"Research makes times march forward, it makes time march backward, and it
also makes time stand still." -Greil Marcus