how to script with monkey web server ?

Forum: Programming and Scripting
Topic: how to script with monkey web server ?
started by: manishsadh

Posted by manishsadh on Feb. 16 2007,07:20
HI Folks,

i need to do some web programming with html and scripting of some kind to make the web pages dynamic.

i want to use just the monkey web server. i dont want the overhead of any dsl extensions.

what are my options ?


Posted by mikshaw on Feb. 16 2007,15:00
CGI programming with Perl, Lua, or Bash (or C if you can use tcc and its header to build your program).
Posted by newOldUser on Feb. 16 2007,16:59
I guess it really depends on what you want to do.  One easy way is to move all the 'dynamic' stuff to the client, not the server.  Use JavaScript in your HTML that is served by Monkey.  The JavaScript gets run in the clients browser.  Google, Yahoo and others have done some very nice pages this way.

Do some Google searches on JavaScript, Document Object Model ( DOM ), AJAX and take a look at these websites for ideas and tutorials:
< >
< >
< >
< >
< >
< >

Good luck

Posted by mikshaw on Feb. 16 2007,17:55
Unfortunately, javascript and other client-side solutions are not really the best option for serving dynamic content.
It seems more and more people are opting out of client-side scripts for security and privacy reasons, and browsers are making it increasingly easy (and in some cases seemingly encouraging) to disable these scripts.
In addition, these scripts are hardly ever implemented the same from browser to browser.
Using server-side programs is also faster in many cases, since the script does not need to be downloaded before it is run.

Personally I have scripting disabled by default in my browsers, with only a very few trusted sites enabled.

Posted by newOldUser on Feb. 16 2007,23:53
Mikshaw, I agree with you to some extent...  It's true that server side scripting has it's place. If you're moving lots of database fields around then the server is perfect.... On the other hand if you're interest is in a more fluid, application like, experience for the user then client side scripting works better.  It's just a matter of the right tool for the right job and sometimes I use both.

I find doing financial transaction via the Internet scary, with or without javascript enabled. Disabling scripting does not make your transaction safe but it does limit your experience on other websites.    Sometimes I use Dillo, which has no scripting support, on webpages where I want to be in more control.

manishsadh asked about using a native DSL environment to do dynamic webpages. That puts a limit on many of the server side scripts.  Like I said before it really depends on what he wants to do. If he wants to display a lot of database (SQLite?) information on static html pages then maybe server side will be best.  If he wants to have things float around on his webpage, appear and disappear on command, change fonts and colors or do drag-n-drop, well then server side isn't going to cut it.

Javascript is quick to learn and easy to use. All it requires is a simple server and a brower with script support.  If your scripts include some the javascript libraries (.js files) that are available in the websites I listed they help to ease the problem of cross-brower scripting.

Posted by mikshaw on Feb. 17 2007,03:21
yes, I think you're right that each has it's place.  Another particular instance when client-side scripting would be better is if you have no cgi access to the server (also unfortunately an increasing situation).

Also wanted to add for the sake of clarity that when I said "more and more people are opting out of client-side scripts" I meant endusers rather than developers.  I can't say I've seen a decrease in the use of javascript and similar client-side scripts...just that there is an increasing number of tools available to block them, and users are apparently using those tools.  Take for example the Firefox extensions made specifically for controlling scripts, where it wasn't too long ago when browsers that supported javascript either allowed all or merely gave you the option to disable it entirely.

Posted by durbnpoisn on Mar. 17 2007,16:53
Right tool for the right job, is the key.

Both server side and client side have their pros and cons.  But moreover than that, they each have their limitations.  To effectively write a webbased app, you need to use both.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.