Click to See Complete Forum and Search --> : client side vs. server side, do you have a preference?


havik
06-13-2003, 12:46 AM
I was reading the following:
http://www.websiteowner.info/articles/cgi/whichside.asp

and I was thinking about the advantages and disadvantages of both. I was also thinking about whether people have a preference. Personally, I don't know that many server side languages, thus I use them rarely.

Havik

PeOfEo
06-13-2003, 02:13 AM
I would much rather use server side scripting because server side can do more advanced functions like directly manipulating data with the greatest of ease but it also wont lag up a site like client site. A bunc h of java scripts will lag up a site like no other for 56k users.

havik
06-13-2003, 02:58 AM
True, good point

That's one for server side :D

Havik

jeffmott
06-13-2003, 03:38 AM
Since client-side scripting is not guarenteed to work the same in different browsers and versions, if it's even enabled at all, makes client-side a poor choice for your site's functionality to rely upon. Password protected pages are difficult to maintain. And since there is no way to store data for all visitors of the site to access, amy interaction a user encounters will only be with themselves.

In my opinion this makes client-side good for fashy stuff only and server-side necessary for functionality. It is also my opinion that functionality is FAR more important than flashy. For example, this site: not particularly flashy and I think I even remember it being described as ugly once. But it gets much more visitors (both new and returning) than a site with an expandable menu that fades in and out.

PeOfEo
06-13-2003, 03:41 AM
I would use java script to make.. A clock... Thats about it lol. I cant think of what I would use java scirpt for, oh yea I used it for a random quote rotator so that you see a random quote when you enter my site. But I really dont like client side scriting it just poses too many problems its risks outweigh its benifits one might say.

Charles
06-13-2003, 05:05 AM
My vote goes to a judicious use of the two. Take form verification. The 13% of users who do not use JavaScript need the form verified at the server but the 87% of users who do use it do not want to wait for another set of HTTP requests. And on high traffic sites, a server-side only approach puts an unnecessary burden on the server. The solution is to have both client and server-side verification.

Vladdy
06-13-2003, 11:08 AM
... its about like asking what is better a sports car or a truck...
... it all depends on a particular task.
In most cases it would not be either/or but correct combination of the two.

Khalid Ali
06-13-2003, 11:42 AM
Originally posted by Vladdy
... its about like asking what is better a sports car or a truck...
... it all depends on a particular task.


I totally agree with the above.

I hope you guys are not forgetting that why there were a need for a client side scripting.
"To reduce the burden on a werver as well as free the network traffic"

Now there are a tonnes of places where client side Scripting is as imparative as server side...just imagine one example

This very forum gets hundreds of viewers a day...say scores of those ask questions and/or respond to them..now just imagine..if the server had to validate for all of the responses/questions for validations of the text fields? headers? titles...???
I guess you guys get the picture..the server would have been down all the time..basically a DOS attack caused by members..Not to mention the network cloging.

Conclusion....It has to be a moderational use of both technologies, there is no either or solution.

havik
06-13-2003, 01:46 PM
Good good, so the general responses at that they both complement each other, so neither should be abandoned.

Havik

PeOfEo
06-13-2003, 06:39 PM
so your saying that we should use not a beamer but not a gmc pickup. You are saying we need an el camino. I like car references. I dont know I just dont find java script all that useful because it Is hard to get values from java script and record them with a server side. What do you use java script for anyway most of the time. I only use it for like I said clock and a quote rotator but thats it.

Khalid Ali
06-13-2003, 06:58 PM
Originally posted by PeOfEo
so your saying that we should use not.. What do you use java script for anyway most of the time....

I guess you did not read my post at all..probably missed it cus you were bizy reading "Road & Track"...???

:D

Ribeyed
06-13-2003, 08:27 PM
Hi,
I am not a fan of client-side either but I do agree for something’s you can’t use anything else e.g. adding to bookmarks, status text and to a lesser degree client-side form validation. I regard to validation, server-side versus client-side validation I prefer to do it server-side after all I normally post back to itself anyway so I validate my forms at that point. As pointed out in Charles above post this does involve a trip back to the server and maybe a disadvantage on a high traffic site.
The advantage I see server-side validation has over client-side is that you can change your form based on the first input regardless of weather or not the information submitted is valid. I find it useful to highlight and provide descriptions where the wrong data was entered, and have this built into the form.
I am also not a big fan of JavaScript again use it when necessary to achieve the results I am looking for, but would certainly never base my whole site around it. The thing that worries me most about JavaScript is “what happens to all my functionality when the user has JavaScript disabled?” Roll on the days when the ASP developers move on to ASP.NET and the Php lot get a .NET version of Php if its not already around, then JavaScript will be sent to the or realms to join the rest of the obsolete languages.

anarchist
06-18-2003, 09:24 AM
I have worked with both client and server code, and found that most anything that can be done on the server can be done on the client for example page generation and database access.
I've found that for dynamic pages that need to update without a reload, then client side code will be best, so clocks, live form validation, and menus.
Server side should be used mostly for databases, file handling and anytime that its known the client may not be able to run a client side application

like most people have said it depends on what your doing, or to use a mix.
a good exaple of using a mix would be an email application, you have an address book stored on the server so the server generates a page to select contacts, once the contacts are selected then use a client side script to pass them into the correct feild on the email compose page

really you can do anything serverside except for dynamically changing paages, however you can use the serverside script to generate clientside script to do this

the only real way of decideing between the two is too look at your costomer base and what's available, if your creating a site for the general public, its probably best to avoid client side scripting and use the server, but if you know that everyone that'll see your pages use for example ie with scripting fully enabled, then you can use some client side scripting to take the load of the server, and add more features to the pages