Sorry I'm late to the party...
I just finished a (MetaCard) software project where teachers create stacks,
and the stacks are essentially thematic unit plans correlated to our
curriculum. Since we have 30 elementary schools, we decided to set up a
server which could host stacks written by teachers from all over the county.
I built an ftp engine into the program with one button uploading and
downloading of stacks. The server is an iMac running WebStar. The whole
thing worked great, except for one thing... the stacks were 600 - 700K, and
so transfer times were not super-zippy. The reason the stacks were so large
was because they had a lot of curriculum listed, as well as other resources.
Enter XML. Instead of sending a 700K MetaCard stack, the program now sends
a 20K XML file. What I did was to essentially write each card as an xml
entry into an xml file, then send the file. On downloading a theme,
MetaCard then makes a copy of an empty template stack, then parses the data
into the stack. A simple example would be a card named "A1" with a text
field named "activity." On creating the xml file, the xml code would look
like this (I'm using parenthesis instead of the usual less-than,
greater-than symbols, because that might screw up this post!)
(entry)
(card_name)A1(/card_name)
(activity)Students will write an essay.(/activity)
(/entry)
The downloading script is simple - it just reads each entry and places the
info into the appropriate fields of each card. Worked perfectly. Then I
made it a bit more complicated by putting the htmlText of each field in to
keep the formatting, and that worked fine also.
Our district IS folks were VERY happy to see the size of the files we're
sending go from 700K down to 20K! And the download and upload speed is, of
course, a katrillion times faster. Everyone is happy.
It gets better. Since the xml files can be indexed by WebStar, I was able
to build a search engine into my program which lets users look INSIDE of
uploaded themes. So a teacher can search for "whales" and WebStar will
return any units that have that word in them. Cool!
XML in this case proved to be very, very useful!
:)
Richard MacLemale
Instructional Technology Specialist
James W. Mitchell High School
Archives: http://www.mail-archive.com/[email protected]/
Info: http://www.xworlds.com/metacard/mailinglist.htm
Please send bug reports to <[EMAIL PROTECTED]>, not this list.