html5 for .net development & it’s advantages

2

Click here to load reader

Upload: kristinakathy-green

Post on 15-Mar-2016

216 views

Category:

Documents


1 download

DESCRIPTION

Fifth revision of the HTML standard proposed by Opera software, HTML5 is a markup language which will support the latest multimedia keeping the language easily readable for the users and also understandable by computers and devices.

TRANSCRIPT

Page 1: HTML5 for .NET development & it’s advantages

HTML5 for .NET development & it’s advantages

Fifth revision of the HTML standard proposed by Opera software, HTML5 is a markup language which will support the latest multimedia keeping the language easily readable for the users and also understandable by computers and devices.

HTML5 comes with many features for harnessing the power of client side. This is very useful today for the web developers because more and more web applications are developed in a way that they harness the power from client side browsers. Dotnet developer now must be well versed with the features of HTML5. This is because, all the major browsers used today are supporting these features and the web applications which will come up in the future are bound to rely on them.

The HTML5 revision of the HTML standard is a combination of new HTML, Javascript and CSS features which are being standardized. Some new tags in HTML5 include <nav>, used for general website navigation; <video>, used for displaying video content; and <audio>, ised for integrating audio inside web page. Apart from this:

• Elements like <datalist>, <keygen>, and <output> will now be available for forms.• <section>, <header> and <footer> tags will now help design the page in a structured

manner.

New input controls are added to HTML5 which are designed to handle very common input scenarios. Along with this many attributes are added to the existing controls. Following mentioned are some of the important features which are added in HTML5 that are useful to programmers.

Local Storage

. NET developers often used cookies on the client side to store a small amount of data. However there is a limitation of the amount of data that can be saved in these cookies. A single cookie can store up to 4,096 bytes. HTML5 comes with local storage which allows developers to store data of up to 5 MB.

This local storage comes in 2 parts:

• Local Storage: Persisted across browser sessions on client side.• Session Storage: It persists only for the current session.

Javascript Selectors

For the JavaScript users getElementById() and getElementByTagName() methods are not new. With HTML5 JavaScript now has two more selector methods: querySelector() and querySelectorAll().

Page 2: HTML5 for .NET development & it’s advantages

• querySelector(): This returns the first element from the matched result set.• querySelectorAll(): All the matching elements are returned from the result set.

Web Sockets

Till now socket programming was involved in the development of desktop chat applications. Now the web socket is the socket programming for web applications. AJAX communication is used to ping back server currently which involves polling the server periodically. Unlike this web sockets provide two way communication channel where the server can communicate with the client browser.

Web Workers

Multithreading can be used in browser based applications by web workers which allow loading and executing a JavaScript file in a separate thread. This is done without affecting the responsiveness of the user interface. However all the browsers are still not supporting web workers.

Application Caching

Web applications unlike normal applications require continuous live connection with the server. This can be problematic at times when the server is offline or is down temporarily. The application caching feature helps to solve this in 2 ways:

Client side SQL database: In this approach the local SQL database is used to store a local copy of data and user can work on this.

Offline application caching APIs: This uses a Cache Manifest file which stores a list of files which are to be cached locally.

Drawing

HTML standard has grown tremendously and graphical user interface which is provided to the end user is one of its main reasons. However till date developers have faced limitation of drawing graphics in the browser. Because of this flash or Silverlight based plugins are used to generate graphics. This integration makes the site heavy from loading point of view.

HTML5 comes to rescue by coming up with Canvas which offers client side graphic rendering. JavaScript code and certain new graphic objects are used for actual drawing. ASP.NET developer in India has been using Canvas for creating a beautiful GUI on client side.