Programming and Scripting :: how to script with monkey web server ?
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 ?
Thanx.
CGI programming with Perl, Lua, or Bash (or C if you can use tcc and its header to build your program).
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:
http://www-128.ibm.com/developerworks/web/
http://developer.yahoo.com/javascript/
http://developer.yahoo.com/yui/#start
http://developer.mozilla.org/en/docs/AJAX:Getting_Started
http://www.w3.org/TR/html4/struct/global.html
http://code.google.com/
Good luck
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.
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.
Next Page...
original here.