In this section of my blog, I will be describing how a scripting language can improve the functionality of a website. I will also include a comparison of the advantages of client side scripting to server side scripting. Description of how client side scripting can improve the user experience and form validation will also be included in this section of my blog.
Client side scripting vs Server side scripting
Javascript is proven to be the best client side scripting language for a number of reasons, one of which is the fact it's supported by almost all browsers, however older versions of Internet Explorer do not fully or support all of its features and functions.
The two environments that can run scripts are Client side and Server side. There are a number of reasons and facts as to why client side scripting is better than server side.
One of the greatest advantages of client side scripting over server side is that a website's script is executed much faster, because the connection to a web server, which contains a website's script is no longer necessary, because it is now being executed on the client side via their browser.
Furthermore, client side scripting allows better interactivity by responding instantly to user's actions, whereas with server side scripting the response takes longer and may suffer delays due to issues relating to the web server such as connection problems.
Due to the way dynamic scripts operate, if they are run on the server side there's a higher risk of hackers being able to gain access to those servers exploiting code flaws. In comparison, if such scripts are run on the client side, the risk is lower, because the client would not actually have access to the script itself, because all they do is enable the script to be executed in their browser.
UX - User Experience
Since client side scripting is executed on the user's browser, it allows for the creation of faster and more responsive web applications. Web applications are applications, which use a web browser e.g. Google Chrome as a client. An example of Javascript web application is 'Go', which is a board game for two players. This means that client side script will run such applications more efficiently, which therefore improves user experience.
Furthermore, scripting can be used through a user interface. We know that a client side scripting enables the script of a website to be executed within a user's browser, however different users have different computer configurations e.g. larger or smaller monitors resulting in higher or lower resolution and size. Thus, the user interface automatically resizes parts of a webpage (e.g. boxes) in order to make it fit correctly in accordance with the user's configuration and settings. This affects user experience in a positive way.
Client side scripting affects the overall performance and responsiveness of web applications by improving them, but it also affects the responsiveness and performance of actions and functions carried out by the user. For example, when you hover over a text link in Amazon, you instantly receive a response, which could come in the form of a drop down menu/box.
Validation
In the past client side scripting was mainly used for validation purposes due to the effectiveness and convenience for users. If a webpage's script is executed on the client side and a user attempts to enter an input, it's being automatically validated on the client side, which saves time as otherwise the user would have to wait for the web server's response, whereas now they would receive an immediate response. Client side validation could help avoid potential errors, that may occur when input is sent to a web server to be further processed and validated. Therefore, this feature improves user experience by responding quickly at the user level.
For example, when you attempt to sign in on Amazon, you are prompted to input your e-mail address and password. If you input your e-mail, but accidentally forget to input your password and you click on the sign in button, you will receive an immediate response (error) saying that you need to input your password. This is one of the benefits to client side scripting related to form validation.
Additionally, the immediate response received from client side validation benefits from simple, yet highly effective error recovery mechanism, which identifies the areas/fields of invalid input and provides the user with appropriate, yet short level of guidance and assistance. Moreover, if user's input is valid, they will often receive immediate response that notifies them about correctly input data.
For example, registration forms require a user name and/or e-mail and a password, which must be entered twice to ensure no mistakes have been made. Depending on the structure and design of the website, the client side scripting would often provide an immediate response as to whether the passwords match in the form of a simple green tick or red cross next to the input boxes.
References:
What are the disadvantages of server side scripting, 10/05/2014, http://bit.ly/SLXjDk
How to with PHP, 10/05/2014, http://bit.ly/RyiKqi
Advantages and Disadvantages of a client side programming language, 10/05/2014, http://bit.ly/1obznG7
Why do we need client side scripting language?, 10/05/2014, http://bit.ly/1mzdgd6
Client side vs Server side validation, 10/05/2014, http://bit.ly/1ldG5bh
User input validation, server side or client side, 10/05/2014, http://bit.ly/RylljO
Client side scripting, 10/05/2014, http://bit.ly/SF1d0J
Sample Web Apps, 13/05/2014, http://bit.ly/1g4drtU