In this report, I am going to be comparing the advantages of client side scripting to server sided scripting. I will also be describing how client side scripting can improve the user’s experience. Finally, I will describe how client side scripting can improve form validation.
Compare
Client side scripting offers a lot of advantages to developers, for example, client side scripts allows for more interactivity by instantly responding to the users actions. These actions are very quick because they do not need to be sent to the server to execute, whereas server sided scripts will be executed on the server. Client side scripts are reusable, people can upload many scripts onto websites such as Hotscripts.com and Javascript.com. Client side scripting can be embedded into the page on the client’s browser. However not all browsers support scripts, and therefore can lead to errors. Sever sided scripts ensures that the user does not need to download and plugins such as Java or Flash. One of the more popular advantages for server sided scripts is that they are more secure than client sided; this is because the scripts are hidden from the user; only html is visible to the user. However due to the way that dynamic scripts are, they create new security issues due to the flaws in code that can be exploited.
UX
Client side scripting can improve the users experience in numerous ways. For one, scripting languages can usually always be embedded within HTML. Scripting language allow developers to easily write and run code easily. With client side scripting desktop environments can be simulated, for example, drop down boxes, buttons and the ability to drag and drop. Amazon.com is an example of a simulated desktop, you will find a lot of interactive features such as Roll overs and interactive slide shows that enhances the users experience. Amazon have tried to make their website as easy to use a possible, they have achieved this by implementing many features that can be found on a desktop such as Windows, this is because the users will be familiar with how things work and wont need to learn anything to be able to use features on their website. Client side scripts are fast but can be dependent on the users system. For example a slow system will make things a lot slower, however in today’s day, most people’s systems are fast. Server sided scripts will be slower because it is dependent on the connection and then the server having to process the script. The users experience can also be improved as client side scripting allows for interactivity. For example, RollOvers, Drop down menus etc. All of this interactivity can be achieved by using a client side language, such as JavaScript (JavaScript can be both client sided and server sided). This really helps users navigating websites and also makes the website look much better.
Validation
Client side validation is good because it is a fast form of validation; this is because if any issues happen when running the code, an alarm is triggered when the form is submitted. One error can be displayed once at a time, this allows users to focus on what fields need to be corrected. However, client side scripting can also display all errors just like server side validation. Showing the user all of the errors at once is sometimes seen as a bad thing to do; this is because the users will need to fix all of the errors in the fields at once, and thus forcing them to remember all of their errors each time they submit. Validation can be done in many different ways; users can be easily indicated that they have written something incorrect, it is possible that text fields can have its colour changed to indicate something is wrong. Here is an example of client side validation being used to change the colour of the field of text.
if (myform.fname.value=="")
{
alert("No first name entered");
myform.fname.focus();
myform.fname.style.background="yellow";
}
The snippet of validation code above essentially checks to see if the text field - fname is empty; if the field is in fact empty an alert box will appear and the background colour of the field will be changed to yellow, telling the visitor that something is wrong here.
Resources
http://www.opensourcetutorials.com/tutorials/Design-And-Layout/Usability/web-widgets-part-2/page2.html
https://www.sitepoint.com/form-validation-client-side/
https://www.experts-exchange.com/questions/20609324/Advantages-Disadvantages-of-using-client-side-scripting-over-HTML.html
No comments:
Post a Comment