Friday, 16 May 2014

Improving Functionality

Client-Sided and Server-Sided

In this post I will explain the advantages and disadvantages of using client-sided and server-sided scripting. I will also be compare the two different methods of scripting and discuss validation, the functionality of validation and how it is used. I will explain what the user experience is when visiting a webpage and how client-side scripting helps improve this.  

Client-Side Scripting

Client-Sided Scripting is computer programs that are executed on the client's computer system, rather than the server. Client-Side scripting can be embedded in HTML or be kept in a separate file that is downloaded onto the client's computer.


JavaScript is a scripting language which is used for client side scripting. Client side scripting is used mostly for design work such as creating graphics and adding effects. Examples of client-side scripting on webpages are drop-down menus and validation. By using HTML, along with CSS and JavaScript, they have many features such as buttons and drop down lists which can be created. 

Server Side Scripting

Server side scripting is a type of scripting language which is executed by the servers which host the Webpages a user may be viewing. Server side scripting waits for the user’s response and once the user has responded, the data goes to the server database and waits for the server’s response. Server side script can: 
  • Dynamically edit, change or add any content to a Web page
  • Respond to user queries or data submitted from HTML forms
  • Access any data or databases and return the result to a browser
  • Customize a Web page to make it more useful for individual users
  • Provide security since your server code cannot be viewed from a browser
The server checks through a database and once the server responds, the client will download all the information and will display the webpage on the client’s browser

Server side script is used for sending the request through a secure server, such as bank payments and financial information. Server side handles processes and tasks that client-side script is unable to do.

Comparison of Client-Sided and Server-Sided Scripting

The differences of client-sided and server-sided scripting are that server-side script needs more security to protect it, this is because a server is used to hold more important information such as account information and payment details. 

Server side script mainly uses Java which is more open to being a security risk to user’s computer systems as it allows programmers to create malicious code. Using Javascript doesn't allow programmers to create malicious code which is able to infect and wipe user's computers.

A disadvantage of client side script may not be able to be viewed on all versions of certain browsers, this may be a problem for users trying to view a webpage with an outdated browser.

Both scripting methods are good to have on web pages as each one has a feature that is an advantage that the method does not have. Client side is fast for responding to requests and it has many features for the design layout of the Webpage. 

The other method which is server side scripting is used for sending the request through a secure server, such as bank payments and financial information. Server side script looks through a database to match a request. The disadvantage of this server side script is that its slower for the requests and 
responses.

Validation

Validation is checking a field against a database to see whether it is correct or not, or to see if a certain check box is filled in or not. Forms are used a lot on Webpages such as when a user is creating new a account on a webpage or purchasing products and need to fill in details such as quantity, address etc. JavaScript is often used to validate these forms because it is suited for handling data such as personal details. An example of validation is asking a user for his email address and password when logging into their account on a certain website.

Validation is usually done via client-sided scripting apart from form validation which is done via Java on the server-side. Using this method of validation on the users system makes feedback instant.

Validation can also be done faster when checking for errors because it will be using the web browser and not a server. When a user enters something wrong into a text field such as entering their account details, for example if the email address doesn't exist, client-sided scripting will validate the text field with information from the web browser. If it doesn't match, it will show an error.

This is much more efficient than using server-sided scripting for validation, because using the same example above, the user enters the wrong data, and the data would need to be sent to the web server, checked, and then sent back to the user’s computer system. This takes time and uses processing power on the web server.

User Experience

The user experience is how the user views and uses the webpage they are viewing. Ease of access and clear simple layout all add up to the overall user experience.  The user experience is usually achieved by client-side scripting.

Examples of these features are drop-down menus, validation rules, system performance, and marketing. A good example of a webpage with good user experience is Amazon. 

On their webpage they have a number of drop-down menus with sub topics making it easy to find a certain product or service. Using this makes it a much clearer webpage to navigate. Amazon gives the user interactivity as they affect things on the website, such as making a drop-down menu appear, instead of just clicking a hyperlink. They also have a lot of promotions and advertisements for their products on the main homepage.

Client-sided scripting can help improve the user experience in many different ways such as, faster loading times, being able to remember a user's details when logging in, able to have better graphical images and more interactivity in the form of buttons, and rollovers.


The user experience all depends on whether the user load the webpage without long loading times, can easily navigate the website using various methods, search bar, drop down menus, the users previous experience on the webpage. Users want interactivity and instant feedback like roll over buttons and hyperlinks on pictures.

References

Server side scripting  - 06/06/2014 - http://bit.ly/1m2SGPt

Web server scripting disadvantages - 06/06/2014 - http://bit.ly/1mHkiYW

Advantages and disadvantages of client side scripting - 06/06/2014 - http://bit.ly/1obznG7

Client side scripting - 06/06/2014 - http://bit.ly/SF1d0J

Advantages and disadvantages of client side scripts - 06/06/2014 - http://bit.ly/1nt4sCC


Javascript & jQuery Fundamentals

Javascript & jQuery Fundamentals
In this post I will be explaining and giving examples of javascript and jQuery and what they're functions and purposes are. I will also be explaining the benefits and disadvantages of using Javascript and jQuery.

Javascript

Javascript is a dynamic programming computer programming language which allows client-sided interaction with users computers.Javascript is able to control a browser, communicate asynchronously, and alter the document content that is displayed on a web browser.

Javascript isn't related to the application Java even though it has a similar name. Javascript allows web developers alter the behavior and appearance of bits of web pages displayed on a webpage.

Benefits

  • Javascript is executed on the client side

  • This means that the code is executed on the user's computer instead of the web server therefore saving bandwidth and strain on the web server.

  • Javascript is an easy language to learn

  • The Javascript language is relatively easy to learn and includes a syntax that is close to English. It uses a model that provides plenty of prewritten functionality/features to the various objects on pages, making it easy to develop a script to solve a purpose/problem.

  • Javascript is relatively fast to the end user

  • As the code is executed on the user's computer, results and processing is completed almost instantly depending on the task as it does not need to be processed in the site's web server and sent back to the user.

  • Extended functionality to websites


  • Third party add-ons enable Javascript developers to write small parts of Javascript which can execute on desired web pages to extend its functionality. If you use a website and require a certain feature to be included, you can write it yourself and use an add-on to implement it on the web page.

    JQuery

    JQuery is a tool that is used as JavaScript library which allows shorter lines of JavaScript code to be opened. JQuery just goes into the JavaScript library and a short line of code represents jQuery unlike JavaScript where there are many lines of code that mean the same thing. As jQuery is shorter than javascript code time can be saved by not repeating the code. It was mainly designed to make JavaScript easier to code.

    Overall there is less code that has to be written when jQuery is being used within the website and another benefit is that there will be fewer errors because there is less repetition.
     
    Benefits
    • Ease of use
    This is pretty much the main advantage of using JQuery, it is a lot more easy to use compared to standard javascript and other javascript libraries. Apart from simple syntax, it also requires much less lines of code to achieve the same feature in comparison.
    • Large library
    JQuery allows you to perform hordes of functions in comparison to other Javascript libraries.

  • Wide range of  tutorials


  • The JQuery website has a comprehensive documentation and tutorials to get even an absolute beginner in programming to get the ball rolling with this library.

    References
    Advantages and disadvantages of client side scripts - 08/05/2014 - http://bit.ly/1nt4sCC

    Web server scripting disadvantages - 08/05/2014 - http://bit.ly/1mHkiYW

    Advantages and disadvantages of client side scripting - 08/05/2014 - http://bit.ly/1obznG7

    Client side scripting - 16/05/2014 - http://bit.ly/SF1d0J

    Server side scripting - 16/05/2014 - http://bit.ly/1m2SGPt