Client-Sided
and Server-Sided
In this post I will explain the advantages and disadvantages of using client-sided and server-sided
scripting. I will also be compare the two different methods of scripting and discuss validation, the functionality of validation and how it is used. I will explain what the user experience is when visiting a webpage and how client-side scripting helps improve this.
Client-Side Scripting
Client-Sided Scripting is
computer programs that are executed on the client's computer system, rather
than the server. Client-Side scripting can be embedded in HTML or be kept in a separate file that is downloaded onto the client's computer.
JavaScript is a scripting
language which is used for client side scripting. Client side scripting is used
mostly for design work such as creating graphics and adding effects. Examples of client-side scripting on webpages are drop-down menus and validation. By using HTML,
along with CSS and JavaScript, they have many features such as buttons
and drop down lists which can be created.
Server Side Scripting
Server side scripting is a type
of scripting language which is executed by the servers which host the Webpages a user may be viewing. Server side scripting waits for the user’s response and
once the user has responded, the data goes to the server database and waits for
the server’s response. Server side script can:
- Dynamically edit, change or add any content to a Web page
- Respond to user queries or data submitted from HTML forms
- Access any data or databases and return the result to a browser
- Customize a Web page to make it more useful for individual users
- Provide security since your server code cannot be viewed from a browser
The server checks through a
database and once the server responds, the client will download all the
information and will display the webpage on the client’s browser.
Server side script is used for sending the request through a secure server, such as bank payments and financial information. Server side handles processes and tasks that client-side script is unable to do.
Server side script is used for sending the request through a secure server, such as bank payments and financial information. Server side handles processes and tasks that client-side script is unable to do.
Comparison of
Client-Sided and Server-Sided Scripting
The differences of client-sided
and server-sided scripting are that server-side script needs more security
to protect it, this is because a server is used to hold more important information such as account information and payment details.
Server side script mainly uses Java which is more open to being a security risk to user’s computer systems as it allows programmers to create malicious code. Using Javascript doesn't allow programmers to create malicious code which is able to infect and wipe user's computers.
A disadvantage of client side script may not be able to be viewed on all versions of certain browsers, this may be a problem for users trying to view a webpage with an outdated browser.
Both scripting methods are good to have on web pages as each one has a feature that is an advantage that the method does not have. Client side is fast for responding to requests and it has many features for the design layout of the Webpage.
The other method which is server side scripting is used for sending the request through a secure server, such as bank payments and financial information. Server side script looks through a database to match a request. The disadvantage of this server side script is that its slower for the requests and responses.
Server side script mainly uses Java which is more open to being a security risk to user’s computer systems as it allows programmers to create malicious code. Using Javascript doesn't allow programmers to create malicious code which is able to infect and wipe user's computers.
A disadvantage of client side script may not be able to be viewed on all versions of certain browsers, this may be a problem for users trying to view a webpage with an outdated browser.
Both scripting methods are good to have on web pages as each one has a feature that is an advantage that the method does not have. Client side is fast for responding to requests and it has many features for the design layout of the Webpage.
The other method which is server side scripting is used for sending the request through a secure server, such as bank payments and financial information. Server side script looks through a database to match a request. The disadvantage of this server side script is that its slower for the requests and responses.
Validation
Validation is checking a field against a database to see whether it is correct or not, or to see if a certain check box is filled in or not. Forms are used a lot on Webpages such as when a user is creating new a account on a webpage or purchasing products and need to fill in details such as
quantity, address etc. JavaScript is often used to validate these forms because it is
suited for handling data such as personal details. An example of validation is
asking a user for his email address and password when logging into their
account on a certain website.
Validation is usually done via
client-sided scripting apart from form validation which is done via Java on the
server-side. Using this method of validation on the users
system makes feedback instant.
Validation can also be done faster when checking for errors because it will be using the web browser and not a server. When a user enters something wrong into a text field such as entering their account details, for example if the email address doesn't exist, client-sided scripting will validate the text field with information from the web browser. If it doesn't match, it will show an error.
Validation can also be done faster when checking for errors because it will be using the web browser and not a server. When a user enters something wrong into a text field such as entering their account details, for example if the email address doesn't exist, client-sided scripting will validate the text field with information from the web browser. If it doesn't match, it will show an error.
This is much more efficient than
using server-sided scripting for validation, because using the same example above, the
user enters the wrong data, and the data would need to be sent to the web
server, checked, and then sent back to the user’s computer system. This takes
time and uses processing power on the web server.
User Experience
The user experience is how the
user views and uses the webpage they are viewing. Ease of access and clear
simple layout all add up to the overall user experience. The user
experience is usually achieved by client-side scripting.
Examples of these features are drop-down menus, validation rules, system performance, and marketing. A good
example of a webpage with good user experience is Amazon.
On their webpage they have a number of drop-down menus with sub topics making it easy to find a certain product or service. Using this makes it a much clearer webpage to navigate. Amazon gives the user interactivity as they affect things on the website, such as making a drop-down menu appear, instead of just clicking a hyperlink. They also have a lot of promotions and advertisements for their products on the main homepage.
Client-sided scripting can help improve the user experience in many different ways such as, faster loading times, being able to remember a user's details when logging in, able to have better graphical images and more interactivity in the form of buttons, and rollovers.
On their webpage they have a number of drop-down menus with sub topics making it easy to find a certain product or service. Using this makes it a much clearer webpage to navigate. Amazon gives the user interactivity as they affect things on the website, such as making a drop-down menu appear, instead of just clicking a hyperlink. They also have a lot of promotions and advertisements for their products on the main homepage.
Client-sided scripting can help improve the user experience in many different ways such as, faster loading times, being able to remember a user's details when logging in, able to have better graphical images and more interactivity in the form of buttons, and rollovers.
The user experience all depends
on whether the user load the webpage without long loading times, can easily
navigate the website using various methods, search bar, drop down menus, the
users previous experience on the webpage. Users want interactivity
and instant feedback like roll over buttons and hyperlinks on pictures.
References
References
Server side scripting - 06/06/2014 - http://bit.ly/1m2SGPt
Web server scripting disadvantages - 06/06/2014 - http://bit.ly/1mHkiYW
Advantages and disadvantages of client side scripting - 06/06/2014 - http://bit.ly/1obznG7
Client side scripting - 06/06/2014 - http://bit.ly/SF1d0J
Advantages and disadvantages of client side scripts - 06/06/2014 - http://bit.ly/1nt4sCC