|
Mark's Notebook
How do I do this?A Programming Problem Thursday 18 November 2004, 12:40 amKeywords: Computer Topics I want to distribute a CD that has PDF and HTML files on it. It will have a searchable database of the documents on the CD. There will be about 7000 documents on the CD. The documents can be searched by specific content that I can specify, but not by their internal content. So I will construct a database that allows this kind of searching. I want the input and output to be in HTML. That is, the user enters their search criteria into an HTML form, and the browser returns a list of the documents that match their criteria. I would like this CD to work on PC, Mac, Unix, whatever. So I need to construct the database in a common language. It could be done in JavaScript, and such things are commonly done this way. But JavaScript is quite slow for this particular purpose. The database has about 7000 records and 10 fields. An alternative would be to do this in Java, which would be much faster. But it doesn't seem possible to make a Java applet that just outputs text into the browser window. (Not picture text, but text text with links etc.) Really, I want this program to behave like a CGI, but I don't want to require the user to have a web server, only a web browser. Other similar projects get around the slowness of JavaScript by creating large indexes. For example, the Blue Letter Bible does this to allow you to search for specific text in the King James version of the Bible. This is a huge search task but the optimizations have made it relatively painless. But the large audience for the BLB project makes that huge optimization effort worthwile. In contrast, the audience for my proposed CD would be quite small, and I want the project to entail as little effort as possible. I already have a similar database on the web site that uses a CGI built in C++, so creating the CD might possibly be a matter of porting the C++ code to Java. If I could find a way to load the resulting text as HTML into a browser window. There's the rub. Articles
Previous Article
Next Article
Archives
Last updated Tuesday 13 May 2008
|