Monday, 22 May 2017

P3 (Explain the fundamentals of a scripting language)

P3

In this assignment, I will be discussing the fundamentals of a scripting language. A scripting language is a form of programming language which requires an additional program to execute. A web browser is the program required for the compiling of the scripting language as opposed to a processor which usually compiles other programming languages. These scripting languages are used to make different sorts of websites, from very complicated ones to very lightweight and small websites. I will be discussing today Javascript and jQuery.

Javascript
Javascript is one of the worlds most known scripting languages. It is a programming language which allows for websites to be more interactive. Javascript is an open sourced language which means that it does not require anyone to buy licences etc. Javascript can work alongside HTML which gives the web developers of the website to have a wide range of interactions implemented within the website. Due to Javascript being so vastly popular, it is essential for all of the web browsers to support Javascript as it allows for the websites to be fully functional and due to almost every website having some sort of Javascript element to it, it makes it essential for the web browsers to have support for most websites. A few examples of the websites that use Javascript are YouTube for watching videos, Amazon and E bay as eCommerce and as well as Netflix and Amazon Prime Video include Javascript in their website in order to increase the user interaction on their website and if implemented correctly, it attracts more users as well. An example of Javascript could be a website including animations which move once the user rolls over their mouse on top of them, this gives the user more feedback and allows for a good user experience. Client side JavaScripts is one of the ways to validate the user's input on the webpage. This often works in forms and text-fields where the user is required to input data in. Validation prevents from spam to go through the validation which will take up space on the web servers. Validation is one of the ways JavaScript is used in conjunction with JQuery allowing for the website to prevent from robots other spam sources to input data into the system.
The above screenshot is an example of JavaScript. In the above scenario, the basic JavaScript coding allows for the webpage to create a pop up asking for the user's name and when they enter their name, the user then is presented with a webpage saying "Your name is " and then followed by their name.


More examples of what javascript is for and you don't mention validation.

jQuery
JQuery is an open sourced library which is built using Javascript. This means that JQuery is a library of pre-coded actions that a web developer can implement on their websites. Furthermore, JQuery being a library means that the developer does not need to define every single aspect of their intended functionality that they would implement in their websites which makes it very time efficient. It works alongside HTML and is used to give webpages additional functionality, usually for the users of the webpage. It is used to allow users to do various functions like modify text, move different page elements and even adding different types of animations to the webpage. JQuery simplifies the basic actions and functionality that a general website requires and gathers it in a library of pre-defined code. This makes JQuery very useful for a web developer because for example if they want to implement something very basic into their web page such as creating a pop up after an action, they can do they with JQuery using not more than 2-3 lines of code, compared to JavaScript which would require a whole page of coding just to add the same basic functionality to the website, which is very convenient and works as well as it does on other programming languages, if not, better.


`
The above screenshot is an example of code behind a JQuery. In this scenario, the code shows us that when the user performs a click action on the text, the text will disappear. This example of JQery sis not take more than 3 lines, and compared to a JavaScript code to achieve the same goal, the developer would require writing way more code than the above picture.


It's a library, and more examples of what it can do.

References
https://en.wikipedia.org/wiki/JavaScript
https://en.wikipedia.org/wiki/JQuery



M2 - How a scripting language can improve the functionality of a website.

Introduction
In this assignment, I will be discussing how a scripting language can improve the functionality of a website. I will compare the benefits of using client side scripting to the benefits of a server side scripting. I will then be discussing how client side scripting can improve the user experience, this is one of the important aspects of a website that a web developer must keep in mind as a good UX can have an impact on gaining a wider audience. Lastly, I will be describing how a website can use client side scripting in order to implement data validation on a website.

Comparison

Client side scripting
The scripts that run on the end user's browser are known as the client side scripting. The processing of the script takes place on the user's computer system as opposed to a server. The script code is sent to the user's browser via the internet connection and then the client side scripting runs on the user's browser. Often, browsers give the user control over the client side scripting by allowing the user to choose whether they want it enabled or disabled, this is due to the scripting being one of the ways hacker try to take control over the user's system, therefore making it a high security risk.

Advantages of client side scripting

  • One of the advantages of using client side scripting is the speed of the scripting. This is because the script executes on the client's computer system as opposed to a server which requires a continuous connection. This is beneficial for the user because it is a much better performing experience for the user as they do not have to wait for the server to react to their actions on the webpage which is the way the server side scripting operates, and have a negative impact on the performance of the webpage.
  •  The usability of the website can have an improvement when it uses a client side scripting. Client side scripts can help add more interactivity to a website which not just improves the user experience but also improves the user engagement with the website. However, using server side scripting is not as quick to load as server side scripting because it requires the browser to download the scripts before they are run. 

Server side scripting
A server side scripting is totally opposite from client side scripting as it runs the scripts on a web server. This occurs when the user requests for a webpage, the script runs on the webpage as it is delivered to the user therefore allowing the webpage to be dynamic and more interactive. The server side scripting is often used to create webpages more interactive for the user which require to be directed to a database that interfaces the website's interactivity.

Advantages of server side scripting

  • One of the main advantages to a server side scripting is that it does not require the client system as much as a client side scripting, this means that that it reduces the amount of load the client's system goes through in order to run a script, instead the server handles all of the load for running a script, therefor having a better overall system performance on the user's side. This has a positive impact on the user experience as the server side scripting does not rely on the client's system at all and if the system was old, running a client side scripting with slow down the system even further.
  • Functionality and support is another advantage for server side scripting. The user is not required to download additional plug ins in order for the script to be loaded and ran. The browser does not require having support for a certain type of player in order to run the scripting which makes it much beneficial for the user as they do not require downloading plug ins onto their system and slow their systems down. Compared to client side scripting, which is highly dependent on browser support and plugins, this is an issue that never occurs with server side scripting.

User Experience

With most webpages in recent years having seen an improvement in their functionality and interactivity, this is achieved by using scripting languages within a webpage such as JavaScript. These are used to enhance the user interface which results in an improvement in the user experience, and the better the user experience, the more users the webpage will attract. One of the ways to improve the user experience is by device compatibility. This can be done by using JavaScript to determine what device the webpage is being accessed on and adjust it accordingly. For example, if a user tries to open YouTube on their phones, it will be a much different experience compared to the experience on a computer, this is due to the scripting optimizing the webpage for a mobile phone and making the features on YouTube much more accessible for users on a mobile device.

Validation 

Data validation on a website is also achieved by client side scripting. JavaScript can be used to validate various kinds of data types which are input by the user in different text fields. Having data validation on a website improves upon the data integrity of all of the data collected and stored, this is because before any data is stored, it is validated via the client side scripting. This allows for tiny typos such as an accidental keyboard input into a number field will trigger the validation and will give the user an error. Client side scripting will allow for the validation to be much faster than a server side script this is because the validation will be carried out in the client's computer and once the data is validated, it will then upload the data to the databases. 
Server side scripting is done via PHP which stands for Personal Homepage is a scripting language that allows for the website to create login areas with different usernames and password. The script validates the data entered by the user when logging in and then looks for the data in the database and if found, the user will get access to their account, if not the user will be denied access. This is how validation works with scripting languages on a website.

In conclusion, the different scripting languages have a different impact on how the webpage responds to the user's actions and each have their advantages and disadvantages. Choosing the type of scripting language is to be done by the web developer who will choose the one that meets their requirements. These can be used for enhancing the user experience and as well as data validation which should improve data integrity for that webpage.

Bibliography


No comments:

Post a Comment