LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 09-29-2007, 11:20 AM   #1
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Rep: Reputation: 15
Client Side Computing


Hi Folks,

I'm trying to understand/learn how a web application can do computations at the client-end. I've been reading up on possibilities and as I understand things, the only way one can do client-side computing is via Javascript. Am I right about this? I browsed through other scripting languages and it appears that most of the others can be invoked only on the server-side via say CGI. Are there any other possibilities for client-side computing? Much as I try to follow up material on the web, I'm drowning in the acronym soup out there, and it's getting harder to process/evaluate all the info out there. Any tips/guidance would be most helpful. Thanks!!
 
Old 09-29-2007, 12:46 PM   #2
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
You can do client side programming of "web" in any language you like.

You're thinking "browser" I guess - but consider applications like wget or any kinds of spiders written in Perl's LWP, or proxies or the WebDAV-support of subversion.

Many tools speak HTTP and send requests to a webserver and retrieve a response, there doesn't always have to be a browser like Firefox involved.

Anything sending a HTTP (or HTTPS for that matter) request to a webserver is a client - if you like, you can speak HTTP to a server by hand connecting to port 80 via telnet and simply typing GET index.html (just an example).

If you're asking for languages which can be called from within the realm of your browser, that would be most of the time JavaScript, because most contemporary browsers do have a JavaScript interpreter included and JavaScript is designed to do all the DOM-handling stuff.

Theoretically, you could program a Python, Perl, Lisp, Whatever interpreter for Firefox which (hopefully obeys security issues and transforms the DOM tree and so on and acts the same way JavaScript does now.

Theoretically.
 
Old 09-29-2007, 01:08 PM   #3
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks Su-Shee. Thanks for the correction, yes, I was thinking of the browser as the client. So if I want to use the browser, and want to "program from within the realm of a browser" (nicely put), I would have to use Javascript. I guess your hearty grin on your closing statement tells me that "you've done it"...I think I wouldn't have the necessary skills to write an interpreter, but if you know of some open source effort or where I might learn of such an effort I would certainly appreciate a link or two. This would be mainly to further my understanding of possibilities. Thanks a ton for your response. Do appreciate it.
 
Old 09-29-2007, 01:20 PM   #4
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
No, my grin means "I've never seen anyone who really ported Python into Firefox".

Yes, inside a firefox, you have to use JavaScript. That's not bad, though, it's handy programming language, very well documented and not that hard to learn AND:

Remember what you can do if you don't consider Firefox/Mozilla as "just a browser". Strictly speaking, a today's mozilla is an entire development environment with GUI and styling options and complete network support included. Oh, and it runs under Linux, Mac and Win. Oh, and you can add new own bindings. Oh, and it understands SVG...

Think of Thunderbird, Songbird and Komodo - all based on Mozilla, all written in (as least partly) JavaScript with XUL.

Don't think less of JavaScript and of Mozilla combined with JavaScript in particular.
 
Old 09-29-2007, 02:46 PM   #5
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Original Poster
Rep: Reputation: 15
Su-Shee, thanks once again!! Your comments & perspectives are valuable to me!! Will help me start-off in the right direction (hopefully, )
 
Old 09-29-2007, 03:13 PM   #6
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Don't forget java and flash. Both can do client side computing, within the scope of a browser.

Of course, you can only do client side computing at all if the user permits the scripts to run. Myself, I normally won't allow them to run. Actually I have a whitelist of sites that can run scripts; any site not on the whitelist can't run scripts.

The internet-capable versions of my software package do a peer to peer client/server networking thing, where who is the client and who is the server varies from transaction to transaction. It does a LOT of client-side computing, but of course the user has agreed to that by installing the package and the user knows about it. Also, I don't use the web or a web browser.

Last edited by jiml8; 09-29-2007 at 03:15 PM.
 
Old 09-29-2007, 03:33 PM   #7
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks jiml8. Thanks for the tip on Java & Flash. At this stage since I'm only experimenting, the user permission won't matter, later if I manage to make some headway, my target group will be an internal/lan group, so once again it will be manageable. May I inquire whether your application does a lot of number-crunching & visualization? And if so, what would be your recommendation amongst the 3 possibilities - Javascript, Java or Flash? Thanks.
 
Old 09-29-2007, 04:03 PM   #8
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Again, I don't use the web or a web browser. Hence, I am not using javascript, java, or flash for my application. It implements a distributed database across the internet and is designed to maintain data consistency among far-flung nodes while minimizing the amount of data that needs to be transferred across the internet. Most of the communications are database queries and the results of those queries.
 
Old 09-29-2007, 05:02 PM   #9
Su-Shee
Member
 
Registered: Sep 2007
Location: Berlin
Distribution: Slackware
Posts: 510

Rep: Reputation: 53
Quote:
Originally Posted by itnaa View Post
Thanks jiml8. Thanks for the tip on Java & Flash. At this stage since I'm only experimenting, the user permission won't matter, later if I manage to make some headway, my target group will be an internal/lan group, so once again it will be manageable. May I inquire whether your application does a lot of number-crunching & visualization? And if so, what would be your recommendation amongst the 3 possibilities - Javascript, Java or Flash? Thanks.
First, Java and Flash are only available if the user installs the Flash plugin and/or has (at least) a Java Runtime Environment which is basically a library to be loaded from within the plugins-directory of Firefox.

You can't be sure the user has those two. Even if they have a Java JRE, many disable Java in Firefox. And many prohibit every Javascript action besides checking if the form has been correctly filled in. And _WEB_pages which could only be used and even just seen with Flash.. *censored*

And JavaScript itself can easily be disabled in browsers - so even that is not available to you any time and in any browser.

Good webprogramming is very defensive programming - assume nothing, tolerate everything and don't force the user into anything.

Don't rely on Java or Flash and make sure everything can be used and seen with JavaScript disabled.
 
Old 09-29-2007, 06:17 PM   #10
itnaa
Member
 
Registered: Dec 2006
Distribution: CentOS 4.4 (2.6.9-42.0.2.ELsmp)
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks folks. Appreciate your taking the time to respond!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
client side NFS files? bobbens Linux - Networking 3 11-01-2004 02:52 AM
tcp/ip programming client side gajaykrishnan Linux - Networking 2 07-29-2004 11:58 PM
help with client side NFS-firewall setup and server side NIS-firewall setup niverson Linux - Networking 3 02-02-2004 08:52 AM
client side routing? heiseltc Linux - Networking 1 03-06-2003 06:40 PM
client side smtp problem f1uke Linux - Newbie 6 02-25-2003 01:04 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:46 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration