Friday, 17 June 2016

Unit 20 – M2: Discuss how a scripting language can improve functionality

Unit 20 – M2: Discuss how a scripting language can improve functionality

Introduction
Scripting languages are normally associated with HTML content and they are normally used by developers to improve the way a website functions. Scripting languages such as CSS, JavaScript and JQuery are normally integrated during the development of a site in order to optimise the overall functionality of the website this in turn, can have a positive effect on the accessibility and readability of the site. For this reason, this blog is going to be set within the parameters of discussing how a scripting language can improve the functionality of a website.

User Experience
Scripting languages can be used to improve the functionality of a site through its user experience. Developers can improve their sites user experience by using scripting languages such as, JavaScript. Users only interact with the front-end of a site and JavaScript can be used to enhance this interface. A particular way that scripting can improve user experience is through adaptation of context. When users load up webpages on a device JavaScript can be used so the context on the webpage can be adapted to the platform that the user is accessing the website on so the user can get optimum viewing. (W3Schools, 2016) For example, if a user was to access Wikipedia content on a desktop and a mobile phone the context would not be outputted on the screens the same way on both devices due to the difference in screen sizes. So JavaScript is then called in place to make the content adapt to the different screen sizes so the user can read the content on the webpage properly.

User experience on the web can also be improved through scripting languages due to its interactive nature. This improves user experience because it allows them to gain more control over the actions that the webpage makes. JavaScript supports alerts on sites, confirming of choices and prompting of users. For example, if a user clicked on a link on a webpage JavaScript can be used to make an alert box come up that states that the link will open in another window. This alert is improving user experience because the site is responding based on the actions of the user.

Scripting languages improve functionality of websites when they are used for the addition of gadgets such as a clock or a calculator. This is improving functionality because users are able to make calculations on webpages and real-time is available to them. Furthermore, these client-side calculations that scripting brings helps make sites user friendly and improves the usability of the overall site.

Scripting can also improve the functionality of a site through analytics. Web analytics can be defined as the collection and reporting on web data for assessing and improving the effectiveness of a site. (Wikipedia, 2015) This analytic can be carried out using JavaScript. JavaScript based analytics operates by tracking each visitor’s behaviour on the site using cookies and developers can infer information such as the duration of time spent on the site, the order users visited the webpages on a site and the internal links that were clicked by the user. (Google, 2016) Developers can then improve user experience on a site based on this information.

Validation
Client side scripting can be used to improve form validation. JavaScript can be used to check the datatype that is entered by the user into an input box and based on the data a response can occur. This improves form validation because it helps improve the integrity of data that is entered into forms by users. For example, if a user accidentally enters a letter while typing in their phone number the client-side scripting would not allow the form to be process but instead alert thje user of the problem at hand so he/she can correct the mistake.

The fact that client-side scripting is carried out on the browser end rather than the server end to improve validation because it means that validation process is faster as the server does ynot have to carry out the process. PHP is a scripting language that is normally used for server side scripting. This scripting language improves the functionality of sites by creating functional log in areas for users x of ba site. The scripting language helps to make sure that when users enter their credentials into the site their logon details work and the right information is requested and sent to the client. The PHP is also responsible for processing information that is needed to be saved on a database for the site.

Comparison of Advantages of server and client side scripting



Advantages of Server side scripting

Advantages of Client side scripting

The main advantage that comes with using server side scripting is that complex processes such as sending the plugins to browsers is carried out quicker without affecting the performance of the overall computer like it would if the process was carried out on the client side. This is an advantage that supports the effectiveness of client side scripting because it helps ensure that users are not affected when straining processes such as compiling of information are being carried out.

Client side scripting can be very beneficial to users in terms of user experience due to the fact that with client side scripting it allows users to have more interactivity as it responds instantaneously to user’s action. This will give users better overall experience on a site compared to if server side scripting is used because the actions would not be as immediate due to the latency involved in scripting getting compiled and getting sent to the client from the server.


Another advantage of server side scripting is that some browsers don’t support JavaScript so server side script comes in place in order to load dynamic webpages properly without any problem. An advantage of client side scripting that can be compared to this is that usability of webpages improve when scripting is carried out on client side. Server side scripting can be classed as backup for dynamic webpages being outputted properly due to the fact that if a user didn’t have a browser that supported script server side can come into play.

Client side scripting can also help developers save time when developing their site because client side scripting are easily reusable and obtainable as there is site that can be used as a library for client side scripting. This is more beneficial over server side scripting because developers don't have to code themselves they just need knowledge on how to implement it.







Server side scripting also brings advantage to the website developer due to the fact that when server site scripting is implemented the developer can make single website template and use it for the whole site so this means that when a new dynamic page is created it will automatically use it. This is beneficial because it saves time for the web developer. Compared to client side scripting where the developer has to a create a new HTML template for every dynamic page.


Client side scripting gives developers the chance to have more control over how their website behaves in terms of widgets that are made available on the site. This also includes add-on that is meant to be on the site.
 


Bibliography


Google, 2016. Google analysticsq. [Online] Available at: https://developers.google.com/analytics/devguides/collection/analyticsjs/#what_data_does_the_tracking_snippet_capture [Accessed 6 06 2016].

W3Schools, 2016. W3Schools.com. [Online] Available at: http://www.w3schools.com/js/default.asp [Accessed 06 06 2016].

Wikipedia, 2015. Wiki. [Online] Available at: https://en.wikipedia.org/wiki/Web_analytics [Accessed 06 06 2016].
 



If you need any help with any other units just ask - femzym@gmail.com







1 comment: