Saturday, 10 May 2014

Improving functionality

Introduction

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





Monday, 5 May 2014

Javascript & jQuery Fundamentals

In this section of my blog, I will be describing two key tools of web development.I will describe the purpose and function of Javascript and state its key features. Further in this section I will describe the purpose and function of jQuery.

Properly constructed web pages are built using up to three different languages one of which is often Javascript. The main purpose of Javascript is to command the browser on what to do e.g. display content in specific order. Javascript is a dynamic programming language. It's called dynamic because it adds features to web pages, which move or involve some sort of interaction or animation. The purpose of using dynamic language to built up a website is to make it respond to user's input and actions. It resembles the real analogue world, us the people live in.

For example, when you attempt to push or pull something it responds in a way known to us as movement, it works the same way in web sites. For example, when you hover over a button on a webpage the title of the button becomes highlighted, underlined or a drop down menu comes off it, which purpose is to give the user a response and let them know that something is happening, otherwise the user could think that they are not doing something correctly or the webpage is not working. 

Some of the key features of Javascript include:

  • The ability to detect user's browser, OS, screen size - this feature allows the webpage you're trying to load up appear in the most appropriate and functional way depending on different systems and platforms. 
  • Gives the user more control over the browser - Depending on how a website is written and scripted in Javascript the user could be able to change the background colour of the page and text to their preferences.
  • Validating user's input - This feature makes a webpage check for validation on the way (as the user is performing various actions). Validation check could be used on functions where the user needs to enter specific input e.g. numbers, letters and formats. This feature saves the user time by responding with an instant message of error, whereas if the input information has to be validated on the server, the user would have to wait for the server's response.
  • Javascript is executed on the client side - This is a feature that distinguishes Javascript from other scripting languages. Instead of a web page having to load up its content from the server it's running/kept on the code is being executed on the user's processor, which again saves time.

jQuery is like add-on to Javascript. jQuery was not developed alongside Javascript for the first time, but it was developed later on after programmers realising it's very time consuming to write the code for a webpage every time, even when the code repeats. Thus jQuery was created, which is an extensive library of Javascript functions/code and allows for the easier and quicker creation of webpages. 

Most of the pre-existing functions/code are free and available in jQuery, which is why it's a web development tool no programmer attempts to write a website without. jQuery is very easy to implement and it could add great functions and features to any webpage.

References:

JAVASCRIPT: ADVANTAGES AND DISADVANTAGES, 05/05/2014, http://bit.ly/1rWUGsu

THE PURPOSE OF JAVASCRIPT, 05/05/2014, http://bit.ly/1mwuF6f

jQUERY INTRODUCTION, 05/05/2014, http://bit.ly/1narfCX

jQUERY FUNDAMENTALS, 05/05/2014, http://bit.ly/1g3FRPp