পৃষ্ঠাসমূহ

.

Search Your Article

Total Pageviews

Saturday, March 18, 2017

Commercial & Free Themes

A theme is a personalized design of a website often including its layout. Changing your theme, changes the view of how your website looks on the front-end. Usually CMS platforms have both free and commercial versions. These themes are categorized as per their functions like

Choosing a Web Hosting Company & a Plan

When choosing a Web hosting company one of the main key indicators is to see their client’s satisfactory reviews and the price which is also important. As technologies and hosting industry changes too often and fast for an expert, we should be aware to check with following criteria’s.

Website Development - Cpanel

Control panel is the administration web interface of your webhosting account. It is an interface that you access to administer all the aspects of your account. You can typically control all portions of your site within the control panel without using any additional software like FTP software to upload files, though many people find it faster and easier to do so.

Website Development - Setup

After understanding most of the important factors of Website Development, it is now time to set up a webpage. For setting up a webpage, we should adhere to all the steps given below.
Step 1 − Firstly, we purchased a domain name at GODADDY.

Public Authority Certificates

Digital Certificates are a standard of security for establishing an encrypted link between a server and a client. This is generally between a mail server or a webserver that protects data in transitions by encrypting them. A Digital Certificate is also a Digital ID or a passport which is issued by a Third-party authority, which verifies the identity of the server’s owner.

Purchasing a Public Certificate

To purchase a SSL certificate, you should go to the SSL Certificate Provider (certificate authority). Each SSL Certificate Provider has different products, prices and levels of customer satisfaction, which is nearly the same logic like purchasing web hosting. To check the best offers and products you can try SSLShopper by clicking on the following link.

E-Commerce Platforms

In this chapter, we will deal with e-commerce. Which are the most popular and secure ecommerce platforms? What is needed to secure them?
E-commerce is selling and buying goods and services from the internet and paying through this medium. This transaction happens between clients to business, B2B, client to client.

E-Commerce Payment Gateway

Payment Gateway is an online payment processing technology which helps businesses to accept credit cards and electronic checks. In other words, payment gateways are “Manin-the-middle” which are located between e-commerce platforms and clients.

Small Business Website

To create a small business website is not a complicated task. The main fear is to figure out the content of the website, which is one of the main reasons business owners are put off. Small Business websites are best when they are simple with minimal text and just a single option on each page – for example, a Submission Form, or a Contact Us button.

Back Up Your Website

Creating a backup of your website is important because it provides insurance against all types of setbacks, such as security compromises, inadvertently deleting your site files and database corruptions.
It is suggested backing up your site before you make changes each time and every time. If something goes wrong, you have a fresh copy that you know is working.

Website Development - Webpage Migration

Webpage Migration is a process of moving a webpage from one host to another. This process is done for various reasons, some of which are −
  • You are not satisfied anymore with the support of the Hosting Company
  • Prices are cheaper to another hosting
  • Your actual hosting plan doesn’t fulfill your needs anymore
  • Technology offered is not competitive anymore, etc.

Testing Your Website

In this chapter, we will learn how to do some small troubleshooting of a website.
Scenario − The scenario is simple – When trying to open a website there is an error which is popping up – Page cannot be displayed.

Website Development - Security

Securing your webpages is as important as developing it, because any threat which can compromise the security can harm your business reputation, damage you financially (by stealing your online deposits), damage your clients that visit your website, etc.

Speed Up Your Website

Speeding up a webpage or a website is as important as finding the right hosting provider or domain name. Why?
Just read the following statistics and you will change your mind.
One second in page load time yields −

Advertise Your Webpage

Once you have created your website and it is functional, then comes a very important step of marketing it. This is done to increase site visitors and to spread the word, something that can help exist on internet. The following illustration is a schematic view of all the steps that need to be done when advertising a website.

Website Development - Adwords

This is an advertising program from Google, where you can register and can pay them based on the number of clicks on your website link or based on the number of page impressions. Webpages from Google and from partner websites are designed to allow Google to select and display the advertising.

Website Development - SEO

Search Engine Optimization is the process where you can make your website better in terms of ranking in search engines. The majority of web traffic is driven by major commercial search engines, Google, Bing and Yahoo!. Although social media and other types of traffic can generate visits to your website, search engines are the primary method of navigation for most of the Internet users.

Website Development - Quick Guide

Website Development - Introduction

A website can be defined as a collection of several webpages that are all related to each other and can be accessed by visiting a homepage, by using a browser like Internet Explorer, Mozilla, Google Chrome, or Opera. For example, the website address of Tutorialspoint is − www.tutorialspoint.com.

Friday, March 17, 2017

Website Development - Useful Resources

The following resources contain additional information on Website Development. Please use them to get more in-depth knowledge on this.

Discuss Website Development

A website can be defined as a collection of several webpages that are all related to each other and can be accessed by visiting a homepage, using a browser like Internet Explorer, Mozilla, Google Chrome or Opera. In this tutorial,

What are Web Services?

Different books and different organizations provide different definitions to Web Services. Some of them are listed here.
  • A web service is any piece of software that makes itself available over the internet and uses a standardized XML messaging system. XML is used to encode all communications to a web service. For example, a client invokes a web service by sending an XML message, then waits for a corresponding XML response.

Why Web Services?

Here are the benefits of using Web Services:

Exposing the Existing Function on the network

A web service is a unit of managed code that can be remotely invoked using HTTP, that is, it can be activated using HTTP requests. Web services allows you to expose the functionality of your existing code over the network. Once it is exposed on the network, other application can use the functionality of your program.

Web Services - Characteristics

Web services have the following special behavioral characteristics:

XML-Based

Web Services uses XML at data representation and data transportation layers. Using XML eliminates any networking, operating system, or platform binding. Web Services based applications are highly interoperable application at their core level.

Web Services - Architecture

There are two ways to view the web service architecture:
  • The first is to examine the individual roles of each web service actor.
  • The second is to examine the emerging web service protocol stack.

Web Services - Components

Over the past few years, three primary technologies have emerged as worldwide standards that make up the core of today's web services technology. These technologies are discussed below.

Web Services - Examples

Based on the web service architecture, we create the following two components as a part of web services implementation:

Service Provider or Publisher

This is the provider of the web service. The service provider implements the service and makes it available on the Internet or intranet.
We will write and publish a simple web service using .NET SDK.

Web Services - Security

Security is critical to web services. However, neither XML-RPC nor SOAP specifications make any explicit security or authentication requirements.
There are three specific security issues with web services:

Web Services - Standards

This chapter gives you an idea of all the latest standards related to web services.

Transports

BEEP, the Blocks Extensible Exchange Protocol (formerly referred to as BXXP), is a framework for building application protocols. It has been standardized by IETF and it does for Internet protocols what XML has done for data.

Web Services - Summary

In this tutorial, you have learnt how to use web services. However, a web service also include components such as WSDL, UDDI, and SOAP that contribute to make it active. The next step is to learn WSDL, UDDI, and SOAP.

Web Services Questions and Answers

Web Services Questions and Answers has been designed with a special intention of helping students and professionals preparing for various Certification Exams and Job Interviews. This section provides a useful collection of sample Interview Questions and Multiple Choice Questions (MCQs) and their answers with appropriate explanations.

Web Services Questions and Answers

Web Services Questions and Answers has been designed with a special intention of helping students and professionals preparing for various Certification Exams and Job Interviews. This section provides a useful collection of sample Interview Questions and Multiple Choice Questions (MCQs) and their answers with appropriate explanations.

Web Services Questions and Answers

Web Services Questions and Answers has been designed with a special intention of helping students and professionals preparing for various Certification Exams and Job Interviews. This section provides a useful collection of sample Interview Questions and Multiple Choice Questions (MCQs) and their answers with appropriate explanations.

Web Services - Quick Guide

What are Web Services?

Different books and different organizations provide different definitions to Web Services. Some of them are listed here.

Web Services - Useful Resources

The following resources contain additional information on Web Services. Please use them to get more in-depth knowledge on this.

Discuss Web Services

Web services are open standard (XML, SOAP, HTTP etc.) based Web applications that interact with other web applications for the purpose of exchanging data.
Web Services can convert your existing applications into Web-applications.
In this tutorial you will learn what exactly Web Services are and Why and How to use them.

WebRTC - Voice Demo

In this chapter, we are going to build a client application that allows two users on separate devices to communicate using WebRTC audio streams. Our application will have two pages. One for login and the other for making an audio call to another user.

WebRTC - Video Demo

In this chapter, we are going to build a client application that allows two users on separate devices to communicate using WebRTC. Our application will have two pages. One for login and the other for calling another user.

Web Icons - Quick Guide

Web Icons - Introduction

An icon is a symbol that is used to represent a specific action or a capability on a webpage. Icons are used in documents as well as applications and they can be either selec

WebRTC - Overview

The Web is no more a stranger to real-time communication as WebRTC (Web Real-Time Communication) comes into play. Although it was released in May 2011, it is still developing and its standards are changing.

WebRTC - Architecture

The overall WebRTC architecture has a great level of complexity.

WebRTC - Environment

Before we start building our WebRTC applications, we should set our coding environment. First of all, you should have a text editor or IDE where you can edit HTML and Javascript. There are chances that you have already chosen the preferred one as you are reading this tutorial. As for me, I'm using WebStorm IDE. You can download its trial version at https://www.jetbrains.com/webstorm/. I'm also using Linux Mint as my OS of choice.

WebRTC - MediaStream APIs

The MediaStream API was designed to easy access the media streams from local cameras and microphones. The getUserMedia() method is the primary way to access local input devices.
The API has a few key points −

WebRTC - RTCPeerConnection APIs

The RTCPeerConnection API is the core of the peer-to-peer connection between each of the browsers. To create the RTCPeerConnection objects simply write
var pc = RTCPeerConnection(config);

WebRTC - RTCDataChannel APIs

WebRTC is not only good at transferring audio and video streams, but any arbitrary data we might have. This is where the RTCDataChannel object comes into play.

WebRTC - Sending Messages

Now let's create a simple example. Firstly, run the signaling server we created in the “signaling server” tutorial via “node server”.
There will be three text inputs on the page, one for a login, one for a username, and one for the message we want to send to the other peer. Create an index.html file and add the following code −
<html lang = "en"> 
   <head> 

WebRTC - Signaling

Most WebRTC applications are not just being able to communicate through video and audio. They need many other features. In this chapter, we are going to build a basic signaling server.

WebRTC - Browser Support

The Web is moving so fast and it is always improving. New standards are created every day. Browsers allow updates to be installed without the user ever knowing, so you should keep up with what is going on in the world of the Web and WebRTC. Here is an overview of what this is up to today.

WebRTC - Mobile Support

In the mobile world, the WebRTC support is not on the same level as it is on desktops. Mobile devices have their own way, so WebRTC is also something different on the mobile platforms.

WebRTC - Text Demo

In this chapter, we are going to build a client application that allows two users on separate devices to send messages each other using WebRTC. Our application will have two pages. One for login and the other for sending messages to another user.

WebRTC - Security

In this chapter, we are going to add security features to the signaling server we created in the “WebRTC Signaling” chapter. There will be two enhancements −
  • User authentication using Redis database
  • Enabling secure socket connection

WebRTC - Quick Guide

WebRTC - Overview

The Web is no more a stranger to real-time communication as WebRTC (Web Real-Time Communication) comes into play. Although it was released in May 2011, it is still developing and its standards are changing.

WebRTC - Useful Resources

The following resources contain additional information on WebRTC. Please use them to get more in-depth knowledge on this topic.

Discuss WebRTC

With Web Real-Time Communication (WebRTC), modern web applications can easily stream audio and video content to millions of people. In this tutorial, we would explain how you can use WebRTC to set up peer-to-peer connections to other web browsers quickly and easily.

WebGL - Introduction

A few years back, Java applications − as a combination of applets and JOGL − were used to process 3D graphics on the Web by addressing the GPU (Graphical Processing Unit). As applets require a JVM to run, it became difficult to rely on Java applets. A few years later, people stopped using Java applets.

WebGL - Basic Graphics Concepts

Rendering

Rendering is the process of generating an image from a model using computer programs. In graphics, a virtual scene is described using information like geometry, viewpoint, texture, lighting, and shading, which is passed through a render program. The output of this render program will be a digital image.
There are two types of rendering −

Html5 Canvas Overview

To create graphical applications on the web, HTML-5 provides a rich set of features such as 2D Canvas, WebGL, SVG, 3D CSS transforms, and SMIL. To write WebGL applications, we use the existing canvas element of HTML-5. This chapter provides an overview of the HTML-5 2D canvas element.

WebGL - Basics

WebGL is mostly a low-level rasterization API rather than a 3D API. To draw an image using WebGL, you have to pass a vector representing the image. It then converts the given vector into pixel format using OpenGL SL and displays the image on the screen. Writing a WebGL application involves a set of steps which we would be explaining in this chapter.

WebGL - Shader Program

We normally use triangles to construct meshes. Since WebGL uses GPU accelerated computing, the information about these triangles should be transferred from CPU to GPU which takes a lot of communication overhead.

WebGL - Graphics Pipeline

To render 3D graphics, we have to follow a sequence of steps. These steps are known as graphics pipeline or rendering pipeline. The following diagram depicts WebGL graphics pipeline.

WebGL - Sample Application

We have discussed the basics of WebGL and the WebGL pipeline (a procedure followed to render Graphics applications). In this chapter, we are going to take a sample application to create a triangle using WebGL and observe the steps followed in the application.

WebGL - Context

To write a WebGL application, first step is to get the WebGL rendering context object. This object interacts with the WebGL drawing buffer and can call all the WebGL methods. The following operations are performed to obtain the WebGL context −

WebGL - Geometry

All primitives (or object models) should have well-defined geometric details. These details may include vertices, indices, color, textures etc. In WebGL, geometric details are stored in JavaScript arrays.
Graphic objects are created by shader programs which run on the GPU. Geometric details are passed to shader programs using buffer objects.

WebGL - Shaders

Shaders are the programs that run on GPU. Shaders are written in OpenGL ES Shader Language (known as ES SL). ES SL has variables of its own, data types, qualifiers, built-in inputs and outputs.

Data Types

The following table lists the basic data types provided by OpenGL ES SL.
S.No. Type Description
1 void Represents an empty value.
2 bool Accepts true or false.

Associating Attributes & Buffer Objects

Each attribute in the vertex shader program points to a vertex buffer object. After creating the vertex buffer objects, programmers have to associate them with the attributes of the vertex shader program. Each attribute points to only one vertex buffer object from which they extract the data values, and then these attributes are passed to the shader program.

WebGL - Drawing a Model

After associating the buffers with the shaders, the final step is to draw the required primitives. WebGL provides two methods namely, drawArrays() and drawElements() to draw models.

drawArrays()

drawArrays() is the method which is used to draw models using vertices. Here is its syntax −
void drawArrays(enum mode, int first, long count)
This method takes the following three parameters −

WebGL - Drawing Points

We discussed earlier (in Chapter 5) how to follow a step-by-step process to draw a primitive. We have explained the process in five steps. You need to repeat these steps every time you draw a new shape. This chapter explains how to draw points with 3D coordinates in WebGL. Before moving further, let us take a relook at the five steps.

WebGL - Drawing a Triangle

In the previous chapter (Chapter 11), we discussed how to draw three points using WebGL. In Chapter 5, we took sample application to demonstrate how to draw a triangle. In both the examples, we have drawn the primitives using only vertices.

WebGL - Modes of Drawing

In the previous chapter (Chapter 12), we discussed how to draw a triangle using WebGL. In addition to triangles, WebGL supports various other drawing modes. This chapter explains the drawing modes supported by WebGL.

WebGL - Drawing a Quad

In the previous chapter, we discussed the different drawing modes provided by WebGL. We can also use indices to draw primitives using one of these modes. To draw models in WebGL, we have to choose one of these primitives and draw the required mesh (i.e., a model formed using one or more primitives).
In this chapter, we will take an example to demonstrate how to draw a quadrilateral using WebGL.

WebGL - Colors

In all our previous examples, we applied color to the object by assigning a desired color value to the gl_FragColor variable. In addition to that, we can define colors for each vertex − just like vertex coordinates and indices. This chapter takes an example to demonstrate how to apply colors to a quadrilateral using WebGL.

WebGL - Translation

So far, we discussed how to draw various shapes and apply colors in them using WebGL. Here, in this chapter, we will take an example to show how to translate a triangle.

Translation

Translation is one of the affine transformations provided by WebGL. Using translation, we can move a triangle (any object) on the xyz plane.

WebGL - Scaling

In this chapter, we will take an example to demonstrate how to modify the scale of a triangle using WebGL.

Scaling

Scaling is nothing but increasing or decreasing the size of an object. For example, if a triangle has vertices of the size [a,b,c], then the triangle with the vertices [2a, 2b, 2c] will be double its size. Therefore, to scale a triangle, you have to multiply each vertices with the scaling factor.

WebGL - Rotation

In this chapter, we will take an example to demonstrate how to rotate a triangle using WebGL.

Example – Rotate a Triangle

The following program shows how to rotate a triangle using WebGL.
<!doctype html>
<html>
   <body>
      <canvas width = "400" height = "400" id = "my_Canvas"></canvas>
         
      <script>

WebGL - Cube Rotation

In this chapter, we will take an example to demonstrate how to draw a rotating 3D cube using WebGL.

Example – Draw a Rotating 3D Cube

The following program shows how to draw a rotating 3D cube −
<!doctype html>
<html>
   <body>

WebGL - Interactive Cube

In this chapter, we will take an example to demonstrate how to draw a 3D cube that can be rotated using mouse controls.

Example – Draw an Interactive Cube

The following program shows how to rotate a cube using mouse controls −
<!doctype html>
<html>
   <body>

WebGL - Quick Guide

WebGL - Introduction

A few years back, Java applications − as a combination of applets and JOGL − were used to process 3D graphics on the Web by addressing the GPU (Graphical Processing Unit). As applets require a JVM to run, it became difficult to rely on Java applets. A few years later, people stopped using Java applets.

WebGL - Useful Resources

The following resources contain additional information on WebGL. Please use them to get more in-depth knowledge on this.

Discuss WebGL

WebGL (Web Graphics Library) is the new standard for 3D graphics on the Web, designed for rendering 2D graphics and interactive 3D graphics. This tutorial starts with a basic introduction to WebGL, OpenGL, and the Canvas element of HTML-5,

Web2py - Introduction

web2py is defined as a free, open-source web framework for agile development which involves database-driven web applications; it is written in Python and programmable in Python. It is a full-stack framework; it consists of all the necessary components, a developer needs to build a fully functional web application.
web2py framework follows the Model-View-Controller pattern of running web applications unlike traditional patterns.

Web2py - Python Language

Python can be defined as a combination of object-oriented and interactive language. It is an open source software. Guido van Rossum conceived python in the late 1980s.
Python is a language similar to PERL (Practical Extraction and Reporting Language), which has gained popularity because of its clear syntax and readability.
The main notable features of Python are as follows −

Web2py - Framework Overview

web2py is a full-stack web framework that can be used by a developer to completely develop a web application. It includes SQL database integration and multi-threaded web server for designing a program.

Web2py - Core

Command Line Options

We have learnt how to start the web2py server using GUI widget in the previous chapter.
This widget can be skipped by starting the server from command line prompt.
python web2py.py -a 'your password' -i 127.0.0.1 -p 8000

Web2py - Views

web2py framework uses Models, Controllers and Views in its applications. It includes a slightly modified Python syntax in the Views for more readable code without any restriction as imposed on proper Python usage.

Web2py - Database Abstraction Layer

The Database Abstraction Layer (DAL) is considered as the major strength of web2py. The DAL exposes a simple Applications Programming Interface (API) to the underlying SQL syntax.
In this chapter, we will get to know the non-trivial applications of DAL, such as building queries to search by tags efficiently and building a hierarchical category tree.
Some important features of DAL are −

Web2py - Forms & Validators

web2py comes with powerful functions for form generation. Four distinct ways to build forms in web2py are as follows −
  • FORM − In terms of HTML helpers, it is considered as a low-level implementation. A FORM object is aware of its field contents.

Web2py - Email & SMS

web2py includes functionalities of sending e-mail and SMS to the user. It uses libraries to send emails and sms.

Setting Up Email

The in-built class namely gluon.tools.Mail class is used to send email in web2py framework. The mailer can be defined with this class.
from gluon.tools import Mail
mail = Mail()

Web2py - Access Control

Authentication

Almost every application needs to be able to authenticate users and set permissions. web2py comes with an extensive and customizable role-based access control mechanism.web2py. It also supports the protocols, such as CAS, OpenID, OAuth 1.0, LDAP, PAM, X509, and many more.

Web2py - Services

web2py provides support for various protocols like XML, JSON, RSS, CSV, XMLRPC, JSONRPC, AMFRPC, and SOAP. Each of those protocols is supported in multiple ways, and we make a distinction between −
  • Rendering the output of a function in a given format.
  • Remote Procedure Calls.

Web2py - Adding Ajax Effects

In this chapter, we will discuss examples of integration of jQuery plugins with web2py. These plugins help in making forms and tables more interactive and friendly to the user, thus improving the usability of your application.
In particular, we will learn

Web2py - Components

A component is defined as the functional part of a web page, which works autonomously. It can be composed of modules, controllers and views, which are embedded in a web page. The component in an application, must be localized tag and the performance is considered to be independent of module.
In web2py, the main focus is on using components that are loaded in page and which communicate with the component controller via AJAX.

Web2py - Deployment

Installation of web2py in Ubuntu (Linux)

The following steps are implemented for installation of web2py in the Ubuntu Desktop.
Step 1 − Download web2py
cd /home
mkdir www-dev

Web2py - Security

In the previous chapters, there was complete information on the implementation of web2py with various tools. The major concern for developing web2py applications includes security from a user’s perspective.
The unique features of web2py are as follows −

Web2py - Quick Guide

Web2py - Introduction

web2py is defined as a free, open-source web framework for agile development which involves database-driven web applications; it is written in Python and programmable in Python. It is a full-stack framework; it consists of all the necessary components, a developer needs to build a fully functional web application.
web2py framework follows the Model-View-Controller pattern of running web applications unlike traditional patterns.

Web2py - Useful Resources

The following resources contain additional information on Web2py. Please use them to get more in-depth knowledge on this.

Discuss Web2py

web2py is defined as a free, open-source web framework for agile development which involves database-driven web applications. It is written and programmable in Python. It is a full-stack framework and consists of all the necessary components a developer needs to build fully functional web applications.

Web Icons - Introduction

An icon is a symbol that is used to represent a specific action or a capability on a webpage. Icons are used in documents as well as applications and they can be either selectable or non-selectable. For example, the images that we see on the buttons of an application are all icons and these buttons are selectable. Similarly, when we use an icon as a company logo, it is normally non-selectable.

Font Awesome Icons

Font Awesome icons library provides 519 free scalable vector icons. This library is completely free for both personal and commercial use. Originally designed for Bootstrap, these icons can be customized easily.

Font Awesome - Web Application Icons

This chapter explains the usage of Font Awesome Web Application icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Hand Icons

This chapter explains the usage of Font Awesome Hand icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Transportation Icons

This chapter explains the usage of Font Awesome Transportation icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Gender Icons

This chapter explains the usage of Font Awesome Gender icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - File Type Icons

This chapter explains the usage of Font Awesome File Type icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Spinner Icons

This chapter explains the usage of Font Awesome Spinner icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Form Control Icons

This chapter explains the usage of Font Awesome Form Control icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Payment Icons

This chapter explains the usage of Font Awesome Payment icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Chart Icons

This chapter explains the usage of Font Awesome Chart icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>

Font Awesome - Currency Icons

This chapter explains the usage of Font Awesome Currency icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Text Editor Icons

This chapter explains the usage of Font Awesome Text Editor icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>

Font Awesome - Directional Icons

This chapter explains the usage of Font Awesome Directional icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>

Font Awesome - Video Player Icons

This chapter explains the usage of Font Awesome Video Player icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>

Font Awesome - Brand icons

This chapter explains the usage of Font Awesome Brand icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = "https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css">

      <style>

Font Awesome - Medical Icons

This chapter explains the usage of Font Awesome Medical icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>

Thursday, March 16, 2017

Material Icons

Google provides a set of 750 icons designed under "material design guidelines" and these are known as Material Design icons. These icons are simple and they support all modern web browsers. Since these icons are vector based, they are scalable as well. To use these icons, we have to load the font (library) material-icons.

Material - Action Icons

This chapter explains the usage of Google's (Material) Action Icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Alert Icons

This chapter explains the usage of Google's (Material) Alert icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - AV Icons

This chapter explains the usage of Google's (Material) AV icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Communication Icons

This chapter explains the usage of Google's (Material) Communication icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Content Icons

This chapter explains the usage of Google's (Material) Content icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Device Icons

This chapter provides you the usage of Google's (Material) Device Icons. Assume that custom is the CSS class name in which we defined the size and colour as shown below.
<style>
   i.custom {font-size: 2em; color: green;}
</style>

Material - Editor Icons

This chapter explains the usage of Google's (Material) Editor icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Hardware Icons

This chapter explains the usage of Google's (Material) Hardware icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Image Icons

This chapter explains the usage of Google's (Material) Image icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>

Material - Maps Icons

This chapter explains the usage of Google's (Material) Maps icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>

Material - Navigation Icons

This chapter explains the usage of Google's (Material) Navigation icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Notification Icons

This chapter explains the usage of Google's (Material) Notification icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Social Icons

This chapter explains the usage of Google's (Material) Social icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Material - Toggle Icons

This chapter explains the usage of Google's (Material) Toggle icons. Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<!DOCTYPE html>
<html>
   <head>

Bootstrap Glyphicons

This is a library of monochromatic icons available in raster image formats, vector image formats, and as fonts. It provides over 250 glyphs in font format. You can use these fonts in your web projects. These glyphs are not free, however if you don't have to spend anything in case you are using them in Bootstrap based projects.

Bootstrap Components

This chapter explains the usage of Bootstrap Glyphicons (Components). Assume that custom is the CSS class name where we defined the size and color, as shown in the example given below.
<html>
   <head>
      <link rel = "stylesheet" href = <link rel = "stylesheet" 
         href = "http://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css">
      

Web Icons - Useful Resources

The following resources contain additional information on Web Icons. Please use them to get more in-depth knowledge on this.

Discuss Web Icons

We have a number of Icon Fonts (libraries) available that can be used on HTML pages just the way we use normal text fonts. Font Awesome, Bootstrap Glyphicons, and Google's Material Icons are the prominent Icon Fonts used frequently by web developers. This tutorial explains how to use these Icon Fonts in practice.


Web - Basic Concepts

What is Internet?

The Internet is essentially a global network of computing resources. You can think of the Internet as a physical collection of routers and circuits as a set of shared resources.
Some common definitions given in the past include −

Web - How it Works ?

On the simplest level, the Web physically consists of the following components −
  • Your personal computer − This is the PC at which you sit to see the web.
  • A Web browser − A software installed on your PC which helps you to browse the Web.
  • An internet connection − This is provided by an ISP and connects you to the internet to reach to any Website.

Web - Browser Types

Web Browsers are software installed on your PC. To access the Web, you need a web browser, such as Netscape Navigator, Microsoft Internet Explorer or Mozilla Firefox.
Currently you must be using any sort of Web browser while you are navigating through our site tutorialspoint.com.

Web - Server Types

Every Website sits on a computer known as a Web server. This server is always connected to the internet. Every Web server that is connected to the Internet is given a unique address made up of a series of four numbers between 0 and 255 separated by periods. For example, 68.178.157.132 or 68.122.35.127.

Web - Site Advantages

If you are constructing a Website, then we hope you are aware of its advantages as well. Here, in this chapter, we have listed out a few major advantages of keeping a website.

Web - Skills Required

If you are planning to maintain a Website, then you would require a specific set of skills. This skillset can be endless because today, there are numerous technologies available and many are coming everyday. So you have to plan and affirm on any one of the available technologies and go ahead for your project.

Web - Tools Required

As a basic necessity, you need a good internet connection from a reliable service provider which provides decent connectivity and speed. Evaluate vendors based on their services and support before selecting. Here due diligence plays a major part.
The following tools and infrastructure will help you in developing a Website −

Web - Domain Names

A domain name is the part of your Internet address that comes after "www". For example, in Tutorialspoint.com the domain name is tutorialspoint.com.
A domain name becomes your Business Address so care should be taken to select a domain name. Your domain name should be easy to remember and easy to type.

Web - Site Construction

Now you are ready for a website construction. Before proceeding further, you have to take many factors into consideration. I cannot list out each and everything but I have described the major factors in this tutorial which will help you to have a better website −

Web - Hosting Concepts

Web hosting deals with putting the contents of your website on a Web server. Hosting your website on your own server could be an option. But this will become very much expensive unless you are hosting a site like yahoo.com or google.com. So this tutorials does not cover how to set up your own hosting server.

Web - Ecommerce Hosting

Ecommerce is a way of doing business through Internet. You are doing ecommerce, especially when you are selling your products or services through Internet. If you planning to put a website which will have transactions such as buying or selling items or services, then it means you are going to setup an ecommerce website.

Web - Site Backup

Your server's hard drive crashed. Your site is hacked and the hacker deleted all your files. Your web host disappeared with your money and your data. Even worse, there was and earth quack and your ISP building is gone down and everything is lost.

Web - Site Statistics

Once your site is up and running, it is important that you track your visitors and analyze what they are using. You should have a detailed information on the following −
  • Who is your visitor? − You should have your site visitor IP address available with you to know the geographical location and identity of that visitor.

Web - Site Popularity

You designed a website and developed it and finally hosted it. Now just think how many site visitors know about this site address and related service.
If you want to make your site a success, then the actual work starts after hosting your website successfully. It includes the following actions, but gaining popularity is certainly not limited to these actions.

Web - Free Graphics

Graphic elements play a crucial role on any website. If you have time and talent to design your web graphics, then it is great. It does not only require time and talent to have web graphics, but you need to spend a good deal of money as well to buy good graphics software like Paint Shop Pro or Adobe Photoshop.

Web - Summary

We do hope that you found this tutorial useful and informative. Here we have covered all the basics of Web and Web Hosting.
Now it is time to move forward and we will encourage you to start developing your website using our HTML Tutorial.

Web - Quick Guide

Web - Basic Concepts

What is Internet?

The Internet is essentially a global network of computing resources. You can think of the Internet as a physical collection of routers and circuits as a set of shared resources.
Some common definitions given in the past include −

Web - Useful Resources

The following resources contain additional information on Web Developers Guide. Please use them to get more in-depth knowledge on this.

Useful Links on Web Development

  • W3C Consortium - Official web site of W3C Consortium. This site should be book marked for easy access.

Discuss Web Development

This tutorial provides a simple and practical way of understanding the essential areas of developing a website. It also provides elementary insights and an overview of the subject that is necessary to understand the world of web technologies. This tutorial covers all that is required to become a good Web Developer.

W3.CSS - Overview

What is W3.CSS?

W3.CSS is a Cascading Style Sheet (CSS) developed by w3schools.com. It helps in creating faster, beautiful, and responsive websites. It is inspired from Google Material Design.
Some of its salient features are as follows:

W3.CSS - Environment Setup

How to Use W3.CSS?

There are two ways to use W3.CSS:
  • Local Installation - You can download the W3.CSS file on your local machine and include it in your HTML code.
  • CDN Based Version - You can include the W3.CSS file into your HTML code directly from the Content Delivery Network (CDN).

W3.CSS - Containers

HTML5 has the following container elements:
  • <div> - Provides a generic container to HTML content.
  • <header> - Represents the header section.
  • <footer> - Represents the footer section.

W3.CSS - Code Coloring

W3.CSS provides excellent support for syntax highlighting of the following languages:
  • HTML - Use classes w3-code htmlHigh on the container having HTML Code.
  • CSS - Use classes w3-code cssHigh on the container having CSS Code.
  • JS - Use classes w3-code jsHigh on the container having CSS Code.

W3.CSS - Cards

W3.CSS has several special classes to display containers as paper-like cards with shadow.
Class NameDescription
w3-cardStyles a container for any HTML content with border
w3-card-2Styles a container for any HTML content with 2px bordered shadow
w3-card-4Styles a container for any HTML content with 4px bordered shadow

W3.CSS - Responsive Design

W3.CSS has several special classes to create a responsive design.
Class NameDescription
w3-halfSets the container to occupy 1/2nd of the window on medium or large screen devices. If a screen is smaller than 601 pixels, then it resizes the container to 100%.

W3.CSS - Grids

W3.CSS provides a 12 column fluid responsive grid.
It uses the w3-row and w3-col style classes to define rows and columns respectively.

W3.CSS - Forms

W3.CSS has a very beautiful and responsive CSS for form designing. The following CSS are used:
Class NameDescription
w3-groupRepresents a bordered container. Can be used to group a label and input.
w3-inputBeautifies an input control.
w3-labelBeautifies a label.
w3-checkbox w3-checkmarkBeautify a checkbox/ radio button.

W3.CSS - Buttons

W3.CSS has a very beautiful and responsive CSS for customizing the look of a button. The following CSS are used:
Class NameDescription
w3-btnRepresents a standard button. Can be used to style a link as button as well.
w3-btn-floatingRepresents a floating button being circular in design.
w3-btn-floating-largeRepresents a large floating button.

W3.CSS - Tooltips

W3.CSS supports a different kind of tooltip using w3-tooltip class. Take a look at the following example. Here we've put a tooltiptext within a div and an image and applied w3-tooltip on the parent div.
<div class="w3-tooltip">
   <div class="w3-text w3-container w3-teal" style="width:255px;">
      <p>Learn HTML5 in simply easy way @TutorialsPoint.com</p>
   </div>
   <div>

W3.CSS - Modal Dialog

W3.CSS can be used to display a customizable modal dialog box instead of the standard JavaScript alert.
It uses w3-row and w3-col style classes to define rows and columns respectively.
Class NameDescription
modal-dialogRepresents the main parent window to define a dialog box.
w3-modal-dialogRepresents the dialog content container.
w3-modal-contentRepresents dialog contents.

W3.CSS - Tables

W3.CSS can be used to display different types of tables using various styles over w3-table.
Class NameDescription
w3-tableRepresents a basic table without any border.
w3-stripedDisplays a stripped table.
w3-borderedDraws a table with a border across rows.

W3.CSS - Lists

W3.CSS can be used to display different types of lists using various styles over w3-ul.
Class NameDescription
w3-ulRepresents a basic list without any border.
w3-stripedDisplays a stripped list.
w3-borderedDraws a list with border across rows.
w3-borderDraws a list with border.

W3.CSS - Images

W3.CSS provides options to display images in beautiful and interesting ways using w3-image as the main class.
Class NameDescription
w3-imageRepresents a basic styled image without any border.
w3-circleDisplays an image within a circle
w3-titleUsed to put text over an image.
w3-cardDraws an image as a card.

W3.CSS - Icons

W3.CSS supports the following popular icon libraries:
  • Font Awesome Icons
  • Google Material Icons
  • Bootstrap Icons

W3.CSS - Colors

W3.CSS supports a rich set of color classes. These color classes are inspired and developed considering the colors used in marketing, road signs, and sticky notes.

W3.CSS - Navigation

W3.CSS has several special classes to display a navigation bar or a menu on a website quickly.
Class NameDescription
w3-topnavStyles a list as a horizontal menu/navigation bar.
w3-sidenavStyles a list as a vertical menu/navigation bar.

W3.CSS - Utilities

W3.CSS has several utility classes which are very useful for day-to-day designing needs.
  • Color utility classes - Examples: w3-red, w3-yellow
  • Padding utility classes - Examples: w3-padding-jumbo, w3-padding-16
  • Margin utility classes - Examples: w3-margin-8, w3-margin-64

W3.CSS - Quick Guide

W3.CSS - Overview

What is W3.CSS?

W3.CSS is a Cascading style sheet, CSS developed by w3schools.com. It helps in creating faster, beautiful and responsive websites. It is inspired from Google Material Design.
Following are its some of the salient features:

W3.CSS - Useful Resources

If you want to list down your website, book or any other resource on this page then please contact at webmaster@tutorialspoint.com

Websites on W3.CSS

  • W3.CSS - W3.CSS official home page

Discuss W3.CSS

W3.CSS is a Cascading Style Sheet (CSS) developed by w3schools.com. It helps in creating faster, beautiful, and responsive websites. It is inspired from Google Material Design.

TypeScript - Classes

TypeScript is object oriented JavaScript. TypeScript supports object-oriented programming features like classes, interfaces, etc. A class in terms of OOP is a blueprint for creating objects. A class encapsulates data for the object. Typescript gives built in support for this concept called class. JavaScript ES5 or earlier didn’t support classes. Typescript gets this feature from ES6.

Tuesday, March 14, 2017

VBScript - Overview

VBScript stands for Visual Basic Scripting that forms a subset of Visual Basic for Applications (VBA).
VBA is a product of Microsoft which is included NOT only in other Microsoft products such as MS Project and MS Office but also in Third Party tools such as AUTO CAD.

VBScript - Syntax

Your First VBScript

Let us write a VBScript to print out "Hello World".
<html>
<body>
<script language="vbscript" type="text/vbscript">
   document.write("Hello World!")
</script>
</body>
</html>

Enabling VBScript in Browsers

NOT All the modern browsers support VBScript. VBScript is supported just by Microsoft's Internet Explorer while other browsers(Firefox and Chrome) just support JavaScript. Hence, the developers prefer JavaScript over VBScript.

VBScript - Placements

VBScript Placement in HTML File

There is a flexibility given to include VBScript code anywhere in an HTML document. But the most preferred way to include VBScript in your HTML file is as follows:
  • Script in <head>...</head> section.
  • Script in <body>...</body> section.
  • Script in <body>...</body> and <head>...</head> sections.
  • Script in an external file and then include in <head>...</head> section.

VBScript - Variables

VBScript Variables

Variable is a named memory location used to hold a value that can be changed during the script execution. VBScript has only ONE fundamental data type, Variant.
Rules for Declaring Variables:

VBScript - Constants

Constant is a named memory location used to hold a value that CANNOT be changed during the script execution. If a user tries to change a Constant Value, the Script execution ends up with an error. Constants are declared the same way the variables are declared.

VBScript - Operators

What is an operator?

Simple answer can be given using expression 4 + 5 is equal to 9. Here, 4 and 5 are called operands and + is called operator. VBScript language supports following types of operators:
  • Arithmetic Operators
  • Comparison Operators
  • Logical (or Relational) Operators
  • Concatenation Operators

VBScript - Decision Making

Decision making allows programmers to control the execution flow of a script or one of its sections. The execution is governed by one or more conditional statements.
Following is the general form of a typical decision making structure found in most of the programming languages:

VBScript - Loops

There may be a situation when you need to execute a block of code several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on.

VBScript - Events

What is an Event ?

VBScript's interaction with HTML is handled through events that occur when the user or browser manipulates a page.
When the page loads, that is an event. When the user clicks a button, that click too is an event. Another example of events are like pressing any key, closing window, resizing window, etc.

VBScript and Cookies

What are Cookies?

Web Browser and Server use HTTP protocol to communicate and HTTP is a stateless protocol. But for a commercial website, it is required to maintain session information among different pages. For example, one user registration ends after completing many pages. But how to maintain user's session information across all the web pages.

VBScript - Numbers

Description

Number functions help the developers to handle numbers in an efficient way and also helps them to convert their subtypes. It also helps them to make use of the inbuilt mathematical functions associated with VBscript.

VBScript - Strings

Strings are a sequence of characters, which can consist of alphabets or numbers or special characters or all of them. A variable is said to be a string if it is enclosed within double quotes " ".

VBScript - Arrays

What is an Array?

We know very well that a variable is a container to store a value. Sometimes, developers are in a position to hold more than one value in a single variable at a time. When a series of values are stored in a single variable, then it is known as array variable.

VBScript - Date and Time Functions

VBScript Date and Time Functions help the developers to convert date and time from one format to another or to express the date or time value in the format that suits a specific condition.

VBScript - Procedures

What is a Function?

A function is a group of reusable code which can be called anywhere in your program. This eliminates the need of writing same code over and over again. This will enable programmers to divide a big program into a number of small and manageable functions.

VBScript - Dialog Boxes

What is a Dialog Box ?

VBScript allows the developers to interact with the user effectively. It can be a message box to display a message to a user or an input box with which user can enter the values.

Object Oriented VBScript

What is an Object

VBScript runtime objects help us to accomplish various tasks. This section will help you understand how to instantiate an object and work with it.

VBScript - Regular Expressions

What are Regular Expressions?

Regular Expressions is a sequence of characters that forms a pattern, which is mainly used for search and replace. The purpose of creating a pattern is to match specific strings, so that the developer can extract characters based on conditions and replace certain characters.

VBScript - Error Handling

There are three types of errors in programming: (a) Syntax Errors and (b) Runtime Errors (c) Logical Errors.

Syntax errors

Syntax errors, also called parsing errors, occur at interpretation time for VBScript. For example, the following line causes a syntax error because it is missing a closing parenthesis:
<script type="text/vbscript">

VBScript Miscellaneous Statements

There are few other important statements which helps the developers to develop an efficient script. Below are the list of statements tabulated and explained in detail with examples.

VBScript Questions and Answers

VBScript Questions and Answers has been designed with a special intention of helping students and professionals preparing for various Certification Exams and Job Interviews. This section provides a useful collection of sample Interview Questions and Multiple Choice Questions (MCQs) and their answers with appropriate explanations.

VBScript - Useful Resources

The following resources contain additional information on VBScript. Please use them to get more in-depth knowledge on this topic.

Discuss VBScript

Microsoft VBScript (Visual Basic Script) is a general-purpose, lightweight and active scripting language developed by Microsoft that is modelled on Visual Basic. Nowadays, VBScript is the primary scripting language for Quick Test Professional (QTP), which is a test automation tool.

TypeScript - Overview

JavaScript was introduced as a language for the client side. The development of Node.js has marked JavaScript as an emerging server-side technology too. However, as JavaScript code grows, it tends to get messier, making it difficult to maintain and reuse the code.

TypeScript - Environment Setup

Try it Option Online

We already have set up TypeScript programming online, so that you can execute all the available examples online at the same time when you are doing your theory work. This gives you confidence in what you are reading and to check the result with different options. Feel free to modify any example and execute it online.

TypeScript - Basic Syntax

Syntax defines a set of rules for writing programs. Every language specification defines its own syntax. A TypeScript program is composed of −
  • Modules
  • Functions
  • Variables
  • Statements and Expressions
  • Comments

TypeScript - Types

The Type System represents the different types of values supported by the language. The Type System checks the validity of the supplied values, before they are stored or manipulated by the program. This ensures that the code behaves as expected. The Type System further allows for richer code hinting and automated documentation too.

TypeScript - Variables

A variable, by definition, is “a named space in the memory” that stores values. In other words, it acts as a container for values in a program. TypeScript variables must follow the JavaScript naming rules −
  • Variable names can contain alphabets and numeric digits.
  • They cannot contain spaces and special characters, except the underscore (_) and the dollar ($) sign.
  • Variable names cannot begin with a digit.

TypeScript - Operators

What is an Operator?

An operator defines some function that will be performed on the data. The data on which operators work are called operands. Consider the following expression −
7 + 5 = 12
Here, the values 7, 5, and 12 are operands, while + and = are operators.
The major operators in TypeScript can be classified as −

TypeScript - Decision Making

Decision-making structures require that the programmer specifies one or more conditions to be evaluated or tested by the program, along with a statement or statements to be executed if the condition is determined to be true, and optionally, other statements to be executed if the condition is determined to be false.

TypeScript - Loops

You may encounter situations, when a block of code needs to be executed several number of times. In general, statements are executed sequentially: The first statement in a function is executed first, followed by the second, and so on.

TypeScript - Functions

Functions are the building blocks of readable, maintainable, and reusable code. A function is a set of statements to perform a specific task. Functions organize the program into logical blocks of code. Once defined, functions may be called to access code. This makes the code reusable. Moreover, functions make it easy to read and maintain the program’s code.

TypeScript - Numbers

TypeScript like JavaScript supports numeric values as Number objects. A number object converts numeric literal to an instance of the number class. The Number class acts as a wrapper and enables manipulation of numeric literals as they were objects.

TypeScript - Strings

The String object lets you work with a series of characters. It wraps the string primitive data type with a number of helper methods.

TypeScript - Arrays

The use of variables to store values poses the following limitations −
  • Variables are scalar in nature. In other words, a variable declaration can only contain a single at a time. This means that to store n values in a program n variable declarations will be needed. Hence, the use of variables is not feasible when one needs to store a larger collection of values.

TypeScript - Tuples

At times, there might be a need to store a collection of values of varied types. Arrays will not serve this purpose. TypeScript gives us a data type called tuple that helps to achieve such a purpose.
It represents a heterogeneous collection of values. In other words, tuples enable storing multiple fields of different types. Tuples can also be passed as parameters to functions.

TypeScript - Union

TypeScript 1.4 gives programs the ability to combine one or two types. Union types are a powerful way to express a value that can be one of the several types. Two or more data types are combined using the pipe symbol (|) to denote a Union Type. In other words, a union type is written as a sequence of types separated by vertical bars.

TypeScript - Interfaces

An interface is a syntactical contract that an entity should conform to. In other words, an interface defines the syntax that any entity must adhere to.
Interfaces define properties, methods, and events, which are the members of the interface. Interfaces contain only the declaration of the members. It is the responsibility of the

TypeScript - Objects

An object is an instance which contains set of key value pairs. The values can be scalar values or functions or even array of other objects. The syntax is given below −

Syntax

var object_name = { 
   key1: “value1”, //scalar value 
   key2: “value”,  
   key3: function() {
      //functions 

TypeScript - Namespaces

A namespace is a way to logically group related code. This is inbuilt into TypeScript unlike in JavaScript where variables declarations go into a global scope and if multiple JavaScript files are used within same project there will be possibility of overwriting or misconstruing the same variables, which will lead to the “global namespace pollution problem” in JavaScript.

TypeScript - Modules

A module is designed with the idea to organize code written in TypeScript. Modules are broadly divided into −
  • Internal Modules
  • External Modules

TypeScript - Ambients

Ambient declarations are a way of telling the TypeScript compiler that the actual source code exists elsewhere. When you are consuming a bunch of third party js libraries like jquery/angularjs/nodejs you can’t rewrite it in TypeScript.

TypeScript - Quick Guide

TypeScript - Overview

JavaScript was introduced as a language for the client side. The development of Node.js has marked JavaScript as an emerging server-side technology too. However, as JavaScript code grows, it tends to get messier, making it difficult to maintain and reuse the code.

TypeScript - Useful Resources

The following resources contain additional information on TypeScript. Please use them to get more in-depth knowledge on this.

Discuss TypeScript

TypeScript lets you write JavaScript the way you really want to. TypeScript is a typed superset of JavaScript that compiles to plain JavaScript. TypeScript is pure object oriented with classes, interfaces and statically typed like C# or Java.

Monday, March 13, 2017

TurboGears - Overview

What is Web Framework?

Web Application Framework or simply Web Framework represents a collection of libraries and modules, which enables a web application developer to write applications, without having to bother about low level details such as protocols, thread management, etc.

TurboGears - Environment

Prerequisite

Python 2.6 or higher. Earlier versions of TurboGears were not compliant with Python 3.X. Latest version claims to work well on Python 3.X. However, official documentation of TurboGears is still based on Python 2.7 environment.

TurboGears - First Program

TurboGears has a minimal mode that makes it possible to create single file applications quickly. Simple examples and services can be built quickly with minimal set of dependencies.
Application class in a TG application is inherited from TGController class. Methods in this class are available for access by @expose decorator from tg module.

TurboGears - Dependencies

A TurboGears project contains the following directories −
  • Config − Where project setup and configuration relies
  • Controllers − All the project controllers, the logic of web application
  • i018n − Translation files for the languages supported
  • Lib − Utility python functions and classes

TurboGears - Serving Templates

An Event though HTML content can be returned to the browser, for more advanced output, the use of template engine is always preferred. In a full stack project ‘quickstarted’ by gearbox, Genshi is enabled as the default template renderer. In a minimal application, however Genshi (or any other template engine, such as jinja) needs to be installed and enabled.

TurboGears - HTTP Methods

Http Protocol is the foundation of data communication in world wide web. Different methods of data retrieval from specified URL are defined in this protocol. Following table summarizes different http methods

TurboGears - Genshi Template Language

Genshi is a XML based template language. It is similar to Kid, which used to be the template engine for earlier versions of TurboGears. Genshi as well as Kid are inspired by other well-known template languages like HSLT, TAL and PHP.

TurboGears - Includes

Contents of another XML document (especially HTML document) can be included by using inclusion tags in the current document. In order to enable such an inclusion, XInclude namespace must be declared in the root element of the HTML document.

TurboGears - JSON Rendering

The @expose() decorator by default renders html content. However, this can be set to json content type. TurboGears supports json rendering through tg.jsonify.JSONEncoder (**kwargs) class. To render json data simply pass json as content type to expose decorator.

TurboGears - URL Hierarchy

Sometimes, a web application may require a URL structure that is having more than one level. TurboGears can traverse object hierarchy to find appropriate method that can handle your request.
A project ‘quickstarted’ with gearbox has a BaseController class in project’s lib folder. It is available as ‘Hello/hello/lib/base.py’.

TurboGears – ToscaWidgets Forms

One of the most essential aspect of any web application is to present the user interface for a user. HTML provides a <form> tag which is used to design an interface. Form’s elements such as text input, radio, select etc. can be appropriately used. Data entered by the user is submitted in the form of Http request message to server side script by either GET or POST method.

TurboGears – Validation

A good Forms widget library should have an input validation feature. For example, the user should be forced to enter data in a mandatory field, or verify if an email field contains a valid email, without resorting to any other programmatic means (like JavaScript function) for validation.

TurboGears – Flash Messages

TurboGears provides a very convenient messaging system for notifying information to user in a non-obtrusive way. TGFlash class in tg module provides support for flashing messages that are stored in a plain cookie. This class supports fetching flash messages on server side as well as client side through JavaScript.

TurboGears – Cookies & Sessions

It is often required to hold simple browsing data attached to a user’s browser. Sessions are the most commonly used technique. Session represents data which need not be stored in a more persistent form like disk file or database.

TurboGears – Caching

In order to enhance the performance of a web application, especially if it is involved in lengthy operations, caching techniques are used. TurboGears provides two types of caching techniques −
Whole-page Caching