পৃষ্ঠাসমূহ

.

Search Your Article

Total Pageviews

Saturday, March 4, 2017

Magento - Setup Customers

It is necessary to record customer accounts and customer registration process in Magento. This chapter describes the customer settings as shown in the following steps.
Step (1): Login to your Magento Admin Panel.
Step (2): Go to System menu and click on the Configuration option.

Magento - Setup Google Analytics

Google Analytics is a finest Google service for those who are actively managing websites and adds analytics to Magento store including Ecommerce tracking and conversions of their websites. It allows administrators to monitor their website's traffic.
The following steps help you to set up Google Analytics in Magento store:
Step (1): Login to your Magento Admin Panel.

Magento - Setup Pretty URLs

You can use Magento for more user and search engine friendly URLs as shown in the below steps.
Step (1): Login to your Magento Admin Panel.
Step (2): Go to System menu and click on the Configuration option.

Magento - Setup Youtube Video

In this chapter you will learn how to setup YouTube videos to your Magento store as shown in the following steps.
Step (1): Login to Magento Admin Panel.
Step (2): Go to CMS menu and click on Pages option.

Magento - Setup Facebook Likes

Social networks such as Facebook, Twitter and Google Plus have become powerful for promoting the web shops. Facebook provides "Like" button which allows user to share contents of the products across the web.
The following steps show you how to add Facebook Like button for your Magento products:
Step (1): Go to developer site of Facebook https://developers.facebook.com/docs/plugins/like-button and click on Get Code button.

Magento - Setup Translation

We can translate Magento default frontend through csv file as specified below:
Look into your (root)/app/locale/en_US folder. There you have .csv's that do the translating. The Mage_Catalog.csv contains the translations for all the files that use the /app/code/core/Mage/Catalog/classes and /app/design/frontend/default/default/locale/en_US/translate.csv template files. Here, you'll also find Mage_Adminhtml.csv, which handles most of the admin translations.

Magento - Setup System Theme

This chapter describes how to install new Magento theme on your store's frontend. You can use Magento Connect to install theme. For installing theme, you need to get the extension key and then use it for the installation through Magento Connect.

Magento - Setup Page Title

Magento allows changing the default title of your website. The following steps describe how to change the title of Magento store.
Step (1): Login to your Magento Admin Panel.
Step (2): Go to the System menu, click on the Configuration option and select the Design option under the General section.

Magento - Setup Page Layout

Layout files are useful in rendering front pages of Magento. Using Magento, it's easy to change the layout of pages.
This chapter describes how to setup the layout of Magento pages:
Step (1): Login to your Magento Admin Panel.
Step (2): Go to CMS menu and click on the Pages option to list out all the pages of Magento. Select the page which you want to change the layout of.

Magento - Setup New Pages

This chapter shows how to create or setup new pages in Magento by using the following steps:
Step (1): Login to your Magento Admin Panel.
Step (2): Go to CMS menu and click on the Pages option.

Magento - Setup CMS

Magento CMS (Content Management System) section is used to manage all web site pages. It is a way of promoting the products by providing valuable information to the customers and increases visibility to search engines. It can be used to create rich content for your web store.
The CMS section contains following topics:

Magento - Setup Newsletter

Creating news letter is a part of communication process with the buyers. Customer can subscribe to Newsletters using Magento. Customer can sign up for the Newsletter when he creates a new customer account which contains checkbox for signing up. For creating Newsletters you need to enable Newsletter option in your magento to make sure that customer has confirmed to receive Newsletter.

Magento - Environment Optimization

Magento is a content management system that is commonly known to be performance intensive. Optimizing the speed of your Magento allows customers to have the best user experience while shopping in your ecommerce store. Based on the additional configurations of the server environment, the hosting site providers speed up your store.

Magento - Configuration Optimization

Magento has built in tools that can helps to optimize the magento performance. These must be properly configured and matched with your site's unique requirements. The following points specify how to optimize the magento configuration.

Magento - Code Optimization

The code influences the speed of your site. The testing tool helps to gain insight into the specific process.
Code Optimization contains following points:

Magento - Frontend Optimization

The modules are used for to improve the performance of Magento shopping experience and also you can reuse the modules. This speeds up the performance of the Magento front-end.
The following points show how to optimize the Magento front-end performance:

Magento - Profiling

The feature called Profiler which plays an important role with Magento development and can be used for developer only to debugging. It specifies blocks of code which makes loading of the page slow. The Magento profiler reports the time taken by block of code to execute, number of times the block of the code executed and memory used by it while rendering a Magento web page.

Magento - Database Performance

One of the most time consuming process of the Magento store is its interaction with the database. Optimize Magento Database is important task to maintain the Magento site. Magento saves a lot of database because of tracking. The ecommerce system must have tracking module which shows information when something goes wrong with their order.

Magento - Search Engine Optimization

Magento is one of the search engine friendly systems. It is an essential component of a running web based business and important form of marketing online. To make e-store more visible to the potential buyers, the website admin need to enhance e-store ranking in search engine results.

Magento - Interview Questions

Dear readers, these Magento Interview Questions have been designed specially to get you acquainted with the nature of questions you may encounter during your interview for the subject of Magento. As per my experience good interviewers hardly plan to ask any particular question during your interview, normally questions start with some basic concept of the subject and later they continue based on further discussion and what you answer:

Magento - Quick Guide

Magento - Overview

What is E-commerce?

E-commerce (Electronic Commerce) is a type of business that involves the commercial transaction or purchasing or selling of goods and services through electronic channels known as internet. It was first introduced in the year 1960 through EDI (Electronic Data Interchange) on VAN (Value-added network).

Magento - Useful Resources

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

Useful Links on Magento

Discuss Magento

Magento is an open source E-commerce software, created by Varien Inc., which is useful for online business. It has a flexible modular architecture and is scalable with many control options that is helpful for users.

MathML - Overview

MathML stands for Mathematical Markup Language and is an XML based application. It is used to describe mathematical and scientific notations. It's 1 and 2 version were created and developed by The Math Working Group which is one of the oldest W3C Working Groups during 1996-2004. MathML version 3 was created during Math Working Group's second activity period (2006-2016)and is an ISO standard.

MathML - All Elements

Following is the list of important MathML elements.
  1. <maction> - Provides option to bind actions to subexpressions/expressions.
  2. <math> - It is top or root level element and is used to encapsulate each instance of MathML instance. Every valid MathML expression should be wrapped in outer <math> tag. It can contain any number of child elements. One math element cannot contain another math element tag.

MathML - Basic Elements

There are five basic elements of a MathML expression.
  • <math> element - It is top or root level element and is used to encapsulate each instance of MathML instance. Every valid MathML expression should be wrapped in outer <math> tag. It can contain any number of child elements. One math element cannot contain another math element tag.

MathML - Carries

The <mscarries> element can be used to create carries, borrows, and crossouts that occur in elementary math. The children of mscarries are associated with elements in the following row of the mstack. Each child of mscarries except <mscarry> or <none> is treated as being implicitly surrounded by mscarry.

MathML - Enclosing

<menclose> tag is used to renders content inside the enclosing notation as specified by its notation attribute. it accepts a single argument as an inferred mrow of multiple children.

Syntax

Here is the simple syntax to use this tag −
<menclose> expression </menclose>

MathML - Fencing

<mfenced> tag is a convenient method to use fencing operators like curly braces, brackets and parentheses instead of using <mo> tags for them.

Syntax

Here is the simple syntax to use this tag −
<mfenced> expression </mfenced>

MathML - Fractions

<mfrac> tag is used to draw fractions.

Syntax

Here is the simple syntax to use this tag −
<mfrac> numerator denominator </mfrac>

MathML - Long Division

<mlongdiv> tag is used to draw long divisions.

Syntax

Here is the simple syntax to use this tag −
<mlongdiv> divisor dividend result expression </mlongdiv>

MathML - Matrices

<mtable> tag is used to draw matrices.

Syntax

mtable is similar to table tag of HTML and this tag uses mtr, mtd elements which are similar to tr and td tags of HTML.
<mtable> <mtr> <mtd></mtd></mtr></mfrac>

MathML - Multiplication

<msgroup> is used to group rows inside <mstack> element and <mlongdiv> elements to have position relative to the alignment of stack. <msgroup> element with shift attribute can be used to create simple multiplications.

MathML - Overscript

MathML - Overscript

<mover> tag is used to draw overscript. It adds an accent or a limit over an expression.

Syntax

Here is the simple syntax to use this tag −
<mover> base overscript </mover>

MathML - Padding

<mpadded> element is used to add padding, or extra space, around its content. It can be used to adjust size and positioning e.g. negative padding,which can cause the content of mpadded to overlap the rendering of neighboring content.

MathML - Phantom

<mphantom> element renders invisibly keeping same size and other dimensions, including baseline position, as its contents would have if they were rendered normally. It is used to align parts of an expression by invisibly duplicating sub-expressions.

MathML - Radicals

msqrt and mroot elements construct radicals. The msqrt element constructs square roots, while the mroot element constructs radicals with indices, for example a cube root.

MathML - Repeating Decimals

Decimal numbers having digit(s) that repeat(s) infinitely such as 1/3 (.3333...) are represented by putting a horizontal line over or below the digits that repeat. <mstack> , <msrow>, and <msline> elements can be used to create decimal numbers with repeated digits as shown below.

MathML - Style

<mstyle> tag is used to make style changes that affect the rendering of its contents.

Syntax

Here is the simple syntax to use this tag −
<mstyle> expression </mstyle>

MathML - Subscripts

<msub> tag is used to draw subscript to an expression.

Syntax

Here is the simple syntax to use this tag −
<msub> base subscript </msub>

MathML - Subscript-Superscript

<msubsup> tag is used to attach both subscript and superscript to an expression.

Syntax

Here is the simple syntax to use this tag −
<msubsup> base subscript superscript</msubsup>

MathML - Superscripts

<msup> tag is used to draw superscript to an expression.

Syntax

Here is the simple syntax to use this tag −
<msup> base superscript </msup>

MathML - Underscript

<munder> tag is used to draw underscript. It adds an accent or a limit under an expression.

Syntax

Here is the simple syntax to use this tag −
<munder> base underscript </munder>

MathML - Underscript-Overscript

<munderover> tag is used to draw both over and under underscript. It adds an accent or a limit over and under an expression.

Syntax

Here is the simple syntax to use this tag −
<munderover> base underscript overscript </munderover>

MathML - Algebra Symbols

Following is a list of Algebra symbols available in MathML.
MathML Symbol HTML Entity Hex Code Description
- &minus; &#x2212; To specify subtraction
× &times; &#x00d7; To specify multiplication
÷ &divide; &#x00f7; To specify division

MathML - Calculus Symbols

Following is a list of Calculus symbols available in MathML.
MathML Symbol HTML Entity Hex Code Description
&prime; &#x2032; Prime (1st derivative)
&prime; &#x2033; Double prime (2nd derivative)
&tprime; &#x2034; Triple prime (3nd derivative)

MathML - Ellipses Symbols

Following is a list of ellipses symbols available in MathML.
MathML Symbol HTML Entity Hex Code Description
&hellip; &#x2026; To specify horizontal ellipsis
&vellip; &#x22ee; To specify vertical ellipsis

MathML - Function Symbols

Following is a list of function symbols available in MathML.
MathML Symbol HTML Entity Hex Code Description
&sdot; &#x22c5; To specify dot product
&cross; &#x2a2f; To specify cross product

MathML - Geometry Symbols

Following is a list of geometry symbols available in MathML.
MathML Symbol HTML Entity Hex Code Description
° &deg; &#x00b0; To specify degrees
&ang; &#x2220; To specify angle

MathML - Greek Letters

Following is a list of greek letters available in MathML.
Capital Letter (C) Small Letter (S) Entities(C) Entities(S) Hex Codes(C) Hex Codes(S)
Α α &alpha; &alpha; &#x0391; &#x03b1;
Β β &beta; &beta; &#x0392; &#x03b2;

MathML - Invisible Operators

Following is a list of invisible operators available in MathML.
Entity Short Entity Hex Description
&applyfunction; &af; &#x2061; It is used to specify function application
&invisibletimes; &it; &#x2062; It is used to specify invisible multiplication
&invisiblecomma; &ic; &#x2063; It is used to specify invisible separator
(n/a) (n/a) &#x2064; It is used to specify invisible addition

MathML - Logic Symbols

Following is a list of logic symbols available in MathML.
MathML Symbol HTML Entity Hex Code Description
¬ &not; &#x00ac; To specify negation
&and; &#x2227; To specify logical conjunction

MathML - Set Symbols

Following is a list of set symbols available in MathML.
MathML Symbol HTML Entity Hex Code Description
&empty; &#x2205; To specify the empty set
&isin; &#x2208; To specify the member of set
&notin; &#x2209; It specifies not a member of set
&sube; &#x2286; To specify a subset

MathML - Quick Guide

MathML - Overview

MathML stands for Mathematical Markup Language and is an XML based application. It is used to describe mathematical and scientific notations. It's 1 and 2 version were created and developed by The Math Working Group which is one of the oldest W3C Working Groups during 1996-2004.

MathML - Useful Resources

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

Discuss MathML

MathML stands for Mathematical Markup Language and is an XML based application. It is used to describe mathematical and scientific notations. It's 1 and 2 version were created and developed by The Math Working Group which is one of the oldest W3C Working Groups during 1996-2004. MathML version 3 was created during Math Working Group's second activity period (2006-2016)and is an ISO standard.

Friday, March 3, 2017

LESS - Overview

What is LESS?

LESS is a CSS pre-processor that enables customizable, manageable and reusable style sheet for web site. LESS is a dynamic style sheet language that extends the capability of CSS. LESS is also cross browser friendly.

LESS - Installation

This article provides step-by-step procedure of LESS installation.

System Requirements for LESS

  • Operating System : Cross-platform
  • Browser Support: IE (Internet Explorer 8+), Firefox, Google Chrome, Safari.

LESS - Nested Rules

Description

It is a group of CSS properties which allows using properties of one class into another class and includes class name as its properties. In LESS, you can declare mixin in the same way as CSS style using class or id selector. It can store multiple values and can be reused in the code whenever necessary.

LESS - Nested Directives and Bubbling

Description

You can nest the directives such as media and keyframe in the same manner, how you nest the selectors. You can place the directive on top and its relative elements will not be changed inside its rule set. This is known as bubbling process.

LESS - Operations

Description

LESS provides support for some arithmetical operations such as plus (+), minus (-), multiplication (*) and division (/) and they can operate on any number, color or variable. Operations save lot of time when you are using variables and you feel like working on simple mathematics.

LESS - Escaping

Description

It builds selectors dynamically and uses property or variable value as arbitrary string.

Example

The below example demonstrates use of escaping in the LESS file:
<html>
<head>
   <title>Less Escaping</title>
   <link rel="stylesheet" type="text/css" href="style.css" />
</head>
<body>

LESS - Functions

Description

LESS maps JavaScript code with manipulation of values and uses predefined functions to manipulate HTML elements aspects in the style sheet. It provides several functions to manipulate colors such as round function, floor function, ceil function, percentage function etc.

LESS - Namespaces and Accessors

Description

It is used to group the mixins under common name. Using namespaces you can avoid conflict in name and encapsulate group of mixins from outside.

LESS - Scope

Description

Variable scope specifies place of the available variable. The variables will be searched from the local scope and if they are not available, then compiler will search from the parent scope.

LESS - Comments

Description

Comments makes code clear and allows users to understand easily. You can use both block style and inline comments in the code, but when you compile the LESS code, the single line comments will not appear in the CSS file.

LESS - Importing

Description

It is used to import the contents of the LESS or CSS files.

Example

The below example demonstrates use of importing in the LESS file:
<html>
<head>

LESS - Variables

LESS allows variables to be defined with an @ symbol. Variable assignment is done with a colon(:).
Below table demonstrates the use of LESS variables in detail.
S.N.Variables usage & Description
1 Overview
Repetition of same value many times is usually seen and it can be avoided by the use of variables.

LESS - Extend

Extend is a LESS pseudo class which extend other selector styles in one selector by using :extend selector.

Example

The below example demonstrates use of extend in the LESS file:

LESS - Mixins

Mixins are similar to functions in programming languages. Mixins are group of CSS properties which allows you to use properties of one class into another class and includes class name as its properties. In LESS, you can declare mixin in the same way as CSS style using class or id selector. It can store multiple values and can be reused in the code whenever necessary.

LESS - Parametric Mixins

Description

Parametric mixins uses one or more parameters which extends functionality of LESS by taking arguments and its properties to customize the mixin output when mixed into another block.
For instance, consider a simple LESS code snippet:
.border(@width; @style; @color) {
    border: @width @style @color;

Less - Mixins as Functions

In this chapter let's study about Mixins as Functions. Mixins and functions work very similarly. Like functions, the mixins can be nested, can accept parameters and return values too.
The below table demonstrates the use of mixins as functions in details.

LESS - Passing Rulesets to Mixins

Description

Detached ruleset contains an ordinary ruleset such as properties, nested rulesets, variables declaration, mixins etc. It is stored in a variable and included into other structure where all its properties of the ruleset will get copied to that structure.

Less - Import Directives

Description

The @import directive is used to import the files in the code. It spread the LESS code over different files and allows to maintain the structure of code easily. You can put @import statements anywhere in the code.
For instance, you can import the file by using @import keyword as @import "file_name.less".

LESS - Import Options

In this chapter let's study about Import Options. LESS offers @import that allow style sheets to import both LESS and CSS style sheets.
The following tables lists the import directives that will be implemented in import statements.

LESS - Mixin Guards

Description

If you want to match simple values or number of arguments on expressions, then you can make use of guards. It is associated with mixin declaration and includes condition that is attached to a mixin. Each mixin will be having one or more guards which are separated by comma and guard must be enclosed within parentheses. LESS uses guarded mixins instead of if/else statements and perform calculations to specify matched mixin.

LESS - CSS Guards

Description

Guards are used to match simple values or number of arguments on expressions. It is applied to the CSS selectors. It is syntax for declaring mixin and calling it immediately. To successfully bring out the if type statement; join this with feature &, which allows you to group multiple guards.

LESS - Loops

Loops statement allows us to execute a statement or group of statements multiple times. Various iterative/loop structures can be created when recursive mixin combined with Guard Expressions and Pattern Matching.

Less - Merge

Description

It is a feature of LESS which allows adding values to comma or space separated list from multiple properties using a single property. It can be used for background and transform properties.
The following table describes two types of features supported by the Merge.

LESS - Parent Selectors

In this chapter let's study about Parent Selectors. It is possible to reference the parent selector by using &(ampersand) operator. Parent selectors of a nested rule is represented by & operator and is used when applying a modifying class or pseudo class to an existing selector.
The following table shows the types of parent selector:

LESS - Misc Functions

Misc function consists of group of function of different kind.
Following table lists all the types of misc function:
S.N.Functions & Description
1 color
It is a string which represents colors.
2 image - size
It is used to examine the dimension of the image from the file.

Less - String Functions

Description

Less supports some of the string functions as listed below:
  • escape
  • e
  • % format
  • replace

LESS - List Functions

Description

LESS consists of list fuctions which are used to specify length of the list and position of the value in the list.
Following table lists the list functions used in the LESS:
S.N.Function & Description
1 Length
It will take a comma or space separated list of values as parameter.
2 Extract
It will return the value at a specified position in a list.

Less - Math Functions

Description

Math functions includes methods which are used for performing numeric operations such as round, square root, power value, modulus, percentage etc.
Following table shows Math Functions used in LESS:

Less - Type Functions

In this chapter let's study about Type Functions. They are used to determine the type of the value.
Following table shows the Type Functions used in LESS.

Less - Color Defination Functions

Description

LESS provides number of useful color functions to alter and manipulate colors in different ways. LESS supports some of the Color Definition Functions as shown in the table below:

Less - Color Channel Functions

Less supports few build-in functions which set value about a channel. The channel set the value depending on the color definition. The HSL colors have hue, saturation and lightness channel and the RGB color have red, green and blue channel. Following are the list of color channel function:

Less - Color Operation

Description

LESS provides number of useful operation functions to alter and manipulate colors in different ways and take parameters in the same units. LESS supports some of the Color Operation Functions as shown in the table below:

Less - Color Blending Functions

In this chapter let's study about Color Blending Functions. These are similar operations used in image editors like Photoshop, Fireworks or GIMP, which matches your CSS colors to your images.
The following table shows the color blending functions used in LESS.

Less - Command Line Usage

Using the command line we can compile the .less file to .css.

Installing lessc for Use Globally

The following command is used to install lessc with npm(node package manager) to make the lessc available globally.
npm install less -g
You can also add a specific version after the package name. For eg: npm install less@1.6.2 -g

Less - using-less-in-the-browser

Less is used in the browser when you want to compile the less file dynamically when needed and not on the serverside, this is because less is a large javascript file.
First we need to add the LESS script to use LESS in the browser:
<script src="less.js"></script>

Less - Browser support

LESS is cross browser friendly that supports modern browsers such as Google Chrome, Mozilla Firefox, Safari and Internet Explorer and allows reusing CSS elements and write LESS code with the same semantics.

Less - Plugins

Plugin can be uploaded to expand the functionality of the site. Plugins are used to make your work easier.

Command Line

To install plugin using command line, you first need to install the lessc plugin. The plugin can be installed using less-plugin at the beginning. Below is command line to install the clean-css plugin:
npm install less-plugin-clean-css

Less - Programmatic Usage

The main point of programmatic usage in the LESS is less.render function. This function uses below format in LESS:
less.render(input_data, options)
    .then(function(output) {
        //code here
    },
    function(error) {

Less - Online Compilers

Online compilers are used to compile the less code into css code. Online compilers tools easily helps to generates the css code. Following are the available online less compilers:

Less - GUIs

In this chapter let's study about GUIs for LESS. Here you can use different LESS tools for your platform. For command line usage and tools click this link.
The below table lists the GUI compilers that supports cross platform.

Less - Editors and Plugins

In this chapter let's study about editors and plugins. Editor is a system or program which allows a user to edit text. Plugins are piece of software that is used to expand the functionality of the site.
Let's us discuss editors and IDEs for LESS.

Less - Third Party Compilers

Node.js Compilers

Following are the Node.js compilers used for LESS.

grunt-contrib-less

Grunt is a Node task runner. It will compile your stylesheets every time you commit changes to your LESS files.

Less - Frameworks

UI/Theme Frameworks and Components

LESS supports some of the UI/Theme frameworks as listed in the following table:
S.N.Framework & Description
1 1pxdeep
It is flat Bootstrap 3 theme that provides powerful color scheme controls.
2 Bootflat
It is open source framework based on Bootstrap.

Laravel - Overview

Introduction

Laravel is a MVC framework with bundles, migrations, and Artisan CLI. Laravel offers a robust set of tools and an application architecture that incorporates many of the best features of frameworks like CodeIgniter, Yii, ASP.NET MVC, Ruby on Rails, Sinatra, and others.

Laravel - Installation

For managing dependencies, Laravel uses composer. Make sure you have a Composer installed on your system before you install Laravel.
Step 1 − Visit the following URL and download composer to install it on your system.

Laravel - Application Structure

Root Directory

The root directory of Laravel contains various folders and files as shown in the following figure.
Root Directory

Laravel - Configuration

The config directory, as the name implies, contains all of your application's configuration files. In this directory, you will find various files needed to configure database, session, mail, application, services etc.

Laravel - Routing

Basic Routing

Basic routing is meant to route your request to an appropriate controller. The routes of the application can be defined in app/Http/routes.php file. Here is the general route syntax for each of the possible request.
Route::get('/', function () {
   return 'Hello World';

Laravel - Middleware

Define Middleware

As the name suggest, Middleware acts as a middle man between request and response. It is a type of filtering mechanism. For example, Laravel includes a middleware that verifies whether user of the application is authenticated or not. If the user is authenticated, he will be redirected to the home page otherwise, he will be redirected to the login page.

Laravel - Controllers

Basic Controllers

In MVC framework, the letter ‘C’ stands for Controller. It acts as a directing traffic between Views and Models.

Laravel - Request

Retrieving the Request URI

The “path” method is used to retrieve the requested URI. The “is” method is used to retrieve the requested URI which matches the particular pattern specified in the argument of the method. To get the full URL, we can use the “url” method.

Laravel - Cookie

Creating Cookie

Cookie can be created by global cookie helper of Laravel. It is an instance of Symfony\Component\HttpFoundation\Cookie. The cookie can be attached to the response using the withCookie() method. Create a response instance of Illuminate\Http\Response class to call the withCookie() method. Cookie

Laravel - Response

Basic Response

Each request has a response. Laravel provides several different ways to return response. Response can be sent either from route or from controller. The basic response that can be sent is simple string as shown in the below sample code. This string will be automatically converted to appropriate HTTP response.

Laravel - Views

Understanding Views

In MVC framework, the letter “V” stands for Views. It separates the application logic and the presentation logic. Views are stored in resources/views directory. Generally, the view contains the HTML which will be served by the application.

Laravel - Redirections

Redirecting to Named Routes

Named route is used to give specific name to a route. The name can be assigned using the “as” array key.
Route::get('user/profile', ['as' => 'profile', function () {
   //
}]);
Note − Here, we have given the name “profile” to a route “user/profile”.

Laravel - Working With Database

Connecting to Database

Laravel has made processing with database very easy. Laravel currently supports following 4 databases −
  • MySQL
  • Postgres
  • SQLite
  • SQL Server

Laravel - Errors and Logging

Errors

A project while underway, is borne to have a few errors. Errors and exception handling is already configured for you when you start a new Laravel project. Normally, in a local environment we need to see errors for debugging purposes. We need to hide these errors from users in production environment.

Thursday, March 2, 2017

Laravel - Forms

Laravel provides various in built tags to handle HTML forms easily and securely. All the major elements of HTML are generated using Laravel. To support this, we need to add HTML package to Laravel using composer.

Laravel - Localization

Localization feature of Laravel supports different language to be used in application. You need to store all the strings of different language in a file and these files are stored at resources/views directory. You should create a separate directory for each supported language. All the language files should return an array of keyed strings as shown below.

Laravel - Session

Sessions are used to store information about the user across the requests. Laravel provides various drivers like file, cookie, apc, array, Memcached, Redis, and database to handle session data. By default, file driver is used because it is lightweight. Session can be configured in the file stored at config/session.php.

Laravel - Validation

Validation is the most important aspect while designing an application. It validates the incoming data. By default, base controller class uses a ValidatesRequests trait which provides a convenient method to validate incoming HTTP requests with a variety of powerful validation rules.

Laravel - File Uploading

Uploading Files in Laravel is very easy. All we need to do is to create a view file where a user can select a file to be uploaded and a controller where uploaded files will be processed.
In a view file, we need to generate a file input by adding the following line of code.

Laravel - Sending Email

Laravel uses free feature-rich library “SwiftMailer” to send emails. Using the library function, we can easily send emails without too many hassles. The e-mail templates are loaded in the same way as views, which means you can use the Blade syntax and inject data into your templates. The following is the syntax of the send function.

Laravel - Ajax

Ajax (Asynchronous JavaScript and XML) is a set of web development techniques utilizing many web technologies used on the client-side to create asynchronous Web applications. Import jquery library in your view file to use ajax functions of jquery which will be used to send and receive data using ajax from the server. On the server side you can use the response() function to send response to client and to send response in JSON format you can chain the response function with json() function.

Laravel - Error Handling

In Laravel all the exceptions are handled by app\Exceptions\Handler class. This class contains two methods — report and render.

report() method

report() method is used to report or log exception. It is also used to send log exceptions to external services like Sentry, Bugsnag etc.

Laravel - Event Handling

An event is an action or occurrence recognized by a program that may be handled by the program. Laravel events simply provide an observer implementation. Event can be handled by the following steps −
Step 1 − Create an Event class.
Event class can be created by executing the following command.
php artisan make:event <event-class>

Laravel - Facades

Facades provide a "static" interface to classes that are available in the application's service container. Laravel "facades" serve as "static proxies" to underlying classes in the service container, providing the benefit of a terse, expressive syntax while maintaining more testability and flexibility than traditional static methods.

Laravel - Security

Security is important feature while designing web applications. It assures the users of the website that their data is secured. Laravel provides various mechanisms to secure website. Some of the features are listed below −

Laravel - Quick Guide

Laravel - Overview

Introduction

Laravel is a MVC framework with bundles, migrations, and Artisan CLI. Laravel offers a robust set of tools and an application architecture that incorporates many of the best features of frameworks like CodeIgniter, Yii, ASP.NET MVC, Ruby on Rails, Sinatra, and others.

Laravel - Useful Resources

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

Discuss Laravel

Laravel is a powerful MVC PHP framework, designed for developers who need a simple and elegant toolkit to create full-featured web applications. Laravel was created by Taylor Otwell. This is a brief tutorial that explains the basics of Laravel framework.

Koa.js - Overview

A web application framework provides you with a simple API to build websites, webapps and backends. You need not worry about low level protocols, processes, etc.

Koa.js - Environment

To get started with developing using the Koa framework, you need to have Node and npm(node package manager) installed. If you don’t already have these, head over to Node setup to install node on your local system. Confirm that node and npm are installed by running the following commands in your terminal.

Koa.js - Hello World

So we have set up the development, now it is time to start developing our first app using koa. Create a new file called app.js and type the following in it.
var koa = require('koa');
var app = koa();

Koa.js - Generators

One of the most exciting new features coming in JavaScript ES6 is a new breed of function, called a generator. Before generators, the whole script used to usually execute in a top to bottom order, without an easy way to stop code execution and resuming with the same stack later. Generators are functions which can be exited and later re-entered.

Koa.js - Routing

Web frameworks provide resources such as HTML pages, scripts, images, etc. at different routes. Koa does not support routes in the core module. We need to use the koa-router module to easily create routes in koa. Install this module using:

Koa.js - URL Building

We can now define routes, but those are static or fixed. To use dynamic routes, we need to provide different types of routes. Using dynamic routes allows us to pass parameters and process based on them. Here is an example of a dynamic route:

Koa.js - HTTP Methods

The HTTP method is supplied in the request and specifies the operation that the client has requested. The below table summarizes the most used HTTP methods:

Koa.js - Request Object

A Koa Request object is an abstraction on top of node's vanilla request object, providing additional functionality that is useful for every day HTTP server development. The Koa request object is embeded in the context object, this. Lets log out the request object whenever we get a request:

Koa.js - Response Object

A Koa Response object is an abstraction on top of node's vanilla response object, providing additional functionality that is useful for every day HTTP server development. The Koa response object is embeded in the context object, this. Lets log out the response object whenever we get a request:

Koa.js - Redirects

Redirection is very important when creating websites. If a malformed URL is requested or there are some errors on your server, you should redirect them to the respective error pages. Redirects can also be used to keep people out of restricted areas of your website. Let us create an error page and redirect to that page whenever someone requests a malformed URL:

Koa.js - Error Handling

Error handling plays an important part in building web applications. Koa uses middlewares for this purpose as well.
In koa you add a middleware that does try { yield next } as one of the first middleware. If we encounter any error downstream, we return to the associated catch clause and handle the error here. For example:

Koa.js - Cascading

Middleware functions are functions that have access to the context object and the next middleware function in the application’s request-response cycle. These functions are used to modify request and response objects for tasks like parsing request bodies, adding response headers, etc. Koa goes a step further by yielding 'downstream', then flowing control back 'upstream'. This effect is called cascading.

Koa.js - Templating

Pug is a templating engine. Templating engines are used to remove the cluttering of our server code with HTML, concatenating strings wildly to existing HTML templates. Pug is a very powerful templating engine which has a variety of features including filters, includes, inheritance, interpolation, etc. There is a lot of ground to cover on this.

Koa.js - Form Data

Forms are an intergral part of the web. Almost every website we visit offers us forms that submit or fetch some information for us. To get started with forms, we will first install the koa-body To install this, go to your terminal and use:

Koa.js - File Uploading

Web applications need to provide the functionality to allow file uploads. Let us see how we can receive files from the clients and store them on our server.
We have already used the koa-body middleware for parsing requests. This middleware is also used for handling file uploads. Let us create a form that allows us to upload files and then save these files using koa. First create a template called file_upload.pug with the following contents:

Koa.js - Static files

Static files are files that clients download as they are from the server. Create a new directory, public. Express, by default doesn't allow you to serve static files.
We need a middleware to serve this purpose. Go ahead and install koa-serve:
$ npm install --save koa-static

Koa.js - Cookies

Cookies are simple, small files/data that are sent to client with a server request and stored on the client side. Every time the user loads the website back, this cookie is sent with the request. This helps us keep track of the users actions. There are numerous uses of HTTP Cookies.

Koa.js - Sessions

Because HTTP is stateless, in order to associate a request to any other request, you need a way to store user data between HTTP requests. Cookies and URL parameters are both suitable ways to transport data between client and server. But they are both readable and on the client side. Sessions solve exactly this problem. You assign the client an ID and it makes all further requests using that ID. Information associated with the client is stored on the server linked to this ID.

Koa.js - Authentication

Authentication is a process in which the credentials provided are compared to those on file in a database of authorized users' information on a local operating system or within an authentication server. If the credentials match, the process is completed and the user is granted authorization for access.

Koa.js - Compression

Compression is a simple, effective way to save bandwidth and speed up your site. It is only compatible with modern browsers and should be used with caution if your users use legacy browsers as well.
When sending responses from the server, if compression is used, it can greatly improve the load time. We'll be using a middleware called koa-compress to take care of compression of files as well as setting appropriate headers.

Koa.js - Caching

Caching is the term for storing reusable responses in order to make subsequent requests faster. Every browser ships with an implementation of an HTTP cache! All we have to do is ensure that each server response provides correct HTTP header directives to instruct the browser on when and for how long the response can be cached by the browser.

Koa.js - Database

We are receiving the requests, but are not storing them anywhere. We need a Database to store the data. We'll use a famous NoSQL database called MongoDB. To install and read about Mongo, head over to this link.

Koa.js - RESTful APIs

To create mobile applications, single page applications, use AJAX calls and provide data to clients, you'll need an API. An popular architectural style of how to structure and name these APIs and the endpoints is called REST(Representational Transfer State). HTTP 1.1 was designed keeping REST principles in mind. REST was introduced by Roy Fielding in 2000 in his paper Fielding Dissertions.

Koa.js - Logging

Logging is quite useful when creating web applications as they provide us with exactly where things went wrong. We also get the context for the things that went wrong and can come up with possible solutions for the same.

Koa.js - Scaffolding

Scaffolding allows us to easily create a skeleton for a web application. We manually created our public directory, added middleware, created separate route files, etc. A scaffolding tool sets up all these things for us so that we can directly get started with building our application.

Koa.js - Resources

Here is a list of resources I used while learning Koa and while writing this tutorial:

Wednesday, March 1, 2017

KnockoutJS - Overview

What is KnockoutJS?

KnockoutJS is basically a library written in JavaScript that is based on MVVM pattern that helps developers building rich and responsive websites. This separates the application's Model (stored data), View (UI) and View Model (Javascript Representation of model).
KO is an abbreviation used for KnockoutJS.

KnockoutJS - Environment Setup

It's very easy to use KnockoutJS. Simply refer the Javascript file using <script > tag in HTML pages.
Knockout.js can be accessed in the following ways:
  • You can download production build of Knockout.js from its official website:
    A page as in the following image will be displayed. Click on download link and you will get the latest knockout.js file.

KnockoutJS Application

KnockoutJS is widely used for Single Page Applications - A web site that is created with ability to retrieve all necessary data dynamically with a single page load reducing server round trips.
KnockoutJS is a client side framework. This is a Javascript library which makes it very easy to bind HTML to domain data. It implements a pattern called "Model-View-ViewModel"(MVVM). Observables is the magic ingredient of KnockoutJS. All data remains in sync because of Observable attribute.

KnockoutJS - MVVM Framework

Model-View-ViewModel (MVVM) is an architectural design pattern for developing software applications. MVVM was developed by Microsoft Architect John Gossman in 2005. This pattern is derived from Model-View-Controller (MVC) pattern. The advantage of MVVM is that it separates application layer's graphical user interface from business logic.

KnockoutJS - Observables

KnockoutJS is build upon 3 important concepts. Those are:
  • Observables and dependency tracking between them - DOM elements are connected to ViewModel via 'data-bind'. These 2 exchange information through Observables. This automatically takes care of dependency tracking.

KnockoutJS - Computed Observables

  • Computed Observable is a function which is dependent on one or more Observables and will automatically update whenever its underlying Observables (dependencies) change.
  • Computed Observables can be chained.

KnockoutJS - Declarative Bindings

Declarative binding in KnockoutJS provides a powerful way to connect data to UI.
It is important to understand relationship between bindings and Observables. Technically these two are different. You can use normal JavaScript object as ViewModel and KnockoutJS can process View's binding correctly. Without Observable the property from UI will be processed only for the first time. In this case it cannot update automatically based on underlying data update. To achieve this, bindings must be referred to Observable properties.

KnockoutJS - Dependency Tracking

Dependency Tracking in KnockoutJS

KnockoutJs automatically tracks the dependencies when the values get updated. It has a single object called dependency tracker(ko.dependencyDetection) which acts as an intermediate between two parties for subscribing the dependencies.
The algorithm for dependency tracking can be shown as below:

KnockoutJS - Templating

Template is a set of DOM elements which can be used repetitively. Templating makes it easy to build complex applications due to its property of minimizing duplication of DOM elements.
There are 2 ways of creating templates:

KnockoutJS - Components

Components are a huge way of organizing the UI code for structuring a large application and promote code reusability.
  • It is inherited or nested from other component.
  • For loading and configuration, it defines its own conventions or logic.
  • It is packaged to reuse throughout the application or project.
  • Represents the complete sections of application or small controls/widgets.
  • Loaded or preloaded on demand.

JSF - Overview

What is JSF?

JavaServer Faces (JSF) is a MVC web framework that simplifies the construction of user interfaces (UI) for server-based applications by using reusable UI components in a page.JSF provides facility to connect UI widgets with data sources and to server-side event handlers. The JSF specification defines a set of standard UI components and provides an Application Programming Interface (API) for developing components.JSF enables the reuse and extension of the existing standard UI components.

JSF - Environment Setup

This tutorial will guide you on how to prepare a development environment to start your work with JSF Framework. This tutorial will also teach you how to setup JDK, Eclipse, Maven, and Tomcat on your machine before you setup JSF Framework:

JSF - Architecture

JSF technology is a framework for developing, building server side User Interface Components and using them in a web application.JSF technology is based on the Model View Controller (MVC) architecture for separating logic from presentation.

JSF - Life Cycle

JSF application lifecycle consist of six phases which are as follows
  • Restore view phase
  • Apply request values phase; process events
  • Process validations phase; process events
  • Update model values phase; process events
  • Invoke application phase; process events
  • Render response phase

JSF - First Application

To create a simple JSF application, we'll use maven-archetype-webapp plugin. In example below, We'll create a maven based web application project in C:\JSF folder.

JSF - Managed Beans

  • Managed Bean is a regular Java Bean class registered with JSF. In other words, Managed Beans is a java bean managed by JSF framework.
  • The managed bean contains the getter and setter methods, business logic or even a backing bean (a bean contains all the HTML form value).

JSF - Page Navigation

Navigation rules are those rules provided by JSF Framework which describe which view is to be shown when a button or link is clicked.
  • Navigation rules can be defined in JSF configuration file named faces-config.xml.
  • Navigation rules can be defined in managed beans.
  • Navigation rules can contain conditions based on which resulted view can be shown.
  • JSF 2.0 provides implicit navigation as well in which there is no need to define navigation rules as such.

JSF - Basic Tags

Basic JSF Tags

JSF provides a standard HTML tag library. These tags get rendered into corresponding html output.
For these tags you need to use the following namespaces of URI in html node.
<html 

JSF - Facelets Tags

Facelets JSF Tags

JSF provides special tags to create common layout for a web application called facelets tags. These tags gives flexibility to manage common parts of a multiple pages at one place.
For these tags you need to use the following namespaces of URI in html node.
<html 

JSF - Convertor Tags

JSF Convertor Tags

JSF provides inbuilt convertors to convert its UI component's data to object used in a managed bean and vice versa.For example, these tags can convert a text into date object and can validate the format of input as well.

JSF - Validator Tags

JSF Validator Tags

JSF provides inbuilt validators to validate its UI components. These tags can validates length of field, type of input which can be a custom object.
For these tags you need to use the following namespaces of URI in html node.

JSF - DataTable

JSF DataTable

JSF provides a rich control named DataTable to render and format html tables.
  • DataTable can iterate over collection or array of values to display data.
  • DataTable provides attributes to modify its data in easy way.

JSF - Composite Components

JSF provides developer a powerful capability to define own custom components which can be used to render custom contents.

Define Custom Component

Defining a custom component in JSF is a two step process

JSF - Ajax

Ajax: A Brief Introduction

  • AJAX stands for Asynchronous JavaScript And Xml.
  • Ajax is a technique to use HTTPXMLObject of JavaScript to send data to server and receive data from server asynchronously.
  • So using Ajax technique, javascript code exchanges data with server, updates parts of web page without reloading the whole page.

JSF - Event Handling

JSF Event Handling

  • When a user clicks a JSF button or link or changes any value in text field, JSF UI component fires event which will be handled by the the application code.
  • To handle such event, event handler are to be registered in the application code or managed bean.
  • When a UI component checks that a user event has happened, it creates an instance of the corresponding event class and adds it to an event list.

JSF - JDBC Integration

In this article, we'll demonstrate how to integrate database in JSF using JDBC
Database requirements to run this example
S.N.Software & Description
1PostgreSQL 9.1
Open Source and light weight database
2PostgreSQL JDBC4 Driver
JDBC driver for PostgreSQL 9.1 and JDK 1.5 or above
Put PostgreSQL JDBC4 Driver jar in tomcat web server's lib directory

JSF - Spring Integration

Spring provides special class DelegatingVariableResolver to integrate JSF and Spring together in seamless manner.
Following steps are required to integrate Spring Dependency Injection (IOC) feature in JSF

JSF - Expression Language

JSF provides a rich expression language. We can write normal operations using #{operation-expression} notation. Some of the advantages of JSF Expression languages are following.
  • Can reference bean properties where bean can be a object stored in request, session or application scope or is a managed bean.

JSF - Internationalization

Internationalization is a technique in which status messages, GUI component labels, currency, date are not hardcoded in the program instead they are stored outside the source code in resource bundles and retrieved dynamically. JSF provide a very convenient way to handle resource bundle.
Following steps are required to internalize a JSF application

JSF - Useful Resources

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

Discuss JSF

JavaServer Faces (JSF) is a Java-based web application framework intended to simplify development integration of web-based user interfaces. JavaServer Faces is a standardized display technology which was formalized in a specification through the Java Community Process.
This tutorial will teach you basic JSF concepts and will also take you through various advance concepts related to JSF framework.

JqueryUI - Overview

JqueryUI is a powerful Javascript library built on top of jQuery JavaScript library. UI stands for User interface, It is a set of plug-ins for jQuery that adds new functionalities to the jQuery core library.
The set of plug-ins in JqueryUI includes interface interactions, effects, animations, widgets, and themes built on top of jQuery JavaScript Library.

JqueryUI - Environment Setup

This chapter will discuss about download and set up of JqueryUI library. We will also briefly study the directory structure and its contents. JqueryUI library can be used in two ways in your web page −

JqueryUI - Draggable

jQueryUI provides draggable() method to make any DOM element draggable. Once the element is draggable, you can move that element by clicking on it with the mouse and dragging it anywhere within the viewport.

JqueryUI - Droppable

jQueryUI provides droppable() method to make any DOM element droppable at a specified target (a target for draggable elements).

Syntax

The droppable() method can be used in two forms −

JqueryUI - Resizable

jQueryUI provides resizable() method to resize any DOM element. This method simplifies the resizing of element which otherwise takes time and lot of coding in HTML. The resizable () method displays an icon in the bottom right of the item to resize.

JqueryUI - Selectable

jQueryUI provides selectable() method to select DOM element individually or in a group. With this method elements can be selected by dragging a box (sometimes called a lasso) with the mouse over the elements. Also, elements can be selected by clicking or dragging while holding the Ctrl/Meta key, allowing for multiple (non-contiguous) selections.

JqueryUI - Sortable

jQueryUI provides sortable() method to reorder elements in list or grid using the mouse. This method performs sortability action based upon an operation string passed as the first parameter.

Syntax

The sortable () method can be used in two forms −

JqueryUI - Accordion

Accordion Widget in jQueryUI is a jQuery based expandable and collapsible content holder that is broken into sections and probably looks like tabs. jQueryUI provides accordion() method to achieve this.

Syntax

The accordion() method can be used in two forms −

JqueryUI - Autocomplete

Auto completion is a mechanism frequently used in modern websites to provide the user with a list of suggestions for the beginning of the word, which he/she has typed in a text box. The user can then select an item from the list, which will be displayed in the input field. This feature prevents the user from having to enter an entire word or a set of words.

JqueryUI - Button

jQueryUI provides button() method to transform the HTML elements (like buttons, inputs and anchors) into themeable buttons, with automatic management of mouse movements on them, all managed transparently by jQuery UI.
In order to group radio buttons, Button also provides an additional widget, called Buttonset. Buttonset is used by selecting a container element (which contains the radio buttons) and calling .buttonset().

JqueryUI - Datepicker

Datepickers in jQueryUI allow users to enter dates easily and visually. You can customize the date format and language, restrict the selectable date ranges and add in buttons and other navigation options easily.
jQueryUI provides datepicker() method that creates a datepicker and changes the appearance of HTML elements on a page by adding new CSS classes. Transforms the <input>, <div>, and <span> elements in the wrapped set into a datepicker control.

JqueryUI - Dialog

Dialog boxes are one of the nice ways of presenting information on an HTML page. A dialog box is a floating window with a title and content area. This window can be moved, resized, and of course, closed using "X" icon by default.
jQueryUI provides dialog() method that transforms the HTML code written on the page into HTML code to display a dialog box.

JqueryUI - Menu

A menu widget usually consists of a main menu bar with pop up menus. Items in pop up menus often have sub pop up menus. A menu can be created using the markup elements as long as the parent-child relation is maintained (using <ul> or <ol>). Each menu item has an anchor element.

JqueryUI - Progressbar

Progress bars indicate the completion percentage of an operation or process. We can categorize progress bar as determinate progress bar and indeterminate progress bar.
Determinate progress bar should only be used in situations where the system can accurately update the current status. A determinate progress bar should never fill from left to right, then loop back to empty for a single process.

JqueryUI - Slider

A slider is used whenever a numeric value within a certain range is to be obtained. The advantage of a slider over text input is that it becomes impossible for the user to enter a bad value. Any value that they can pick with the slider is valid.

JqueryUI - Spinner

Spinner widget adds a up/down arrow to the left of a input box thus allowing a user to increment/decrement a value in the input box. It allows users to type a value directly, or modify an existing value by spinning with the keyboard, mouse or scrollwheel.

JqueryUI - Tabs

Tabs are sets of logically grouped content that allow us to quickly flip between them to. Tabs allow us to save space like accordions. For tabs to work properly following set of markups needs to use −

JqueryUI - Tooltip

Tooltip widget of jQueryUI replaces the native tooltips. This widget adds new themes and allows for customization. First let us understand what tooltips are? Tooltips can be attached to any element. To display tooltips, just add title attribute to input elements and title attribute value will be used as tooltip. When you hover the element with your mouse, the title attribute is displayed in a little box next to the element.

JqueryUI - Add Class

This chapter will discuss the addClass() method, which is one of the methods used to manage jQueryUI visual effects. addClass() method allow animating the changes to the CSS properties.
addClass() method add specified classes to the matched elements while animating all style changes.

JqueryUI - Color Animation

jQueryUI extends some core jQuery methods so that you can animate different transitions for an element. One of them being animate method. jQueryUI extends the jQuery animate method, to add support for animating colors. You can animate one of several CSS properties that define an element’s colors. Following are the CSS properties that the animate method supports.

JqueryUI - Effect

This chapter will discuss the effect() method, which is one of the methods used to manage jQueryUI visual effects. effect() method applies an animation effect to the elements without having to show or hide it.

JqueryUI - Hide

This chapter will discuss the hide() method, which is one of the methods used to manage jQueryUI visual effects. effect() method applies an animation effect to hide elements.

Syntax

The hide() method has the following syntax −
.hide( effect [, options ] [, duration ] [, complete ] )

JqueryUI - Remove Class

This chapter will discuss the removeClass() method, wh ich is one of the methods used to manage jQueryUI visual effects. removeClass() method removes the applied classes from the elements.
removeClass() method removes the specified classes to the matched elements while animating all style changes.

JqueryUI - Show

This chapter will discuss the show() method, which is one of the methods used to manage jQueryUI visual effects. show() method displays an item using the indicated effect.
show() method toggles the visibility of the wrapped elements using the specified effect.

JqueryUI - Switch Class

This chapter will discuss the switchClass() method, which is a useful new class for manipulation. switchClass() method move from one CSS one CSS class to another, animating the transition from one state to the other.

JqueryUI - Toggle

This chapter will discuss the toggle() method of jQueryUI visual effects. toggle() method toggles the show () or hide () methods depending on whether the element is hidden or not.

JqueryUI - Toggle Class

This chapter will discuss the toggleClass() method, which is a useful new class for manipulation. toggleClass() method adds or removes one or more classes from each element in the set of matched elements.

JqueryUI - Position

In this chapter we shall see one of the utility methods of jqueryUi, the position() method. The position() method allows you to position an element with respect to another element or mouse event.
jQuery UI extends the .position() method from jQuery core in a way that lets you describe how you want to position an element the same way you would naturally describe it to another person.

JqueryUI - Widget Factory

Earlier, the only way to write custom controls in jQuery was to extend the $.fn namespace. This works well for simple widgets. Suppose you build more stateful widgets, it quickly becomes cumbersome. To aid in the process of building widgets, Widget Factory was introduced in the jQuery UI, which removes most of the boilerplate that is typically associated with managing a widget.

JqueryUI - Quick Guide

JqueryUI - Overview

JqueryUI is a powerful Javascript library built on top of jQuery JavaScript library. UI stands for User interface, It is a set of plug-ins for jQuery that adds new functionalities to the jQuery core library.
The set of plug-ins in JqueryUI includes interface interactions, effects, animations, widgets, and themes built on top of jQuery JavaScript Library.

JqueryUI - Useful Resources

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

Discuss JqueryUI

JqueryUI is the most popular front end frameworks currently. It is sleek, intuitive, and powerful mobile first front-end framework for faster and easier web development. It uses HTML, CSS and Javascript. This tutorial will teach you basics of JqueryUI Framework,

Tuesday, February 28, 2017

jQuery - Overview

What is jQuery?

jQuery is a fast and concise JavaScript Library created by John Resig in 2006 with a nice motto − Write less, do more.
jQuery simplifies HTML document traversing, event handling, animating, and Ajax interactions for rapid web development.

jQuery - Basics

jQuery is a framework built using JavaScript capabilities. So while developing your applications using jQuery, you can use all the functions and other capabilities available in JavaScript.
This chapter would explain most basic concepts but frequently used in jQuery based applications.

jQuery - Selectors

The jQuery library harnesses the power of Cascading Style Sheets (CSS) selectors to let us quickly and easily access elements or groups of elements in the Document Object Model (DOM).
A jQuery Selector is a function which makes use of expressions to find out matching elements from a DOM based on the given criteria.

jQuery - Attributes

Some of the most basic components we can manipulate when it comes to DOM elements are the properties and attributes assigned to those elements.
Most of these attributes are available through JavaScript as DOM node properties. Some of the more common properties are −

jQuery - DOM Traversing

jQuery is a very powerful tool which provides a variety of DOM traversal methods to help us select elements in a document randomly as well as in sequential method.
Most of the DOM Traversal Methods do not modify the jQuery object and they are used to filter out elements from a document based on given conditions.

jQuery - CSS Selectors Methods

The jQuery library supports nearly all of the selectors included in Cascading Style Sheet (CSS) specifications 1 through 3, as outlined on the World Wide Web Consortium's site.
Using JQuery library developers can enhance their websites without worrying about browsers and their versions as long as the browsers have JavaScript enabled.

jQuery - DOM Manipulation

JQuery provides methods to manipulate DOM in efficient way. You do not need to write big code to modify the value of any element's attribute or to extract HTML code from a paragraph or division.
JQuery provides methods such as .attr(), .html(), and .val() which act as getters, retrieving information from DOM elements for later use.

jQuery - Events Handling

We have the ability to create dynamic web pages by using events. Events are actions that can be detected by your Web Application.
Following are the examples events −

jQuery - Ajax

AJAX is an acronym standing for Asynchronous JavaScript and XML and this technology help us to load data from the server without a browser page refresh.
If you are new with AJAX, I would recommend you go through our Ajax Tutorial before proceeding further.
JQuery is a great tool which provides a rich set of AJAX methods to develop next generation web application.

jQuery - Effects

jQuery provides a trivially simple interface for doing various kind of amazing effects. jQuery methods allow us to quickly apply commonly used effects with a minimum configuration.
This tutorial covers all the important jQuery methods to create visual effects.

jQuery - Interactions

Interactions could be added basic mouse-based behaviours to any element. Using with interactions, We can create sortable lists, resizeable elements, drag & drop behaviours.Interactions also make great building blocks for more complex widgets and applications.

jQuery - Widgets

a jQuery UI widget is a specialized jQuery plug-in.Using plug-in, we can apply behaviours to the elements. However, plug-ins lack some built-in capabilities, such as a way to associate data with its elements, expose methods, merge options with defaults, and control the plug-in's lifetime.

jQuery - Theming

Jquery has two different styling themes as A And B.Each with different colors for buttons, bars, content blocks, and so on.
The syntax of J query theming as shown below
<div data-role = "page" data-theme = "a|b">
A Simple of A theming Example as shown below
<!DOCTYPE html>
<html>

jQuery - Utilities

Jquery provides serveral utilities in the formate of $(name space). These methods are helpful to complete the programming tasks.a few of the utility methods are as show below.

jQuery - Plugins

A plug-in is piece of code written in a standard JavaScript file. These files provide useful jQuery methods which can be used along with jQuery library methods.
There are plenty of jQuery plug-in available which you can download from repository link at https://jquery.com/plugins.

jQuery - Page Pilling

pagePiling.js is a jQuery plug-in for 'piling' your layout sections over one another and accessing them by scrolling.
A Simple of theming example as shown below
<!DOCTYPE html>
<html xmlns = "https://www.w3.org/1999/xhtml">

jQuery - flickerplate

Flickerplate is a jQuery plugin for creating a slider which allows you cycle through images with animated arrows and dots navigation.
A Simple of flickerplate example as shown below −
<!DOCTYPE html>
<html>

jQuery - Multiscroll.js

multiscroll.js is a jQuery plugin for creating split pages with two vertical scrolling panels.
A Simple of multiscroll example as shown below
<!DOCTYPE html>
<html xmlns = "https://www.w3.org/1999/xhtml">

jQuery - Slidebar.js

Slidebars is a jQuery plugin for quickly and easily implementing app style off-canvas menus and sidebars into your website.
A Simple of slidebar example as shown below
<!doctype html>
<html>