[REBOL] Using Rebol with HTML templates, reading dynamic data -- is it possible? Re:
[EMAIL PROTECTED] wrote: 1. A Rebol script can be used to fetch data from a textfile and put the data into a HTML template, thus creating an unique web page? In this way one may render lots of documents of the same kind, but with unique data, such as a list of products where each product is linked to a script-generated information page? 2. A Rebol script can be used in the way above, but on the server side, reading data from a text file for input to the HTML template. In this way, Rebol may serve the same function as Visual Basic or Javascript within an Active Server Page? 3. Which one of the two above methods is preferred -- rendering unique web pages with a script or having the script read data "on the fly" thus providing dynamic web pages? With your first method you mean 'static rendering' I suppose - this is a viable method for high-traffic sites (but almost certainly not necessary). In general, you're more flexible with method 2 - although I don't know if 'HTML-embedded Rebol' is possible (well, it is certainly possible but I haven't come along a standard way to deploy it). I would be really glad to get some ideas on this, and maybe even some code that I can play around with to learn from. Thanks! You can play a bit with my Vanilla system (http://www.langreiter.com/vanilla) - it's easy to understand, supports templating and editing over the web, extension scripts and so on ... If you want to try it out without installing it on your own server, have a look at http://iw2.infowerk.co.at/cgi-bin/vanilla.rBest wishes, Chris Langreiter
[REBOL] Using Rebol with HTML templates, reading dynamic data -- is it possible? Re:
Hi Martin, At 11:56 PM 4/10/00 +0200, you wrote: 1. A Rebol script can be used to fetch data from a textfile and put the data into a HTML template, thus creating an unique web page? In this way one may render lots of documents of the same kind, but with unique data, such as a list of products where each product is linked to a script-generated information page? That is correct. This can be done offline, i.e. creating static webpages. 2. A Rebol script can be used in the way above, but on the server side, reading data from a text file for input to the HTML template. In this way, Rebol may serve the same function as Visual Basic or Javascript within an Active Server Page? Absolutely. 3. Which one of the two above methods is preferred -- rendering unique web pages with a script or having the script read data "on the fly" thus providing dynamic web pages? It depends on what you are trying to do, what resources are available on your machine and how many hits you expect to process. As a rule, static Web pages are of course less resource hungry and more stable. I would only use dynamic Web pages if the data changes often enough to justify the additional overhead on the server side. Or if the ratio of expected number of hits vs. the resources available on the machine is ridiculously low. I would be really glad to get some ideas on this, and maybe even some code that I can play around with to learn from. Thanks! Look at Andrew's HTML Dialect in the archive at www.rebol.org. Hope this helps, ;- Elan [: - )]