Unit 20 – M2: Discuss how a scripting language can improve functionality
Introduction
It is essential that websites function and the functionality
of websites in this day and age are of a high standard. There are various
things that could improve the functionality of a website, one of them being the
type of scripting used; either client side scripting or server side scripting. So
therefore in this report I will be focusing on describing how the scripting
language can improve the functionality of a website, alongside comparing the
benefits of client side scripting to server side scripting and describe how
client side scripting can improve user experience and validation in a website.
Client side scripting
This is an essential part of HTML as it enables the
scripting of webpages which then makes the webpages have different content/reactions
depending on what the user inputs and other variables. Client side scripting is
simply websites or web programs that execute on the clients computer/client
side, which is for example on the clients web browser. Instead of executing on
the webserver. The script is mostly written in the HTML document of the website
which makes it an embedded script however, it could be written in a separate
file. Client side scripting simply works by transferring the source code of the
web page from the web server it is stored on to the client’s web browser; these
source codes contains all the information and instructions; like the action
that happens when a button is clicked.
Server side scripting
Server side scripting is simply a scripting technique that
customises the webpage for the user upon their request to the server. This is
done by adding a script on a web server and this script creates a response
specific to the user. This is written in languages such as server side
JavaScript, Python, PHP and executes on the web server.
User experience
Like I have mentioned in the introduction of this report,
websites functionality can be improved with the use of scripting languages. Web
designers improve the user experience of the website using scripting languages
like JavaScript. JavaScript helps with interactivity and the fact that users
only come in contact with the finished product/front-end part of the website,
JavaScript will help improving the user’s experience. Making the website
adaptive to the user’s device will improve the users experience for example,
viewing a website on a desktop and viewing it on a tablet will be different due
to their screen sizes. JavaScript could be used in order to make the content of
the website adapt to the devices so the user can view it without any problems.
Users having control over their webpage due to interactivity
improves their user experience. The scripting language that supports
interactivity which can help in improving user experience is JavaScript.
JavaScript can be used to create pop up boxes that give the user information
for example, when the user clicks on “next” when filling a form, if the user
misses an important slot there could be a pop up box alerting them to where the
mistake is. This improves the users experience as they know where the issue is
rather than having to scan through the entire webpage to spot the issue.
Scripting languages can bring about widgets like a timer or
clock to websites, which improves the functionality of the website. The user
will be able to view the real time while browsing on the webpage improves the
functionality of that webpage slightly as the user will not have to look
elsewhere. This makes the entire site user friendly.
Scripting languages help in gathering information about the
visitors of the website and the information is then used to improve the
website. This is known as Web analytics which is done using JavaScript and also a server in order to collect the information and analyse the information.This
work by using cookies to track the user’s usage of the site, this information
when derived can then be used in improving the website and make the user experience
better and entire functionality of the website.
JavaScript can be used in creating rollover buttons which
can make a single button have various states. Having rollover buttons on a
webpage helps in improving the user experience as it makes them aware of where
their cursor is, if its hovering over the button or not.
Validation
Validation is key when it comes to websites especially form
validation for various reasons like the information not being correct. Scripting
languages can be used in validation. The datatype of the information entered by
the user can be detected using JavaScript and if the datatype is not allowed in
the text box then there could be an alert. This ensures the data integrity
which improves the validation. An example of this would be, client side
scripting not enabling the user to type in and submit alphabet in the text box
of phone number.
Using client side scripting for validation of websites is
beneficial as the validation is carried out on the user’s device/browser makes
the process rapid, due to the fact that the request doesn’t have to be made to
the server to carry out validation on the form.
Comparing the Advantages of Server side and Client side scripting
Server Side Scripting
|
Client Side Scripting
|
Using server side scripting could be seen as beneficial due to the
fact that unlike Client side scripting Server side reduces load on the user’s
device, as we know the language is stored on the server and request is made
to the server then information is passed to the user which means all the load
and work is on the server side. Using Client side scripting on the other hand
means that the script is copied to the user’s device and ever request is
fulfilled on/by the device which means load on the device and if the device
is slow/old then it will reduce the speed and user experience. However, based
on the internet speed of the user using server side could also be slow.
Server side takes care of various processes like payment, menus and database queries. |
Using client side scripting means that a lot of things can be done in
a short period of time. This is because it executes on the device and doesn’t
need to request to the server and wait for a response. This is beneficial as
the user will have a better experience due to the fact that they do not have
to wait to perform certain actions. Unlike server side which simply requires
request to the server in order for performed actions to be fulfilled.
|
Server side scripting does not depend on browsers or special plug-ins
to function. This means that whatever browser is being used by the user, the
website will functionality and user experience will be at its best as the
website will be efficient. This when compared to Client side scripting in
this context is beneficial as client side highly depends on plugins and
browsers which mean that the usability might be decreased if the users web
browser does not support scripts.
|
Client side scripting may improve the usability of the website for
users, this is only if the user’s website supports script. Using Client side
scripting could improve the users experience as it allows for more interactivity.
Using server side could also allow interactivity however, it is less
immediate which reduces the user experience as it will take a longer time to interact
with the website due to the server trips.
|
References
Wikipedia. (2016). Client-side
scripting. [online] Available at:
https://en.wikipedia.org/wiki/Client-side_scripting [Accessed 15 Jun. 2016].
Wikipedia. (2016). Server-side
scripting. [online] Available at:
https://en.wikipedia.org/wiki/Server-side_scripting [Accessed 15 Jun. 2016].
Sqa.org.uk. (2016). Differences
between Client-side and Server-side Scripting. [online] Available at:
http://www.sqa.org.uk/e-learning/ClientSide01CD/page_18.htm [Accessed 15 Jun.
2016].